API Reference
Lightning
Get Invoice [GET]

Get Invoice

https://sandboxapi.bitnob.co/api/v1/wallets/ln/getinvoice (opens in a new tab)

Getting Lightning invoice data by Id


Body Parameters

ParametertypeRequired
Id Defaults to 1b7605e0cdfe8b0267f....
ID of Invoice generated
string
rrequest Defaults to lntb1u1pse2vxhpp5string

Request

Lightning/ Get Invoice [POST]
curl --request POST \
     --url https://sandboxapi.bitnob.co/api/v1/wallets/ln/getinvoice \
     --header 'Authorization: Bearer API-KEY' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "Id": "1b7605e0cdfe8b0267fe377f5ecb7d068375b551e4a626880e668e1aec23bf64",
  "request": "lntb1u1pse2vxhpp5hw4l0msdlygst76alskjw94uctz3knm33jk9ehk45lr5v539dyksdpsd4hkueteypehgmmswvsxummwwdjkuum9yphkugrnw4hxgctecqzpgxqr23sfppqvfsa58c3pvnsqhtecj78saj4vn79hlvjsp5grumqunpsz8mej3jezqa88g9wgsnw6sa40dtnlv4k9rufg4gaf2s9qyyssqmsy3r8xya7nxuwkvhr9vjdrummqc5vukva2e7v6gjhnfy9awvxdsys0juxstatgvp0eyhmqq32zqgc9muf7jvt037fttpfhqt9m0f8sp2wrv5m"
}
'

Responses

🟢 200 - Result example
{
"status": true,
"message": "lightning invoice successfully retrieved",
"data": {
  "chain_address": "tb1qh4rqy3muaufpmzcfyhpqy8ase4gjsmvt9stlep",
  "cltv_delta": 40,
  "created_at": "2021-07-28T23:26:50.000Z",
  "description": "money stops nonsense on sunday",
  "expires_at": "2021-07-29T02:26:50.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": "1b7605e0cdfe8b0267fe377f5ecb7d068375b551e4a626880e668e1aec23bf64",
  "index": 15,
  "is_confirmed": false,
  "is_private": false,
  "mtokens": "1000000",
  "payment": "c5268bfdbb91ecf01d3fafe392311d2d0afa22a93d84eedf415c1561abf14be3",
  "payments": [],
  "received": 0,
  "received_mtokens": "0",
  "request": "lntb10u1pssrea6pp5rdmqtcxdl69syel7xal4ajmaq6phtd23ujnzdzqwv68p4mprhajqdpsd4hkueteypehgmmswvsxummwwdjkuum9yphkugrnw4hxgctecqzpgxqr23sfppqh4rqy3muaufpmzcfyhpqy8ase4gjsmvtsp5c5nghldmj8k0q8fl4l3eyvga95905g4f8kzwah6pts2kr2l3f03s9qyyssqj5lz3wlas54kfh2dhnk3d5xz5j8d2t4ym963kc29gfh3dketwscsq0y07ypsylk50yj0jx284764vtkwlnpx2czerks7t6mry4h0axcpmazk8l",
  "secret": "5d0a65b5c211a35a2b510ca04ffcc2fb15f70bbe63d92e51e13fa897b39e4c59",
  "tokens": 1000
}
}