Home
Documentation
Resources
Partners
Community

Resources

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

Partners

Discover our program for agencies or developers that offer integration services and sellers who want to hire them.

Community

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

Update a transaction from the order - Online payments - Mercado Pago Developers

Intelligent search powered by OpenAI 

Update a transaction from the order

PUT

https://api.mercadopago.com/v1/orders/{order_id}/transactions/{transaction_id}
This endpoint allows updating the information of a payment transaction in the order..
Request's parameters
PATH
order_id
string

REQUIRED

ID of the order that is being updated. This value is returned in the response to the Create order request.
transaction_id
string

REQUIRED

Identifier of the payment transaction that will be updated in the order. This ID is automatically generated by Mercado Pago when the request is created or when the transaction is added later to the order.
BODY
payment_method
object

REQUIRED

Information about the payment method. Access the endpoint '/v1/payment_methods' to check all available payment methods and get a list with the details of each one and their properties.
Response parameters
id
string
It's the 'transaction_id'. Identifier of the payment transaction that had its information updated.
amount
string
Transaction amount. If only one payment method is used, it must be equivalent to the amount entered in the "total_amount" field. If two are used, it is the sum between the two "amount" that must be equivalent to the "tot...View more
payment_method
object

REQUIRED

Information about the payment method. Access the endpoint '/v1/payment_methods' to check all available payment methods and get a list with the details of each one and their properties.
Errors

400Error. Invalid ID supplied

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. Access Token not authorized.

401

The value sent as Access Token is incorrect. Please check and try again with the correct value.

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 has already been used. Please try the request again sending a new value.

500Generic error .

500

Generic error. Please try submitting the request again.

Request
curl -X PUT \
    'https://api.mercadopago.com/v1/orders/{order_id}/transactions/{transaction_id}'\
    -H 'Content-Type: application/json' \
       -H 'Authorization: Bearer TEST-8971*********918-01191*********5874530a4*********4799fdf-1*********' \
    -d '{
  "payment_method": {
    "id": "visa",
    "type": "credit_card",
    "token": "12345",
    "installments": 1,
    "statement_descriptor": "approved"
  }
}'
Sample answer
{
  "id": "pay_01J49MMW3SSBK5PSV3DFR32959",
  "amount": "24.90",
  "payment_method": {
    "id": "visa",
    "type": "credit_card",
    "token": "12345",
    "installments": 1,
    "statement_descriptor": "approved"
  }
}