Skip to main content
POST
Refund a Crypto Deposit
Crypto refunds are an opt-in feature that must be enabled for your account by the Ripio team. While it is disabled, every request returns 403 Forbidden with the error code 20072 (CryptoRefundNotEnabledException).

Authorizations

Authorization
string
header
required

Access token obtained via /oauth2/token/. Use as Authorization: Bearer <access_token>.

Headers

X-Ripio-User-Ip
string

Optional. The public IP address of the end user's device (IPv4 or IPv6), captured on your frontend and forwarded by your backend — never your server's own address. Used for traceability and fraud prevention. An address that is not a valid IPv4 or IPv6 discards the end-user context of the request, without failing it. See Forwarding end-user context.

Maximum string length: 45
X-Ripio-User-Agent
string

Optional. The User-Agent of the end user's browser or app, not your backend's HTTP client. Longer values are truncated to 500 characters. See Forwarding end-user context.

Maximum string length: 500
X-Ripio-User-Device-Id
string

Optional. A stable identifier of the end user's device, as your app or frontend defines it. Longer values are truncated to 200 characters. See Forwarding end-user context.

Maximum string length: 200

Path Parameters

customerId
string<uuid>
required

Unique identifier for the customer.

depositId
string<uuid>
required

Unique identifier for the crypto deposit.

Body

application/json

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.

refundAddress
string

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.

Required string length: 10 - 255
Example:

"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.

refundId
string<uuid>

Unique identifier of the refund.

status
enum<string>

State of the refund at the moment of the response. PENDING on a newly registered one: nothing has been sent on-chain yet.

Available options:
PENDING,
PROCESSING,
COMPLETED,
REJECTED,
FAILED
depositId
string<uuid>

Identifier of the deposit being refunded.