Home
Documentation
Resources
Certifications
Community

Resources

Check for updates on our solutions and system performance, or request technical support.

Community

Get the latest news, ask others for help and share your knowledge.

Cancel action by ID - Impressions - Mercado Pago Developers
Cancel action by ID

POST

https://api.mercadopago.com/terminals/v1/actions/{action_id}/cancel
Cancel an action created for Mercado Pago Point and its transactions using the reference ID obtained in the response to its creation. Only an action in status "created" can be canceled. In case of success, the request will return a response with status 200.
Request's parameters
PATH
action_id
string

REQUIRED

ID of the action that is being cancelled. This value is returned in the response to the Create terminal action.
HEADER
X-Idempotency-Key
string

REQUIRED

This feature allows you to safely retry requests without the risk of accidentally performing the same action more than once. This is useful for avoiding errors, such as creating two identical payments. To ensure that eac...View more
Response parameters
Esta solicitação não tem resposta
Errors

400Error.

empty_required_header

The 'X-Idempotency-Key' header is required and was not sent. Make the requisition again including it.

invalid_path_param

The action_id provided in the request path is not correct. Please confirm it and provide a valid ID to try again.

401Error.

unauthorized

The value provided as the Access Token is incorrect. Please check and resubmit the request with the correct value.

404Error.

order_not_found

Order not found. Please check if you provided the correct order ID.

409Error.

idempotency_key_already_used

The value sent as the idempotency header has already been used. Please try the request again sending a new value.

cannot_cancel_order

There is a conflict trying to cancel the order due to its current status. Please note that orders can only be cancelled via API when "status=created". If you are trying to cancel an order with status "status=at_terminal", you will need to do from the terminal.

500Error.

idempotency_validation_failed

Validation fail. Please try submitting the request again.

500

Internal server error. Please try submitting the request again.

Request
curl -X POST \
    'https://api.mercadopago.com/terminals/v1/actions/{action_id}/cancel'\
    -H 'Content-Type: application/json' \
       -H 'X-Idempotency-Key: 0d5020ed-1af6-469c-ae06-c3bec19954bb' \
       -H 'Authorization: Bearer TEST-7719*********832-03141*********ec9309854*********f1e54b5-1*********' \
    
Sample answer
// This request has not been responded to.