Embedded Checkout
Select a coin
Choose the coin and network the payer will use, and get back the deposit address and locked quote.
POST/api/invoices/{invoice}/paymentinvoices:write
Body parameters
| Property | Type | Description |
|---|---|---|
| wallet_network_idrequired | string | An active network within the invoice's supported coins. Discover valid ids from the List payable coins endpoint. |
Response
Returns the invoice with active_payment populated:
address: the deposit address the payer sends to.expected_value: the exact coin amount to send.deposit_uri: a chain-correct payment URI to encode in a QR (see below), ornull.qr_code_url: a hosted QR image encodingdeposit_uri, ornull.wallet_network: the selected network.rate_expires_at: when the locked quote lapses.- Live status fields:
status,received_value,overpaid, anddetected_at.
Notes
The coin can only be switched before the first payment is detected. Switching after detection returns 422 (coin locked). Selecting a coin on an expired or finalized invoice also returns 422.
For the deposit QR, encode deposit_uri verbatim (it already carries the address and amount), or drop in qr_code_url as an image. Keep address and expected_value.amount as copyable text alongside it, and re-read after a requote so the encoded amount stays current.
bash
curl https://api.coinfat.com/api/invoices/01JZ8Q5F2H7T9K1M3N5P7R9S1U/payment \-H "Authorization: Bearer 42|nX9...secret" \-H "Content-Type: application/json" \-d '{ "wallet_network_id": "tron" }'
200 OK
{"ulid": "01JZ8Q5F2H7T9K1M3N5P7R9S1U","status": "pending","amount": { "amount": "49.99", "currency": "USD", "scale": 2 },"active_payment": {"ulid": "01JZ8QN0P2R4T6V8X0Z2B4D6F8","status": "pending","wallet": { "id": "usdt", "name": "Tether", "symbol": "USDT", "scale": 6 },"wallet_network": { "id": "tron", "name": "Tron (TRC20)" },"address": "TQ5aBcD...payer-sends-here","deposit_uri": "TQ5aBcD...payer-sends-here","qr_code_url": "https://api.qrserver.com/v1/create-qr-code/?data=TQ5aBcD...payer-sends-here","expected_value": { "amount": "50.12", "wallet": "usdt" },"received_value": { "amount": "0", "wallet": "usdt" },"overpaid": false,"detected_at": null,"rate_expires_at": "2026-07-07T14:15:00.000000Z"}}