Lightning payments

With a Lightning address (like you@your-wallet.com), send21 can confirm Lightning payments without ever holding them. The invoice comes from the receiver's own wallet provider and pays the receiver directly.

How it works

  • The receiver gives a Lightning address, on a draft (receiverAddress with paymentMethod: "Lightning") or as a pay-link option (method: "Lightning").
  • When the payer is ready, send21 asks that address (LNURL-pay) for an invoice of the exact amount and checks the invoice's amount and network.
  • The payer scans the invoice with any Lightning wallet. The money goes straight to the receiver's wallet.
  • If the provider supports LUD-21, send21 polls its verify URL and confirms the payment once it returns a preimage that hashes to the invoice's payment hash. lightningConfirmable on the draft tells you in advance.

Limits

  • Not every Lightning wallet provider supports LUD-21. Without it the payment still works, and you confirm it with the proof of payment (below).
  • send21 cannot see a pasted BOLT11 invoice being paid. After paying, post the proof of payment (the 64-character preimage the paying wallet shows) to POST /drafts/{id}/lightning-proof. send21 checks that it hashes to the invoice's payment hash and confirms the draft. No on-chain address is needed for a pasted invoice.
  • Invoices expire; the rate lock ends with the invoice. Re-quote the draft for a fresh invoice.
  • An invoice cannot carry a fee output, so the send21 fee is billed to the creator's account and settled later. A pasted invoice carries no send21 fee.

Related

Start building

Create a free account to get an API key, or try the whole flow first on test networks.

This page is also available as Markdown: /docs/lightning.md. Questions: integration@send21.io.