---
title: "Return a deposit to its sender"
method: POST
path: "/v1/deposits/{depositId}/refund"
tags: ["Refunds"]
---

# Return a deposit to its sender

`POST /v1/deposits/{depositId}/refund`

## Request

- Base URL: `https://api.sandbox.alfredpay.io`
- URL: `https://api.sandbox.alfredpay.io/v1/deposits/{depositId}/refund`
- Auth: one of:
  - HTTP bearer
  - API key in header `api-key` and API key in header `api-secret`

Requests that the funds go back to whoever sent them. Only valid while the deposit hasn't reached a terminal state.

There's no amount. A refund unwinds the whole parent or none of it.

**Wait on** `refund.updated`. See [Webhooks and events](/docs/webhooks-and-events).

## Headers

- `Idempotency-Key` string, uuid, required

## Response `202`

Accepted

- RefundAction
  - `actionId` string
  - `actionType` 'REFUND'
  - `parentTransactionId` string
  - `status` 'REQUESTED' | 'PROCESSING' | 'COMPLETED' | 'DECLINED'
  - `parentOutcome` 'CANCELLED' | 'null', nullable: The parent lands CANCELLED whether unwound pre-execution or returned after a leg went out.
  - `createdAt` string, date-time
  - `updatedAt` string, date-time

## Other responses

- `409`: `parent_terminal`: the transaction has reached COMPLETE, FAILED, CANCELLED or BLOCKED. No action reaches back into it; recovering value is a new transaction.

## Changes

- **2026-11-03** `20fef4fd2ab3`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/alfredpay/apis/alfred-penny-api-client-documentation/changes/v1/deposits/:depositId/refund/post.md)

---

[API](https://skmtc.dev/alfredpay/apis/alfred-penny-api-client-documentation.md) - [All operations](https://skmtc.dev/alfredpay/apis/alfred-penny-api-client-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/alfredpay/apis/alfred-penny-api-client-documentation/revisions/20fef4fd2ab3?raw)
