Skip to content
Bare BitcoinDevelopers

Search documentation

↑ ↓ Select · Enter Open · Escape Close

barebitcoin.no ↗
Menu

API reference / Bitcoin transfers

Get Lightning invoice

Fetches a Lightning invoice the user created, and whether it is paid.

View Markdown

GET https://api.bb.no/v1/deposit-destinations/bitcoin/invoice/{id}

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:read
Authentication guide →

MCP

Also available as the MCP tool get_lightning_invoice, which takes the parameters below as its arguments.

MCP server guide →

Parameters

idpath · string · required

Can be: 1. Deposit destination ID. Prefix: `ded_`. 2. The Lightning invoice itself.

Responses

200 · OK

application/json
GetLightningInvoiceResponse
Show fields
depositDestinationIdstring

Example: "ded_01JA3QW7E2R9T4Y6V8P0S1D3F5"

invoicestring

Example: "lnbc2500u1pvjluezsp5zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zygspp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqypqdq5xysxxatsyp3k7enxv4jsxqzpu9qrsgquk0rl77nj30yxdy8j9vdx85fkpmdla2087ne0xh8nhedh8w27kyke0lp53ut353s06fv3qfegext0eh0ymjpf39tuven09sam30g4vgpfna3rh"

statusstring · enum

Values: INVOICE_STATUS_UNPAID, INVOICE_STATUS_PENDING, INVOICE_STATUS_PAID, INVOICE_STATUS_EXPIRED, INVOICE_STATUS_CANCELED

Example: "INVOICE_STATUS_PAID"

expiresAtstring · date-time

When the invoice stops being payable. This is the expiry encoded into the invoice itself, so a payer's wallet enforces it too.

Example: "2026-07-04T10:15:00Z"

amountReceivedMillisatoshistring

The amount the payer sent, in millisatoshis. Set only when the invoice is paid. It is never less than the amount encoded in the invoice, but can be more: Lightning nodes accept overpayment.

Example: "250000000"

paidAtstring · date-time

When the invoice was paid. Set only when the invoice is paid.

Example: "2026-07-04T10:02:31Z"

preimagestring

The payment preimage, hex encoded. Its SHA-256 hash is the payment hash encoded in the invoice, so it is proof of payment. Set only when the invoice is paid.

Example: "0001020304050607080900010203040506070809000102030405060708090102"