A request for funds on the Lightning Network, possibly including payment type, payment amount, expiry, and other information. This is how payments are made on the Lightning Network, rather than using Bitcoin-style addresses.
If you want to accept payments (on your site), look at Payment providers
- Someone creates an invoice
- Invoice is paid
- Payment is done!
Payment steps using LND command line
1. The Payee starts the process by creating an invoice note: The amount to send is always expressed in Satoshi (1 satoshi = .00000001 bitcoin) so in this example the payee creates an invoice for 50,000 satoshis (or .0005 bitcoin).
$ lncli addinvoice --amt 50000
2. The payee then sends the invoice to the payer, which decodes the invoice to verify the amount (see the 'data in invoice' below)
$ lncli decodepayreq <paste invoice here>
3. The payer then pays the invoice
$ lncli payinvoice <paste invoice here>
- That's it! Also note, the decodepayreq step can normally be skipped since when you pay the invoice you are prompted to confirm the amount before it is sent
Data in invoice
"destination": "03ab75012c0a552ddb0194f43d57d9af2a83a86cc2a96abf0134c6d9349819c8a8", "payment_hash": "8d54fb2afe6e35f36f3e6055fa062b2f3fd11e67b0d287618471477fde80f3a2", "num_satoshis": "0", "timestamp": "1546608429", "expiry": "3600", "description": "Lightning Network Tester", "description_hash": "", "fallback_addr": "", "cltv_expiry": "10", "route_hints": [ ]
Proof that payment has been received, held by the final recipient, who is the only person who knows this secret. The final recipient releases the preimage in order to release funds. The payment preimage is hashed as the payment hash in the HTLC.
Limits and maximum size
- Max payment allowed is 0.04294967 BTC (lnd)
- The payment may take 1 route only, until AMP is implemented.
BOLT11 has more