Coinfat

Invoices

The Invoice object

An invoice represents a single payment request in your settlement currency, with a hosted checkout URL and a lifecycle you track by webhook or polling.

Attributes

PropertyTypeDescription
ulidstringThe invoice id. Use it to retrieve the invoice.
checkout_urlstring (uri)Hosted checkout URL. Redirect your customer here to pay.
statusenumpending, completed, expired, or canceled.
currencyCurrencyYour settlement currency: the currency the amount is priced in.
amountmoneyThe invoice amount: an object with amount, currency (the code string), and scale.
supported_walletsWallet[]The coins you allowed for this invoice.
active_paymentPayment | nullThe payer's selected-coin payment once chosen. A redirect integration can ignore it.
referencestring | nullYour order reference, echoed back for reconciliation.
descriptionstring | nullYour invoice description.
customer_emailstring | nullThe customer's email.
customer_namestring | nullThe customer's name.
metadataobject | nullYour flat string map, echoed back.
success_urlstring | nullWhere the customer returns after paying.
cancel_urlstring | nullWhere the customer returns if they abandon checkout.
expires_atdatetimeWhen the pending invoice expires.
completed_atdatetime | nullSet when the invoice is paid in full.
canceled_atdatetime | nullSet when the invoice is canceled.
created_atdatetimeWhen the invoice was created.
updated_atdatetimeWhen the invoice last changed.

The Payment object

active_payment holds the payer's selected-coin payment once they pick a coin at checkout. A redirect integration can ignore it and rely on webhooks for the final status.

PropertyTypeDescription
ulidstringThe payment id.
statusenumLifecycle status of the selected-coin payment.
walletWalletThe coin the customer chose to pay in.
wallet_networkWalletNetworkThe network the payment is made on.
addressstring | nullThe pay-to address shown at checkout.
deposit_uristring | nullA chain-correct, wallet-scannable payment URI pre-filled with the address and expected amount, the content to encode in a QR. null until a coin is selected; a bare address on chains without a URI standard.
qr_code_urlstring (uri) | nullA ready-made QR image URL that already encodes deposit_uri. null when deposit_uri is. A backend-hosted convenience. Prefer generating your own QR from deposit_uri.
expected_valuecoinThe coin amount the customer must send.
received_valuecoinThe coin amount received so far.
overpaidbooleanWhether more than expected was received.
overpaid_valuecoinThe amount received above the expected value.
detected_atdatetime | nullWhen the payment was first detected on-chain.
rate_expires_atdatetimeWhen the locked exchange rate expires.
fee_valuecoinThe network fee applied to the payment.

Example

Invoice
{
"ulid": "01JZ8Q5F2H7T9K1M3N5P7R9S1U",
"checkout_url": "https://coinfat.com/checkout/01JZ8Q5F2H7T9K1M3N5P7R9S1U",
"status": "completed",
"currency": {
"code": "USD",
"name": "US Dollar",
"is_default": true,
"is_active": true,
"is_base": false,
"exchange_rate": 1,
"exchange_type": "auto"
},
"amount": { "amount": "49.99", "currency": "USD", "scale": 2 },
"supported_wallets": [
{ "id": "btc", "name": "Bitcoin", "symbol": "BTC", "scale": 8 }
],
"active_payment": {
"ulid": "01JZ8QN0P2R4T6V8X0Z2B4D6F8",
"status": "completed",
"wallet": { "id": "btc", "name": "Bitcoin", "symbol": "BTC", "scale": 8 },
"wallet_network": { "id": "bitcoin", "name": "Bitcoin" },
"address": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
"deposit_uri": "bitcoin:bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh?amount=0.00075",
"qr_code_url": "https://api.qrserver.com/v1/create-qr-code/?data=bitcoin%3Abc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh%3Famount%3D0.00075",
"expected_value": { "amount": "0.00075", "wallet": "btc" },
"received_value": { "amount": "0.00075", "wallet": "btc" },
"overpaid": false,
"overpaid_value": { "amount": "0", "wallet": "btc" },
"detected_at": "2026-07-07T14:20:00.000000Z",
"rate_expires_at": "2026-07-07T14:30:00.000000Z",
"fee_value": { "amount": "0.00001", "wallet": "btc" }
},
"reference": "ORDER-10231",
"description": null,
"customer_email": null,
"customer_name": null,
"metadata": { "order_id": "10231" },
"success_url": "https://shop.example.com/orders/10231/success",
"cancel_url": "https://shop.example.com/orders/10231/cancel",
"expires_at": "2026-07-07T15:00:00.000000Z",
"completed_at": "2026-07-07T14:20:05.000000Z",
"canceled_at": null,
"created_at": "2026-07-07T14:00:00.000000Z",
"updated_at": "2026-07-07T14:20:05.000000Z"
}