Menu
API reference / Bitcoin transfers
Create Lightning invoice
Creates a new BOLT11 Lightning invoice. Lightning invoices are requests to receive a specific amount of bitcoin within a set amount of time. If you don't need a specific amount, consider using the destinations returned from /v1/deposit-destinations/bitcoin.
POST https://api.bb.no/v1/deposit-destinations/bitcoin/invoice
Authentication
API key
Send x-bb-api-key. No nonce or signature is required.
OAuth
Send an access token in Authorization: Bearer.
Required scopes:
api:deposits:lightning:writeParameters
No path or query parameters.
Request body
A request body is required.
application/json
Show fields
accountIdstringif empty, the default account is used.
Example: "acc_01HQZX3V9KJ4M2P8R6T0W5Y7BC"
currencystring · enumThe currency the invoice is denominated in. Once created, the invoice is for a specific amount of bitcoin.
Values: CURRENCY_BTC, CURRENCY_NOK
Example: "CURRENCY_NOK"
amountnumber · doubleThe amount of the invoice, in the requested currency. Setting to 0 creates an invoice where any amount is accepted.
Example: 2620
publicDescriptionstringPublic description of the invoice. The invoice commits to it through its description hash; the memo field is left empty, so most wallets do not show it to the payer.
Example: "Kaffe og kanelbolle"
internalDescriptionstringFree-form text description of the invoice. Can be used to correlate with your own systems. Only shown to the creator of this invoice, within the Bare Bitcoin systems.
Example: "faktura-1042"
Responses
200 · OK
application/jsonShow fields
depositDestinationIdstringExample: "ded_01JA3QW7E2R9T4Y6V8P0S1D3F5"
invoicestringExample: "lnbc2500u1pvjluezsp5zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zygspp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqypqdq5xysxxatsyp3k7enxv4jsxqzpu9qrsgquk0rl77nj30yxdy8j9vdx85fkpmdla2087ne0xh8nhedh8w27kyke0lp53ut353s06fv3qfegext0eh0ymjpf39tuven09sam30g4vgpfna3rh"