Invoices
Generate invoices and read incoming transactions.
Last updated
Generate invoices and read incoming transactions.
Last updated
Your bitcoin & nostr companion / from 🐝 with 🧡
Scope needed: invoices:create
Creates a new invoice to receive lightning payments.
POST
https://api.getalby.com/invoices
Creates a new invoice
Name | Type | Description |
---|---|---|
Looking to create invoices for a lightning address without requiring scope? Try our Lightning Address details API which uses the LNURL protocol.
Scope needed: invoices:read
Lists all settled incoming invoices, including boostagram and LNURL metadata.
GET
https://api.getalby.com/invoices/incoming
Lists all incoming invoices
Scope needed: transactions:read
Lists all settled outgoing invoices, including boostagrams information.
GET
https://api.getalby.com/invoices/outgoing
Lists all outgoing invoices
Scope needed: invoices:read
Combination of incoming and outgoing invoice histories. Possible query parameters are the same as above.
GET
https://api.getalby.com/invoices
Scope needed: invoices:read
Get details about specific invoice. Can be both incoming or outgoing.
Unsettled invoices can only be retrieved if they were created through the Alby API or Nostr Wallet Connect (using https://nwc.getalby.com/). Unsettled Invoices created directly using the Lndhub API will return a 404.
GET
https://api.getalby.com/invoices/{payment_hash}
Get details about specific invoice. Can be both incoming or outgoing
Decode an invoice. Will also add the alias of the receiving node & route hints (LSP's).
GET
https://api.getalby.com/decode/bolt11/{bolt11_invoice}
Will also add the alias of the receiving node & route hints (LSP's).
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
description_hash
String
Pass a hash of the description instead of the description (for private or long descriptions)
amount*
int64
amount, must be a whole number in sats (millisats are not supported).
description
String
Arbitrary text (included in the BOLT11 invoice)
currency
String
currency of the invoice. Default is "btc"
memo
String
same as "description" field.
comment
String
Arbitrary text to save alongside the invoice (not included in the BOLT11 invoice)
metadata
Object
Arbitrary data to save alongside the invoice (not included in the BOLT11 invoice)
payer_name
String
Name of payer (not included in the BOLT11 invoice)
payer_email
String
Email of payer (not included in the BOLT11 invoice)
payer_pubkey
String
Nostr or node pubkey of payer to store with the invoice (not included in the BOLT11 invoice)
q[created_at_gt]
Int
Filter invoices created after this Unix Timestamp in UTC (e.g. 1681992321)
q[created_at_lt]
Int
Filter invoices created before this Unix Timestamp in UTC (e.g. 1681992321)
q[since]
String
Filter invoices created after the given invoice identifier
page
Int
Page number (1 is the first page)
items
Int
Items per page (Default 25)
q[before]
String
Filter invoices created before the given invoice identifier
q[since]
String
Filter invoices created after the given invoice identifier
q[created_at_lt]
Int
Filter invoices created before this Unix Timestamp in UTC (e.g. 1681992321)
q[created_at_gt]
Int
Filter invoices created after this Unix Timestamp in UTC (e.g. 1681992321)
page
Int
Page number (1 is the first page)
items
Int
Items per page (Default 25)
q[before]
String
Filter invoices created before the given invoice identifier
q[since]
String
Filter invoices created after the given invoice identifier
q[created_at_lt]
Int
Filter invoices created before this Unix Timestamp in UTC (e.g. 1681992321)
q[created_at_gt]
Int
Filter invoices created after this Unix Timestamp in UTC (e.g. 1681992321)
page
Int
Page number (1 is the first page)
items
Int
Items per page (Default 25)
q[before]
String
Filter invoices created before the given invoice identifier
payment_hash*
String
The payment hash of the payment
bolt11_invoice*
String
Needs to be a valid bolt11