Initiate Payment
https://sandboxapi.bitnob.co/api/v1/wallets/ln/initiatepayment (opens in a new tab)
Initiate payment is advised to be run before paying an invoice to calculate fees and check if an invoice has expired.
Body Parameters
Transaction Object (opens in a new tab) is been returned as a response data.
Parameter | type | Required |
---|---|---|
request Defaults to lntb10u1pssrea6pkugrnw4hxg..... | string | ✅ |
Request
lightning/ Initiate payment [POST]
curl --request POST \
--url https://sandboxapi.bitnob.co/api/v1/wallets/ln/initiatepayment \
--header 'Authorization: Bearer API-KEY' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"request": "lntb10u1pssrea6pp5rdmqtcxdl69syel7xal4ajmaq6phtd23ujnzdzqwv68p4mprhajqdpsd4hkueteypehgmmswvsxummwwdjkuum9yphkugrnw4hxgctecqzpgxqr23sfppqh4rqy3muaufpmzcfyhpqy8ase4gjsmvtsp5c5nghldmj8k0q8fl4l3eyvga95905g4f8kzwah6pts2kr2l3f03s9qyyssqj5lz3wlas54kfh2dhnk3d5xz5j8d2t4ym963kc29gfh3dketwscsq0y07ypsylk50yj0jx284764vtkwlnpx2czerks7t6mry4h0axcpmazk8l"
}
'
Responses
🟢 200 - Result example
{
"status": true,
"message": "Transaction summary",
"data": {
"satFee": 2,
"expiry": "2021-07-29T02:26:50.000Z",
"satAmount": 1002,
"isExpired": false,
"description": "money stops nonsense on sunday",
"request": "lntb10u1pssrea6pp5rdmqtcxdl69syel7xal4ajmaq6phtd23ujnzdzqwv68p4mprhajqdpsd4hkueteypehgmmswvsxummwwdjkuum9yphkugrnw4hxgctecqzpgxqr23sfppqh4rqy3muaufpmzcfyhpqy8ase4gjsmvtsp5c5nghldmj8k0q8fl4l3eyvga95905g4f8kzwah6pts2kr2l3f03s9qyyssqj5lz3wlas54kfh2dhnk3d5xz5j8d2t4ym963kc29gfh3dketwscsq0y07ypsylk50yj0jx284764vtkwlnpx2czerks7t6mry4h0axcpmazk8l",
"btcFee": 4e-8,
"btcAmount": 0.00001002,
"fee": 0,
"amount": 0.4
}
}
Last updated on