This endpoint allows you to cancel a scheduled transaction using the reference ID obtained from its creation response. The cancellation is intended to allow the interruption of incorrect or undesired payment operations before financial settlement and is irreversible, in order to preserve operational integrity and ensure full traceability for auditing purposes. Only transactions that have not yet been processed ("pending" and "in_process") can be canceled. In case of success, the request will return a response with status 204.
PUT
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
400Bad request. The parameters sent are not valid.
bad_request
Invalid data was sent in the request body. Try sending the request again, validating all fields.
401Unauthorized. Invalid or missing credentials.
unauthorized
The value sent as Access Token is incorrect. Please check and try again with the correct value.
403Forbidden. You don't have permissions to access this resource.
forbidden
No permission to access the resource.
404Not found. The requested resource does not exist.
not_found
The requested resource was not found or the value sent for its identification does not exist. Validate the information sent in the parameters and try the request again.
412Precondition not met. The status of the transaction does not allow cancellation.
Precondition Failed
The status of the transaction does not allow its cancelation. Only transactions with "status" 'pending' or 'in_process' can be canceled.
500Internal server error.
internal_server_error
An unexpected error occurred on the server. Try the request again.
curl -X PUT \
'https://api.mercadopago.com/v1/payouts/{payout_id}/transactions/{transaction_id}/cancel'\
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer APP_USR-1*********685765-12*********1b4332e5c*********e077d7679*********664' \
-d '{
"comments": "delete because the payment was canceled",
"deleted_by": "user_123"
}'