---
title: "Refund a deposit"
method: POST
path: "/deposits/{id}/refund"
tags: ["Processing"]
---

# Refund a deposit

`POST /deposits/{id}/refund`

## Request

- Base URL: `https://v1.orchestrator.rhinestone.dev/deposit-processor`
- URL: `https://v1.orchestrator.rhinestone.dev/deposit-processor/deposits/{id}/refund`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/rhinestonewtf/apis/deposit-service-api/docs/deposits/:id/refund/post.ts> (a function with typed inputs; its response is checked against the schema)

Returns deposit funds to a specified address on the source chain.

## Path parameters

- `id` string, required: Deposit id. Returned by GET /deposits.

## Headers

- `x-api-key` string: API key for authentication

## Request body

- RefundDepositByIdRequestBody
  - `recipient` string, required: Address to receive the refunded tokens (EVM address or Solana public key). Must not be the address the deposit is already held at.

## Response `200`

Deposit refunded successfully

- RefundDepositResponse
  - `message` string, required
  - `transactionHash` string, required
  - `amount` string, required

## Other responses

- `400`: Invalid deposit id or recipient, or deposit not eligible for refund
- `401`: Authentication required or invalid
- `403`: Unauthorized - credential does not belong to the client that registered the account, or API key lacks write scope
- `404`: Deposit not found or not owned by the caller
- `409`: An earlier Solana or EVM submission of this deposit may still be settling or already moved its funds; refund refused until reconciled
- `500`: Refund transfer failed
- `503`: Settlement evidence for a Solana or EVM deposit is unavailable; retry later (see Retry-After)

## Changes

- **2026-11-06** `aa1767d704fa`: 3 info
  - the endpoint scheme security `internalProjectBearer` was added to the API
  - the endpoint scheme security `tenantApiKey` was added to the API
  - the `header` request parameter `x-api-key` became optional
- **2026-09-30** `a6fd693c3d5f`: 2 info
  - added the non-success response with the status `409`
  - added the non-success response with the status `503`
- **2026-09-17** `676300ac19ff`: 5 info
  - added the optional property `code` to the response with the `400` status
  - added the optional property `code` to the response with the `401` status
  - added the optional property `code` to the response with the `403` status
  - added the optional property `code` to the response with the `404` status
  - …1 more
- **2026-09-11** `b49146029e5a`: 1 breaking, 1 warning
  - the `header` request parameter `x-api-key` became required
  - deleted the `header` request parameter `authorization`
- **2026-08-11** `bb8db07d1791`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/rhinestonewtf/apis/deposit-service-api/changes/deposits/:id/refund/post.md)

---

[API](https://skmtc.dev/rhinestonewtf/apis/deposit-service-api.md) - [All operations](https://skmtc.dev/rhinestonewtf/apis/deposit-service-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rhinestonewtf/apis/deposit-service-api/revisions/aa1767d704fa?raw)
