# Reverse a payment The Payment Reversal API returns funds back to the customer by automatically performing the appropriate action depending on the payment's status. For example, if a payment is: - Authorized and captured – The payment is fully refunded. - Authorized but not captured – The payment is voided. - Authorized and partially captured – The partial capture amount is refunded and the remaining authorization amount is voided. - Partially refunded – The rest of the partial capture amount is refunded and the remaining authorization amount is voided. - Awaiting an automatic retry due to a failure – The pending payment retries are cancelled. Reversals are always processed for the full payment amount, in the same currency as the original authorization. > **Information** > > If you only want to partially return funds to the customer, request a [partial refund](https://www.checkout.com/docs/payments/manage-payments/refund-a-payment.md) instead. --- ## Request a payment reversal For card payments, a payment reversal performs all required actions with a single reversal request. For non-card payments, a payment reversal only performs one action per reversal request. For example, for payment methods that support both refunds and voids: 1. The first time you request a payment reversal, the payment is voided. 2. The second time you request a payment reversal, the payment is refunded, if possible. If the payment is eligible for a reversal, call the [Reverse a payment](https://api-reference.checkout.com/tag/Payments/#operation/reversePayment) endpoint and provide the payment's ID as the `{id}` path parameter. > **Information** > > Your base URL's `{prefix}` value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see [API endpoints](https://www.checkout.com/docs/developer-resources/api/api-endpoints.md). **Production** `POST` `https://{prefix}.api.checkout.com/payments/{id}/reversals` **Sandbox** `POST` `https://{prefix}.api.sandbox.checkout.com/payments/{id}/reversals` ### Request example ```json { "reference": "ORD-5023-4E89", "metadata": { "coupon_code": "NY2024", "partner_id": 123989 } } ``` ### Response example ```json { "action_id": "act_y3oqhf46pyzuxjbcn2giaqnb44", "reference": "ORD-5023-4E89", "_links": { "payment": { "href": "https://{prefix}.api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44" } } } ``` > **Note** > > If you attempt to reverse a payment that was already reversed, you receive a `204` response. > > > If the payment cannot be reversed, you receive a `403` response. For example, if the payment is declined or is still undergoing [3D Secure (3DS)](https://www.checkout.com/docs/payments/authenticate-payments/3d-secure.md) authentication. As reversals are processed asynchronously, the response does not specify whether the reversal was successful. To track the status of the reversal, subscribe to the [payment webhooks](https://www.checkout.com/docs/developer-resources/event-notifications/event-types.md#Gateway). For example, if the payment was voided, you receive a [Payment voided](https://www.checkout.com/docs/developer-resources/event-notifications/event-types/payment_voided.md) webhook. > **Information** > > You cannot cancel a reversal after it is processed.