latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-193774225.7 KB

c9aa3f252e4f

Processing

Refund a failed deposit by id

Transfer the funds from a failed deposit back to a caller-provided address on the same chain, addressing the deposit by the stable id returned by GET /deposits. Authenticate with an x-api-key (write scope) or a Bearer platform token. Scoped to the caller's tenant: an unknown id and another tenant's id are both a 404. The deposit must be failed or rejected; operator-only states (ignored, delayed) are refundable through the admin endpoint only.

post/deposits/{id}/refund

Path parameters

idstring required

Deposit id. Returned by GET /deposits.

Example:12345

Deposit id. Returned by GET /deposits.

Headers

x-api-keystring

API key for authentication (omit when sending Authorization)

Example:your-api-key

API key for authentication (omit when sending Authorization)

authorizationstring

Bearer platform token (e.g. forwarded by user-service). Takes precedence over x-api-key when both are present.

Example:Bearer eyJhbGciOi...

Bearer platform token (e.g. forwarded by user-service). Takes precedence over x-api-key when both are present.

Request body

recipientstring required

Address to receive the refunded tokens (EVM address or Solana public key).

Example request

{
  "recipient": "0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91"
}

Response

Deposit refunded successfully

messagestring required
transactionHashstring required
amountstring required