---
title: "Reverse a payment"
method: POST
path: "/payments/{id}/reversals"
tags: ["Payments"]
---

# Reverse a payment

`POST /payments/{id}/reversals`

## Request

- Base URL: `https://{prefix}.api.sandbox.checkout.com`
- URL: `https://{prefix}.api.sandbox.checkout.com/payments/{id}/reversals`
- Auth: one of:
  - OAuth 2
    - Client credentials
    - Token URL: `string` scopes: `gateway`, `gateway:payment-voids`, `gateway:payment-refunds`, `gateway:payment-cancellations`
  - API key in header `Authorization`
- TypeScript: <https://skmtc.dev/checkout/apis/checkout-com-api-reference/docs/payments/:id/reversals/post.ts> (a function with typed inputs; its response is checked against the schema)

Returns funds back to the customer by automatically performing the appropriate payment action depending on the payment's status.

For more information, see <a href="https://www.checkout.com/docs/payments/manage-payments/reverse-a-payment">Reverse a payment</a>.

## Path parameters

- `id` string, required

## Headers

- `Cko-Idempotency-Key` string

## Request body

- PaymentReversalRequest
  - `reference` string: An internal reference to identify the payment reversal. For American Express payment reversals, there is a 30-character limit.
  - `metadata` object: Stores additional information about the transaction with custom fields. You can only supply primitive data types with one level of depth. Fields of type `object` or `array` are not supported.

## Response `200`

Payment is already reversed

- object: The response received when you attempt a repeated payment action. For example, if you attempt to refund a payment that is already refunded.
  - `action_id` string, required: The action identifier
  - `_links` object: Links related to the payment.
    - `payment` Link, required
      - `href` string, required: The link URL

## Other responses

- `202`: Reversal accepted
- `401`: Unauthorized
- `403`: Reversals not supported for this payment
- `404`: Payment not found
- `422`: Invalid data was sent
- `502`: Bad gateway

---

[API](https://skmtc.dev/checkout/apis/checkout-com-api-reference.md) - [All operations](https://skmtc.dev/checkout/apis/checkout-com-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/checkout/apis/checkout-com-api-reference/revisions/0f1abdb1c3e9?raw)
