Create Invoice
https://sandboxapi.bitnob.co/api/v1/wallets/ln/createinvoice (opens in a new tab)
Create a lightning invoice to receive a payment
Body Parameters
Parameter | type | Required |
---|---|---|
satoshis Defaults to 3000 Amount in satoshis, if not sent a default of 1 will be set. | int32 | ✅ |
customerEmail Email of customer generating invoice | string | ✅ |
description Defaults to lightning money Description of transaction | string | ✅ |
expiresAt Defaults to DateTime ISO String | string | |
descriptionHash | string |
Request
lightning/ Create invoice [POST]
curl --request POST \
--url https://sandboxapi.bitnob.co/api/v1/wallets/ln/createinvoice \
--header 'Authorization: Bearer API-KEY' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"satoshis": 100,
"customerEmail": "customer@email.com",
"description": "lightning money",
"expiresAt": "DateTime ISO String",
"descriptionHash": "string"
}
'
Responses
🟢 200 - Result example
{
"status": true,
"message": "lightning invoice successfully created",
"data": {
"description": "money stops nonsense on sunday",
"request": "lntb19300n1ps5xzcypp5jcksjkjpupn7pfzkqacm8tpsyz9dd24akpcmv3rvyljx7fqqnh8sdpsd4hkueteypehgmmswvsxummwwdjkuum9yphkugrnw4hxgctecqzpgxqr23sfppqwnu34jgs5j07h2k55vue7w9fctu7r7g4sp5ffjp2mnr3x3kjrfm678twu0agnk5hpf4n7st7u72q9r43d5nwwrs9qyyssqswxaw2au37dyzdgs7rkvllrlel4dnn68z7tkd8m4tfgmytwv23mrma7zh505szyy6u5tlydtujcljfeppfv7q2mvxuzlys5r4javcrqpvxdphm",
"tokens": "1000"
}
}
Last updated on