# Void a payment After a card payment has been authorized, the payment is not complete until it has been [captured](https://www.checkout.com/docs/payments/manage-payments/capture-a-payment.md). If you do not wish to capture the payment, you can void it using the void API. > **Information** > > For American Express, Mastercard, and Visa payments, you can submit a void request on a partially captured payment to release the remaining funds back to the cardholder. If you do not request it, we'll automatically void the remainder and return it to the customer when the authorization expires. ### Partially void a payment Any void amount less than the full outstanding authorized amount is treated as a partial void. To partially void a payment, provide an `amount` in your void request that's less than the outstanding authorized balance. If you do not provide an `amount`, we void the full outstanding amount. ### Request Use the following endpoint to void an authorized – but not yet captured – payment. ### 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}/voids` **Sandbox** `POST` `https://{prefix}.api.sandbox.checkout.com/payments/{id}/voids` ### Request example **Full void** ```json { "reference": "ORD-5023-4E89", "metadata": { "coupon_code": "NY2024", "partner_id": 123989 } } ``` **Partial void** ```json { "amount": 6540, "reference": "ORD-5023-4E89", "metadata": { "coupon_code": "NY2024", "partner_id": 123989 } } ``` ### Response examples If you receive a `202 Void accepted` response, your void request has been accepted for processing. To get the full void response, you will need to subscribe to the `payment_voided` webhook. If there was a problem with your request, you'll receive an error response such as `422 Invalid data was sent`. **202 Void 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 Void not allowed` or `404 Payment not found` error.