Overview
Spark Invoices provide:- Sats & Token Support - Request payment in Bitcoin or any Spark token
- Optional Amounts - Create invoices with or without a preset amount
- Expiration - Set custom expiry times for invoices
- Signature Verification - Cryptographically signed by the receiver
- Batch Payments - Fulfill multiple invoices in a single call
Spark invoices are receiver-generated and receiver-signed. The receiver must create the invoice for signature validation.
Create a Sats Invoice
Request a Bitcoin payment using a Spark invoice.createSatsInvoice(params)
Creates a Spark invoice for receiving Bitcoin.
Create a Token Invoice
Request a token payment using a Spark invoice.createTokensInvoice(params)
Creates a Spark invoice for receiving tokens.
Fulfill Spark Invoices
Pay one or more Spark invoices.fulfillSparkInvoice(params)
Fulfills Spark invoices. Supports batch payments with a mix of sats and token invoices.
fulfillSparkInvoice can process multiple invoices in a single call, including a mix of sats and token invoices for different assets.Query Spark Invoices
Check the status of Spark invoices.querySparkInvoices(invoices)
Query the status of one or more Spark invoices.
Invoice Format
Spark invoices are Bech32m-encoded strings that contain:- Network identifier - Derived from the HRP (human-readable prefix)
- Receiver’s identity public key - Who will receive the payment
- Payment type - Sats or tokens (with token identifier)
- Amount - Optional preset amount
- Memo - Optional description
- Expiry - Optional expiration time
- Signature - BIP340 Schnorr signature from the receiver