---
description: >-
  Refund a captured payment, fully or partially. Multiple partial refunds are
  supported until the full amount is returned.
---

# Refund

Refunding reverses a previously captured payment and returns funds to the cardholder. The time for the refund to appear on the cardholder's statement varies by issuing bank.

## Key Rules

- Only possible for **captured** payments (use [Void](void.md) for uncaptured authorizations)
- You can refund the **full amount** or a **partial amount**
- **Multiple partial refunds** are allowed until the full captured amount is refunded
- Once fully refunded, further refund attempts return an error
- If no amount is specified, the **full captured amount** is refunded

## Endpoint

```
POST https://sandbox-gw.simpleps.com/payments/{externalPaymentId}/refund
```

**Headers:**

| Header | Value |
|---|---|
| `Authorization` | `Bearer {accessToken}` |
| `Content-Type` | `application/json` |

## Request Body (Optional)

Omit the body to refund the full captured amount. Include it for a partial refund:

```json
{
  "amount": {
    "total": 25.00,
    "currency": "USD"
  }
}
```

| Field | Type | Required | Description |
|---|---|---|---|
| `amount.total` | number | ❌ | Amount to refund (must be ≤ remaining captured amount) |
| `amount.currency` | string | ❌ | Currency code (must match the original payment) |

## Example — Full Refund

```bash
curl -X POST https://sandbox-gw.simpleps.com/payments/order-12345/refund \
  -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIs...' \
  -H 'Content-Type: application/json'
```

## Example — Partial Refund

```bash
curl -X POST https://sandbox-gw.simpleps.com/payments/order-12345/refund \
  -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIs...' \
  -H 'Content-Type: application/json' \
  -d '{
    "amount": {
      "total": 25.00,
      "currency": "USD"
    }
  }'
```

## Response (200)

```json
{
  "paymentId": "bfb9eacb-7c72-4cc8-9cae-afd9164ec792",
  "parentPaymentId": "bfb9eacb-7c72-4cc8-9cae-afd9164ec792",
  "externalPaymentId": "order-12345",
  "amount": 100.10,
  "created": "2024-04-22 16:22:06",
  "approved": true,
  "message": "Payment Approved",
  "automaticReversed": false,
  "status": "REFUNDED",
  "captured": true,
  "voided": false,
  "authCode": "bfb9eacb-7c72-4cc8-9cae-afd9164ec792",
  "issuerName": "BANK OF AMERICA",
  "issuerCountry": "US",
  "cvcResult": "APPROVED",
  "avsResult": "NOT_SENT"
}
```

For partial refunds, the `status` will be `PARTIALLY_REFUNDED` until the full amount is returned.
