> ## Documentation Index
> Fetch the complete documentation index at: https://docs.slash.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Refund

A refund returns some or all of a captured payment to the buyer. Refunds
are created against a payment intent and are processed asynchronously: a refund
starts as `pending`, moves to `processing`, and ends in a terminal `succeeded`
or `failed` state.

## Statuses

| Status       | Meaning                                                                                                                                                           |
| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `pending`    | The refund was accepted by `POST /payments/refund`. No money has moved yet.                                                                                       |
| `processing` | Slash has picked up the refund and is submitting it to the card network.                                                                                          |
| `succeeded`  | The refund was accepted by the card network. This is the terminal success state; when the funds appear on the buyer's statement is up to their bank.              |
| `failed`     | The refund was rejected and no money moved. The amount is released back to the payment's refundable balance, so you can retry with a new `POST /payments/refund`. |

## Creating refunds

[`POST /payments/refund`](/api-reference/refund-post) requires the
`paymentIntentId` to refund and the `amount` in the smallest unit of the
payment intent's currency. Refunds are always issued in the currency of the
original payment — you cannot pass a different one. You can refund all or
part of a payment by setting `amount` to the desired value. You can create
multiple partial refunds against the same payment; the total across all
refunds can never exceed the captured amount.

Refund creation supports [idempotent requests](/docs/payments/idempotent-requests)
via the optional `X-Idempotency-Key` header.

## Tracking refund state

Subscribe to the
[`payments.refund.created`](/docs/payments/webhooks/refund-created) and
[`payments.refund.updated`](/docs/payments/webhooks/refund-updated) webhooks
to be notified when a refund is created and on every status change, then read
the refund back with
[`GET /payments/refund/{refundId}`](/api-reference/refund-get-by-id).

If you cannot receive webhooks, poll
[`GET /payments/refund/{refundId}`](/api-reference/refund-get-by-id) until
`status` is terminal.
