# Cancel order This endpoint cancels a Wallet Connect order that has not yet been captured. It is typically used when the merchant decides not to capture the payment for orders created with `capture_mode=manual` and that are in `status=action_required` and `status_detail=waiting_capture`. Cancelling releases the authorization on the payer's payment method without moving any funds. In case of success, the request will return a response with status 200. **POST** `/v1/orders/{order_id}/cancel` ## Request parameters ### Header - `X-Idempotency-Key` (string, required) Unique key per request to safely retry without duplicating actions. Use a UUID V4 or random string. Accepts values between 1 and 64 characters. ### Path - `order_id` (string, required) ID of the order to cancel, returned in the response from the endpoint [POST /v1/orders](/developers/en/reference/online-payments/wallet-connect/orders/create-order/post). ## Response parameters - `id` (string, optional) Identifier of the order, automatically generated by Mercado Pago when the order is created through the endpoint [POST /v1/orders](/developers/en/reference/online-payments/wallet-connect/orders/create-order/post). - `type` (string, optional) Order type. Possible enum values: - `online` Value associated with the creation of orders for Wallet Connect payments. - `processing_mode` (string, optional) Indicates how the order will be processed. For Wallet Connect orders, the only allowed value is `automatic`. Possible enum values: - `automatic` The order is processed automatically in a single step. - `external_reference` (string, optional) It is the external reference of the order, assigned when creating it. This field must have a maximum of 64 characters and can only be numbers, letters, hyphens (-) and underscores (_). Special characters such as ([ ], (), '', @) are not allowed. It must be a unique value for each order and cannot contain PII data. - `description` (string, optional) Description of the purchased product or service, the reason for the payment order. - `total_amount` (string, optional) Total amount to be paid. - `total_paid_amount` (string, optional) Total amount paid, represents the sum of all the transaction's `paid_amount` values. - `country_code` (string, optional) Identifier of the site (country) to which the Mercado Pago application that created the order belongs. - `user_id` (string, optional) Identifier of the user to which the Mercado Pago application that created the order belongs. It is the person that will receive the payment. - `status` (string, optional) Current status of the order. Possible enum values: - `processed` The order was successfully processed. - `action_required` The order requires an additional action to continue. For orders created with `capture_mode=manual`, the payment was authorized and is waiting to be captured through the endpoint [POST /v1/orders/{order_id}/capture](/developers/en/reference/online-payments/wallet-connect/orders/capture-order/post). - `failed` An error occurred in the processing of the order. - `canceled` The order was canceled. The authorization was released and no funds were transferred. - `refunded` The order has been successfully refunded. - `status_detail` (string, optional) Details about the status of the order. Possible enum values: - `accredited` Payment accredited. - `waiting_capture` The payment was authorized and is waiting to be captured. Applies to orders created with `capture_mode=manual`; capture it through the endpoint [POST /v1/orders/{order_id}/capture](/developers/en/reference/online-payments/wallet-connect/orders/capture-order/post). - `failed` Payment failed. - `canceled` The order was canceled before being captured. - `insufficient_amount` Insufficient balance to process the payment. - `refunded` The order has been fully refunded. - `partially_refunded` The order has been partially refunded. - `capture_mode` (string, optional) Indicates the capture mode of the order. The default value is `automatic`. With `manual`, the payment is only authorized at creation and must be captured later through the endpoint [POST /v1/orders/{order_id}/capture](/developers/en/reference/online-payments/wallet-connect/orders/capture-order/post). Possible enum values: - `automatic` The payment is authorized and captured in a single step at order creation. Funds settle immediately. - `manual` The payment is only authorized at order creation. Funds are held but not transferred. A subsequent capture request must be sent to the endpoint [POST /v1/orders/{order_id}/capture](/developers/en/reference/online-payments/wallet-connect/orders/capture-order/post). - `currency` (string, optional) Identifier of the currency used in the order. - `created_date` (string, optional) Order's creation date, in `yyyy-MM-ddTHH:mm:ss.sssZ` format. - `last_updated_date` (string, optional) Order's last update date, in `yyyy-MM-ddTHH:mm:ss.sssZ` format. - `integration_data` (object, optional) - `integration_data.application_id` (string, optional) - `integration_data.platform_id` (string, optional) - `transactions` (object, optional) Contains information about the transactions associated with the order. - `transactions.payments` (array, optional) Contains information about the payment associated with the order. - `transactions.payments[].id` (string, optional) Identifier of the payment transaction, automatically generated by Mercado Pago when the order is created through the endpoint [POST /v1/orders](/developers/en/reference/online-payments/wallet-connect/orders/create-order/post). - `transactions.payments[].amount` (string, optional) Payment amount. - `transactions.payments[].reference_id` (string, optional) Reference identifier for the payment. - `transactions.payments[].status` (string, optional) Payment status. Possible enum values: - `processed` The payment has been successfully processed. - `action_required` The order requires an additional action. For orders with `capture_mode=manual`, the payment was authorized and is waiting to be captured through the endpoint [POST /v1/orders/{order_id}/capture](/developers/en/reference/online-payments/wallet-connect/orders/capture-order/post). - `failed` An error occurred in the processing of the payment. - `canceled` The order was canceled. The authorization was released and no funds were transferred. - `transactions.payments[].status_detail` (string, optional) Details about the payment status. Possible enum values: - `accredited` Payment accredited. - `waiting_capture` The payment was authorized and is waiting to be captured. Applies to orders with `capture_mode=manual`; capture it through the endpoint [POST /v1/orders/{order_id}/capture](/developers/en/reference/online-payments/wallet-connect/orders/capture-order/post). - `insufficient_amount` Insufficient balance to process the payment. - `failed` Payment processing failed. - `canceled_transaction` The payment transaction was canceled before being captured. - `transactions.payments[].attempts` (array, optional) Ordered list of processing attempts for this payment. - `transactions.payments[].attempts[].id` (string, optional) Attempt identifier. - `transactions.payments[].attempts[].status` (string, optional) Status of the attempt. Possible enum values: - `processed` The payment has been successfully processed. - `action_required` The order requires an additional action. For orders with `capture_mode=manual`, the payment was authorized and is waiting to be captured through the endpoint [POST /v1/orders/{order_id}/capture](/developers/en/reference/online-payments/wallet-connect/orders/capture-order/post). - `failed` An error occurred in the processing of the payment. - `canceled` The order was canceled. The authorization was released and no funds were transferred. - `transactions.payments[].attempts[].status_detail` (string, optional) Details about the attempt status. Possible enum values: - `accredited` Payment accredited. - `waiting_capture` The payment was authorized and is waiting to be captured. Applies to orders with `capture_mode=manual`; capture it through the endpoint [POST /v1/orders/{order_id}/capture](/developers/en/reference/online-payments/wallet-connect/orders/capture-order/post). - `insufficient_amount` Insufficient balance to process the payment. - `failed` Payment processing failed. - `canceled_transaction` The payment transaction was canceled before being captured. - `transactions.payments[].payment_method` (object, optional) Information about the payment method. - `transactions.payments[].payment_method.id` (string, optional) Identifier of the payment method used to process the transaction. - `transactions.payments[].payment_method.type` (string, optional) Type of payment method used to process the transaction. - `transactions.payments[].payment_method.statement_descriptor` (string, optional) Description shown on the payment statement. Accepts up to 50 characters. - `transactions.payments[].payment_method.installments` (integer, optional) Number of installments selected. - `transactions.payments[].stored_credential` (object, optional) Stored credential information associated with the payment. - `transactions.payments[].stored_credential.payment_initiator` (string, optional) Initiator of the payment. Possible enum values: - `merchant` The payment was initiated by the merchant (MIT - Merchant Initiated Transaction). - `customer` The payment was initiated by the customer. - `transactions.payments[].stored_credential.reason` (string, optional) Reason for the stored credential. Possible enum values: - `recurring` Indicates that the payment is recurrent and merchant-initiated. ## Errors | Status | Error | Description | | ------- | ------- | ----------- | | 400 | empty_required_header | The `X-Idempotency-Key` header is required and was not sent. Make the request again including it. | | 400 | invalid_idempotency_key_length | The `X-Idempotency-Key` must be between 1 and 64 characters. | | 400 | invalid_path_param | The `order_id` provided in the path is not valid. Please confirm it and provide a valid `order_id` to try again. | | 401 | unauthorized | The value sent as Access Token is incorrect. Please check and try again with the correct value. | | 401 | invalid_credentials | There is no support for test credentials. Use test users with production credentials for the sandbox environment and your production credentials for the production environment. | | 404 | order_not_found | Order not found. Please check if you provided the correct `order_id`. | | 409 | cannot_cancel_order | The order cannot be canceled because it is not in a status that allows cancellation. Only orders in `action_required` status can be canceled. | | 409 | order_already_canceled | The order has already been canceled. | | 409 | idempotency_key_already_used | The value sent as the idempotency header (`X-Idempotency-Key`) has already been used. Please try the request again sending a new value. | | 500 | internal_error | Generic error. Please try submitting the request again. | ## Request example ### cURL ```bash curl -X POST \ 'https://api.mercadopago.com/v1/orders/{order_id}/cancel' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' ``` ## Response example ```json { "id": "ORDBTA01KHY4WFPYXJ9Z7S5CGED7WCTP", "type": "online", "processing_mode": "automatic", "external_reference": "ext_ref_1234", "description": "Smartphone", "total_amount": "50.00", "total_paid_amount": "50.00", "country_code": "AR", "user_id": "1090806071", "status": "processed", "status_detail": "accredited", "capture_mode": "automatic", "currency": "ARS", "created_date": "2026-02-20T18:27:08.639Z", "last_updated_date": "2026-02-20T18:27:09.797Z", "integration_data": { "application_id": "6953384195632068", "platform_id": "123abc" }, "transactions": { "payments": [ { "id": "PAY01KSTHTYV2K2F86CPF6VF5SZ7R", "amount": "0.50", "reference_id": "e8eed39ee75a4371b64d98a074cf472f", "status": "canceled", "status_detail": "canceled_transaction", "attempts": [ null ], "payment_method": { "id": null, "type": null, "statement_descriptor": null, "installments": null }, "stored_credential": { "payment_initiator": null, "reason": null } } ] } } ```