Learn how to send and receive instant Bitcoin payments with Express and ZBD.
express-example
and run the following command to initiate a Node.js project:
index.js
and add the following code:
http://localhost:3000/request
should return a JSON response with a payment request.
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.
http://localhost:3000/send
should return a JSON response with the payment sent message.
You can also test this using curl command:
status
of completed
to know that the payment settled successfully.
processing
. This is expected — use the callbackUrl
property to receive updates about your payments.