Refund a Crypto Deposit
Requests the return of a crypto deposit that arrived at one of your customers’ deposit addresses and matched no off-ramp order — the ones listed by GET /customers/{customerId}/refundableCryptoDeposits/.
Whether the request must name a destination is given by refundDestinationRequired on the listed deposit: true means refundAddress is required — unlike the order-rooted endpoint there is no order that could already carry one — and false means the crypto returns to the on-chain origin address and refundAddress is rejected with 20074.
The request only registers the refund: Ripio reviews it before anything is sent on-chain, so 202 means “queued for review”, not “sent”. It is idempotent: 202 when the refund is registered, 200 when one already owns the deposit.
The response names the refund, not an order: keep the refundId and follow it through latestRefund on the deposit. Registering, approving and rejecting are all silent; only a completed refund emits an event, OFF-RAMP.DEPOSIT.REFUNDED (see Off-Ramp Events). Its payload carries the hash of the crypto that came in — read refundedTxnHash on the deposit for the hash of what went back.
Deposits whose order was cancelled are refunded through the order instead, with POST /customers/{customerId}/transactions/offramp/{orderId}/refund/.
See Refunds for the full model.
Authorizations
Access token obtained via /oauth2/token/. Use as Authorization: Bearer <access_token>.
Path Parameters
Unique identifier for the customer.
Unique identifier for the crypto deposit.
Body
Body of a refund request for a crypto deposit with no order. Send refundAddress when the deposit's refundDestinationRequired is true; omit it when it is false.
On-chain address the crypto is returned to. Required when refundDestinationRequired is true: there is no order that could already carry an address. Rejected when the account is configured to refund to the deposit's origin address.
10 - 255"0x2f318C334780961FB129D2a6c30D0763d9a5C970"
Response
A refund already owns this deposit; nothing new was created.
Acknowledgement of the refund request for a crypto deposit with no order. Shaped differently from the order-rooted CryptoRefundResponse: there is no order to name, and you need the refundId to follow the refund through latestRefund on the deposit.
Unique identifier of the refund.
State of the refund at the moment of the response. PENDING on a newly registered one: nothing has been sent on-chain yet.
PENDING, PROCESSING, COMPLETED, REJECTED, FAILED Identifier of the deposit being refunded.