ReferenceTest helpers
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.
Authorization
ApiKey AuthorizationBearer <token>
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
invoice_id*string
Match
^lni_[0-9A-HJKMNP-TV-Z]{26}$Header Parameters
Idempotency-Key*string
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.
Length
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"}