Decode Payment Request
https://sandboxapi.bitnob.co/api/v1/wallets/ln/decodepaymentrequest (opens in a new tab)
Decode a BOLT 11 compliant payment request
Body Parameters
Parameter | type | Required |
---|---|---|
satoshis Defaults to 3000 amount to be sent in satoshis | int32 | ✅ |
address Address of receiving party | string | ✅ |
Request
lightning / Decode Payment Request [POST]
curl --request POST \
--url https://sandboxapi.bitnob.co/api/v1/wallets/ln/decodepaymentrequest \
--header 'Authorization: Bearer API-KEY' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"request": "lntb19300n1ps5xzcypp5jcksjkjpupn7pfzkqacm8tpsyz9dd24akpcmv3rvyljx7fqqnh8sdpsd4hkueteypehgmmswvsxummwwdjkuum9yphkugrnw4hxgctecqzpgxqr23sfppqwnu34jgs5j07h2k55vue7w9fctu7r7g4sp5ffjp2mnr3x3kjrfm678twu0agnk5hpf4n7st7u72q9r43d5nwwrs9qyyssqswxaw2au37dyzdgs7rkvllrlel4dnn68z7tkd8m4tfgmytwv23mrma7zh505szyy6u5tlydtujcljfeppfv7q2mvxuzlys5r4javcrqpvxdphm"
}
'
Responses
🟢 200 - Result example
{
"status": true,
"message": "payment request successfully decoded",
"data": {
"chain_address": "tb1qwnu34jgs5j07h2k55vue7w9fctu7r7g4xese08",
"cltv_delta": 40,
"created_at": "2021-09-16T09:14:44.000Z",
"description": "money stops nonsense on sunday",
"destination": "032b17669f46daedcce8fb569760b2dabb3782d266d6cfb905d3582a8f1d757d5d",
"expires_at": "2021-09-16T12:14:44.000Z",
"features": [
{
"bit": 9,
"is_known": true,
"is_required": false,
"type": "tlv_onion"
},
{
"bit": 14,
"is_known": true,
"is_required": true,
"type": "payment_identifier"
},
{
"bit": 17,
"is_known": true,
"is_required": false,
"type": "multipath_payments_v0"
}
],
"id": "962d095a41e067e0a4560771b3ac30208ad6aabdb071b6446c27e46f24009dcf",
"is_expired": false,
"mtokens": "1930000",
"payment": "4a64156e6389a3690d3bd78eb771fd44ed4b85359fa0bf73ca014758b6937387",
"routes": [],
"safe_tokens": 1930,
"tokens": 1930
}
}
Last updated on