Skip to content

The payment object

Returned by every payment endpoint called with your secret key, and sent as data in webhooks.

{
"object": "payment",
"id": "pay_01K8Z3M0Q4V7Y2B9C6D1E5F8G3",
"payment_id": "order_1001",
"livemode": true,
"source": "api_checkout",
"status": "settled",
"amount": "25.00",
"currency": "USD",
"checkout_url": "https://pay.unizpay.com/pay_01K8Z3…#cs_…",
"checkout_token": "cs_…",
"expires_at": "2026-10-31T13:00:00.000Z",
"max_conversion_bps": null,
"underpay_tolerance": null,
"fee_payer": null,
"underpaid_at": null,
"underpaid_accepted_at": null,
"accepted_tokens": null,
"created_at": "2026-10-31T12:00:00.000Z",
"description": "Order #1001",
"success_url": "https://shop.example.com/orders/1001",
"cancel_url": null,
"metadata": { "customer_id": "c_123" },
"deposit_addresses": [
{
"token": "USDC",
"network": "polygon",
"network_name": "Polygon",
"chain_id": "eip155:137",
"address": "0x5b1C…9e40",
"explorer_url": "https://polygonscan.com/address/0x5b1C…9e40",
"pay_amount": "25",
"quote_expires_at": "2026-10-31T13:01:12.000Z",
"processing_fee": "0.00",
"price_locked": false,
"window_seconds": 3600
}
],
"deposits": [
{
"token": "USDC",
"amount": "25",
"tx_hash": "0x9a3f…",
"explorer_url": "https://polygonscan.com/tx/0x9a3f…",
"network": "polygon",
"from": "0x71C2…",
"status": "final",
"detected_at": "2026-10-31T12:03:12.000Z"
}
],
"settlements": [
{
"kind": "sweep",
"status": "succeeded",
"tx_hash": "0x4c8e…",
"explorer_url": "https://polygonscan.com/tx/0x4c8e…",
"destination_tx_hash": null,
"destination_explorer_url": null,
"created_at": "2026-10-31T12:03:20.000Z",
"token": "USDC",
"net": "24.894",
"platform_fee": "0.1",
"fee_token": "USDC",
"network_cost": "0.006"
}
]
}
FieldTypeDescription
objectstringAlways "payment"
idstringUnizPay’s id (pay_…)
payment_idstringYour reference, unique per mode
livemodebooleantrue in live mode
sourcestringpayment_link (made in the dashboard), api_checkout (paid on the hosted page), api_headless (paid in your UI), or api (no address requested yet)
statusstringSee Payment lifecycle
amountstringPrice in USD, for example "25.00"
currencystringAlways "USD"
checkout_urlstringHosted payment page, with the checkout token in the fragment
checkout_tokenstringPayment-scoped token for payer-facing pages (cs_…)
expires_atstring | nullLast moment to request a deposit address; null never expires
max_conversion_bpsinteger | nullPer-payment override; null uses your payment defaults
underpay_tolerancestring | nullPer-payment override in USD; null uses your payment defaults
fee_payerstring | nullmerchant or payer; null uses your payment defaults
underpaid_atstring | nullWhen the payment became underpaid
underpaid_accepted_atstring | nullWhen an underpaid payment was accepted
accepted_tokensobject | nullTokens offered on the hosted page for this payment; null uses your accepted tokens
created_atstringCreation time
descriptionstring | nullShown to the payer
success_urlstring | nullWhere the hosted page sends the payer after paying
cancel_urlstring | nullWhere the hosted page sends a payer who leaves
metadataobjectYour key-value data; never shown to the payer
deposit_addressesarrayAddresses issued for this payment (below)
depositsarrayTransfers received (below)
settlementsarrayPayout transactions (below)
FieldTypeDescription
tokenstringToken to send, for example "USDC"
networkstringNetwork name, for example "polygon"
network_namestringDisplay name, for example "Polygon"
chain_idstringCAIP-2 chain id
addressstringThe deposit address
explorer_urlstringThe address on the network’s block explorer
pay_amountstringAmount of token to send, fees included
quote_expires_atstringEnd of the window to pay at this address
processing_feestringUSD added to the price when the payer pays the fees; "0.00" otherwise
price_lockedbooleantrue for tokens whose price moves: the amount is a 15-minute quote
window_secondsintegerLength of the window from when the address was issued
FieldTypeDescription
tokenstringToken received
amountstringAmount received
tx_hashstringTransaction that sent it
explorer_urlstringThe transaction on the block explorer
networkstringNetwork name
fromstring | nullSender address
statusstringdetected, confirmed, final, or reorged (dropped by a chain reorganization; not counted)
detected_atstringWhen it was first seen
FieldTypeDescription
kindstringsweep (same token), swap (converted on the same network), bridge (delivered to another network), raw (delivered unconverted to your fallback)
statusstringpending, submitted, bridging, succeeded, refunded (a cross-network delivery was refunded to the source network), or failed
tx_hashstring | nullThe settlement transaction
explorer_urlstring | nullThat transaction on the block explorer
destination_tx_hashstring | nullCross-network only: the delivery (or refund) transaction
destination_explorer_urlstring | nullThat transaction on the block explorer
created_atstringWhen settlement started
tokenstring | nullToken delivered to you
netstring | nullAmount delivered to you
platform_feestring | nullThe $0.10 platform fee, in fee_token
fee_tokenstring | nullToken of platform_fee and network_cost (for cross-network deliveries, the token on the source network)
network_coststring | nullGas cost passed through at cost, in fee_token