This endpoint allows updating the information of a payment transaction in the order.
PUT
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Errors
Each API response includes an HTTP status code indicating the result of the request. Status code 200 indicates success, 400 indicates an error in the submitted data, and 500 indicates an internal server error.
Some 400 errors can be handled programmatically and include an error code that identifies the issue.
400Error. Invalid ID supplied
empty_required_header
The "X-Idempotency-Key" header is required and was not sent. Make the requisition again including it.
invalid_idempotency_key_length
The value sent in the "X-Idempotency-Key" header exceeded the allowed size. The header accepts values between 1 and 64 characters.
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.
invalid_transaction_id
The "transaction_id" provided in the request path is not correct. Please confirm it and provide a valid ID to try again.
401Error. Access Token not authorized.
401
The value sent as Access Token is incorrect. Please check and try again with the correct value.
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.
404Error. Order not found.
order_not_found
Order not found. Please check if you provided the correct order ID.
409Some specific system rule does not allow the action to be performed due to defined restrictions.
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.
429Request limit exceeded.
too_many_requests
"Client ID" blocked by the gateway because the request limit for the ID in question was reached. Read the "Retry-After" header from the response and wait the indicated number of seconds before retrying. For greater resilience, implement exponential backoff with jitter, that is, increase the wait time with each new attempt and add a random variation to avoid simultaneous retransmission of multiple requests.
usage_quota_exceeded
Quota enforced by the API backend because the per-client request limit was reached. Read the "Retry-After" header from the response and wait the indicated number of seconds before retrying. For greater resilience, implement exponential backoff with jitter, that is, increase the wait time with each new attempt and add a random variation to avoid simultaneous retransmission of multiple requests.
500Generic error.
internal_error
Generic error. Please try submitting the request again.
curl -X PUT \
'https://api.mercadopago.com/v1/orders/{order_id}/transactions/{transaction_id}'\
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer APP_USR-1*********685765-12*********1b4332e5c*********e077d7679*********664' \
-H 'X-Idempotency-Key: b848b090-5897-4fe3-9e8b-d577b4190f5d' \
-d '{
"payment_method": {
"id": "master",
"type": "credit_card",
"token": "12345",
"installments": 1,
"statement_descriptor": "My Store"
}
}'{
"payment_method": {
"id": "master",
"type": "credit_card",
"token": "12345",
"installments": 1,
"statement_descriptor": "My Store"
}
}