# Refund a payment with a reference You can issue a refund using the [Dashboard](https://dashboard.checkout.com) or the [API](https://api-reference.checkout.com/tag/Payments/#operation/refundAPayment). There are two types of refunds you might need to process: - Full refund – A full refund returns the total amount of the payment to the customer — it can only be performed once. - Partial refund – A partial refund returns a sum less than the captured amount. A payment can be refunded multiple times, but cannot exceed the original payment amount. > **Information** > > You can perform a maximum of 150 partial actions on a payment. This total limit applies across both partial captures and partial refunds. Refunds are always processed in the same currency as the captured payment. > **Note** > > Once a refund is processed, you cannot cancel it. Refunds are debited immediately from your sub-account's _Available_ balance. If _Available_ has insufficient funds, the refund can still be processed using funds from your _Pending_ or _Operational_ balance. If your sub-account does not have sufficient funds across these balances to process the refund, you can: - [Add funds to your sub-account balance](https://www.checkout.com/docs/funds-management/move-funds/add-funds.md) - Enable [Funds Pooling](https://www.checkout.com/docs/funds-management/manage-funds/pool-your-funds.md) to automatically cover the shortfall from another sub-account You can view your sub-account balance in the: - _Business account_ > _Balances_ page in the [Dashboard](https://dashboard.checkout.com/) - Response to a [Get entity balances](https://api-reference.checkout.com/tag/Balances/#operation/getEntityBalances) request --- ## Overview To process a refund successfully, you must provide the payment ID of the captured payment. You can find the ID: - In the response of the payment request - In the webhook notification The requests are the same for partial and full refunds. Any refunds for less than the original captured amount will be considered partial refunds. Use the following endpoint to request a refund. > **Information** > > If required by the card scheme, we will trigger a [refund authorization](#Refund_authorization) before processing your refund. ### Endpoints For the full API specification, see the [API reference](https://api-reference.checkout.com/). > **Information** > > The Payments API supports [idempotency](https://www.checkout.com/docs/developer-resources/api/idempotency.md). You can safely retry API requests without the risk of duplicate requests. > **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}/refunds` **Sandbox** `POST` `https://{prefix}.api.sandbox.checkout.com/payments/{id}/refunds` ### Request examples ```json { "reference": "ORD-5023-4E89", "metadata": { "coupon_code": "NY2024", "partner_id": 123989 } } ``` ### Response examples A successful refund request returns a `202 Refund accepted` response. However, if there was a problem with your request, you'll receive an error response. > **Information** > > Refunds are asynchronous requests, which means they happen behind the scenes. The API response does not confirm whether or not the refund was successful. [Configure your webhook server](https://www.checkout.com/docs/developer-resources/event-notifications/receive-webhooks/configure-your-webhook-server.md) to receive notifications. **202 Refund accepted** ```json { "action_id": "act_y3oqhf46pyzuxjbcn2giaqnb44", "reference": "ORD-5023-4E89", "_links": { "payment": { "href": "https://{prefix}.api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44" } } } ``` **422 Invalid data was sent** ```json { "request_id": "0HL80RJLS76I7", "error_type": "request_invalid", "error_codes": ["payment_source_required"] } ``` > **Information** > > If unsuccessful, you may also receive a `403 Refund not allowed` or `404 Payment not found` error. --- ## Refund authorization If the card scheme requires it, we will automatically trigger a refund authorization on your behalf before processing your refund. > **Information** > > Refund authorizations only apply to card payments. > **Information** > > If a refund authorization is requested, you can find the Retrieval Reference Number (RRN) using the [get payment actions](https://www.checkout.com/docs/payments/manage-payments/get-payment-actions.md) call. If the refund authorization is declined, you will receive a 422 response, like the following example. ```json { "request_id": "f5feff3f-d2ef-4c82-b4d0-ff443731581f", "error_type": "processing_error", "error_codes": ["refund_authorization_declined"] } ``` If you want to know the reason for the decline, you can either [subscribe to refund webhooks](https://www.checkout.com/docs/developer-resources/event-notifications/event-types.md#Gateway), call the [Get payment actions](https://www.checkout.com/docs/payments/manage-payments/get-payment-actions.md) endpoint, or view it in the Dashboard. > **Information** > > To test a declined refund authorization, request a refund with the `amount` set to `3738`. --- ## Refund a payment with a resolved dispute If a payment has an active dispute, Checkout.com blocks refunds on it until the dispute is resolved. This prevents you from processing a refund and losing the disputed amount to a chargeback at the same time. Once the dispute is canceled or won, the payment becomes eligible for a refund again. We do not automatically refund the customer, so you must submit the refund request yourself. For more information about dispute statuses, see [How disputes work](https://www.checkout.com/docs/business-operations/manage-disputes/how-disputes-work.md).