The ZBD + Next.js Playground Starter Kit is an application codebase that allows you to quickly get started with ZBD and Next.js. It includes two main sections: a ZBD API Playground and a Starter Kit for ZBD-powered Next.js applications.
Run the following command to start your Next.js server:
Copy
Ask AI
yarn dev
Using an API tool like Postman, you should be able to make a POST call to this endpoint and receive a JSON response with a payment request:
Copy
Ask AI
https://example.com/api/request
You’re looking for the 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.
Charges and payment requests are usually shown to users as QR codes that can be scanned by mobile apps (e.g. ZBD). Read Callbacks to understand how to receive updates about your payment asynchronously.
Using an API tool like Postman, you should be able to make a POST call to this endpoint and receive a JSON response with the payment success message:
Copy
Ask AI
https://example.com/api/send
You’re looking for the status of completed to know that the payment settled successfully.
Payments in the Lightning Network are asynchronous so you may see a response stating the payment is processing. This is expected — use the callbackUrl property to receive updates about your payments.