SparkWallet.
Save the returned request id and invoice.paymentHash for reconciliation. When creating an invoice for another receiver, keep the requesting wallet identity available for future lookups and register webhooks on that wallet. See payment correlation.
Method Signature
Parameters
Amount in satoshis to receive. Use
0 for zero-amount invoices. Must be a safe integer (less than 2^53).Optional memo/description for the invoice (max 639 characters). Cannot be used together with
descriptionHash.Whether to embed Spark address in the invoice fallback field. Mutually exclusive with
includeSparkInvoice. Note: If the payer uses the fallback address instead of Lightning, the payment cannot be correlated to this invoice—it appears as a separate Spark transfer.Whether to include a Spark invoice in the invoice routing hints. Mutually exclusive with
includeSparkAddress. When enabled, allows payers to seamlessly pay over Spark if they support it.SHA256 hash of the description for BOLT11 description_hash field. Cannot be used together with
memo.Returns
The Lightning receive request object containing:
id: Unique identifier for the requestinvoice: Invoice object withencodedInvoice,paymentHash,amount, etc.status: Request statuscreatedAt,updatedAt: Timestamps
Access the BOLT11 invoice string via
request.invoice.encodedInvoice.