Intelligent search powered by OpenAIÂ
POST
REQUIRED
REQUIRED
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 order_id provided in the request path is not correct. Please confirm it and provide a valid ID to try again.
401Error.
unauthorized
The value sent as Access Token is incorrect. Please check and try again 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.
curl -X POST \
'https://api.mercadopago.com/v1/orders/{order_id}/cancel'\
-H 'Content-Type: application/json' \
-H 'X-Idempotency-Key: 0d5020ed-1af6-469c-ae06-c3bec19954bb' \
-H 'Authorization: Bearer TEST-7434*********159-03141*********cee51edf8*********f94f589-1*********' \
{
"id": "123",
"type": "point",
"external_reference": "ext_ref_1234",
"description": "Point Smart Mini",
"site_id": "MLB",
"integration_data": {
"application_id": 1234567890,
"platform_id": "1234567890",
"integrator_id": "1234567890",
"sponsor": {
"id": "446566691"
}
},
"status": "cancelled",
"created_date": "2024-09-10T14:26:42.109320977Z",
"last_updated_date": "2024-09-10T14:26:42.109320977Z",
"type_config": {
"terminal_id": "PAX_A910__SMARTPOS1423",
"ticket_number": "S0392JED",
"flow_process": "credit_card"
},
"transactions": {
"payments": [
{
"id": "pay_01J67CQQH5904WDBVZEM4JMEP3",
"amount": "24.90",
"status": "cancelled",
"status_detail": "cancelled_by_api"
}
]
}
}