Pay: refunds
Prepare a refund
/v1/refundsReturns the token transfer the merchant signs and sends from their own wallet; Aicscan never
moves funds. to_address is the address provided by the payer, on the invoice chain: the
sender address of a payment is never offered by default (it is often an exchange hot wallet).
Warnings: origin_address (the address sent a payment of this invoice), exchange_address
(labelled as an exchange). The amount is capped at the amount received minus refunds already
prepared (refund_exceeds_received). The platform fee is not refunded.
- Safe to retry with the Idempotency-Key header: see Idempotency.
Headers#
Idempotency-KeystringrequiredRequired on every Pay POST; makes it safe to retry for 24 hours. Scoped to the key's environment.
Request body#
invoice_idstring · uuidrequiredto_addressstringrequiredRefund address provided by the payer (
0x…, orT…on TRON).amountstringrequiredNative units of the invoice token.
Responses#
Object fields
amountstringNative units, e.g.
12500000for 12.5 USDT with 6 decimals.amount_formattedstringdecimalsintegeridstring · uuidobjectstringenvironmentstringinvoice_idstring · uuidnullablechain_idintegertokenstringnullableto_addressstringstatusstringtx_hashstringnullablewarningsarray of stringcreated_atstring · date-timeupdated_atstring · date-timeexchange_labelstringnullablenoticestringtransactionobjectERC-20 / TRC-20
transfer(to, amount)to sign from the merchant's wallet.Object fields
chain_idintegertostringToken contract.
valuestringdatastringCalldata,
0xa9059cbb….function_selectorstringTRON only (TronWeb
triggerSmartContract).parameterstringTRON only: ABI-encoded parameters, hex without selector.
Standard error format: see Errors.