Learn how to receive Bitcoin using Supabase Edge Functions.
/supabase/functions/zbd-receive
folder structure in your project.
ZBD_API_KEY
with your own ZBD Project’s API key.
--no-verify-jwt
flag to the command to disable JWT verification. This is because we are not passing a JWT token to the function when we call it. This is not recommended for production use.
Supabase CLI will output a HTTP URL endpoint that you can use to test your function by issuing a POST request to that resource.
https://xxxxxxxxxxxxx.supabase.co/functions/v1/zbd-receive
should return a JSON response with the payment request details.
You can also test this using curl command:
data.invoice.request
property in the JSON response. It starts with lnbc1
and is the payment request anyone in the Bitcoin Lightning Network can use to pay you.