Learn how to use the ZBD with Next.js and our Playground Starter Kit.
/app/api/receive/route.ts
and add the following code to create an API route that will receive instant Bitcoin payments:
/app/api/send/route.ts
and add the following code to create an API route that will send Bitcoin Lightning Address payments:
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.
status
of completed
to know that the payment settled successfully.
processing
. This is expected — use the callbackUrl
property to receive updates about your payments.