Refund a failed deposit
Transfer the funds from a failed deposit back to a user-provided address on the same chain. Authenticate with an x-api-key (write scope) or a Bearer platform token; the credential must belong to the client that registered the account. On a supported chain the deposit must already be failed or rejected; if no such deposit exists the call returns 400 (a deposit still being processed is not refundable). On a chain this service does not take deposits from (deposit: false on /chains), where no deposit record can ever be created, the deposit is instead reconstructed from the on-chain transaction receipt — the receipt must show that txHash credited account with token, or the same 400 is returned.
Headers
API key for authentication (omit when sending Authorization)
API key for authentication (omit when sending Authorization)
Bearer platform token (e.g. forwarded by user-service). Takes precedence over x-api-key when both are present.
Bearer platform token (e.g. forwarded by user-service). Takes precedence over x-api-key when both are present.
Request body
Example request
{
"chain": "eip155:8453",
"txHash": "0xabc123...",
"account": "0xde0fdf9c06b404cc5e20543cb84cac9067102f19",
"token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"recipient": "0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91"
}Response
Deposit refunded successfully