Pay a Lightning invoice
Pretends a customer's wallet paid this invoice. The wallet is credited the
invoice's USD amount and any quote it was minted for is settled, exactly as a
real payment would. Only a pending invoice can be paid.
invoice_id is the invoice's lni_ id: id on an invoice from
POST /v1/wallet/lightning_invoices, or payment.lightning.id on a quote with
payment_source: lightning. A bolt11 or payment_hash is
404 invoice_not_found.
Authorization
ApiKey An account API key, sent as Authorization: Bearer tz_live_…. The prefix
selects the mode: tz_test_ for sandbox, tz_live_ for real money.
In: header
Path Parameters
^lni_[0-9A-HJKMNP-TV-Z]{26}$Header Parameters
A client-generated key, unique per intended operation, that makes this request
safe to retry. The same key returns the original response; the same key with a
different request is rejected. Missing: 400 idempotency_key_required.
1 <= length <= 255Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/test_helpers/lightning_invoices/string/pay" \ -H "Idempotency-Key: string"{ "id": "string", "object": "deposit", "rail": "crypto", "status": "detected", "amount": { "amount": 1450, "currency": "USD" }, "asset": "USDT", "network": "bep20", "raw_amount": "50.00", "tx_hash": "string", "reference": "string", "received": { "amount": "80000.00", "currency": "NGN", "rate": "1600.00" }, "created_at": "2019-08-24T14:15:22Z", "credited_at": "2019-08-24T14:15:22Z"}