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.

Add transactions to the order - Online payments - Mercado Pago Developers

Intelligent search powered by OpenAI 

Add transactions to the order

POST

https://api.mercadopago.com/v1/orders/{order_id}/transactions
This endpoint allows payment transactions to be added to the order. This operation can only be carried out in manual mode (processing the transaction in stages that can be configured and executed incrementally), with the 'processing_mode' field filled with 'manual' value. In case of success, the request will return a response with status 201.
Request's parameters
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
PATH
id
string

REQUIRED

Order ID, returned in the response to the request made for its creation.
BODY
payments
array
Contains information about the payment order. if you want to create an order with two cards, you can add an item to the array, dividing the total value of the transaction and indicating a different payment method for eac...View more
Response parameters
payments
array
Contains information about the payment associated with the order.
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 order_id provided in the request path is not correct. Please confirm it and provide a valid ID to try again.

required_properties

There are some required properties missing. Check the message returned in the error details to find out what the problem was and try again.

unsupported_properties

An unsupported property was sent. Check the message returned in the error details to find out what the problem was and try again.

minimum_properties

The minimum number of properties required to execute the request was not sent. Check the message returned in the error details to find out what the problem was and try again.

property_type

The wrong property type was submitted. For example, an 'integer' value for a 'string' property. Check the message returned in the error details to find out what the problem was and try again.

minimum_items

The minimum number of items for some property was not sent. Check the message returned in the error details to find out what the problem was and try again.

maximum_items

A greater number of items were sent than allowed for some property. Check the message returned in the error details to find out what the problem was and try again.

property_value

An incorrect value for some property was sent. Check the message returned in the error details to find out what the problem was and try again.

json_syntax_error

An incorrect JSON was sent. Check the message returned in the error details to find out what the problem was and try again.

invalid_properties

Incorrect information was sent. Check the message returned in the error details to find out what the problem was and try again.

exceeded_number_of_transactions

An error occurred in the request. The order accepts a maximum of two transactions. Remove the excess transactions.

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.

500Error.

idempotency_validation_failed

Validation fail. Please try submitting the request again.

500

Generic error. Please try submitting the request again.

Request
curl -X POST \
    'https://api.mercadopago.com/v1/orders/{order_id}/transactions'\
    -H 'Content-Type: application/json' \
       -H 'X-Idempotency-Key: 0d5020ed-1af6-469c-ae06-c3bec19954bb' \
       -H 'Authorization: Bearer TEST-8971*********918-01191*********5874530a4*********4799fdf-1*********' \
    -d '{
  "payments": [
    {
      "amount": "24.90",
      "payment_method": {
        "id": "visa",
        "type": "credit_card",
        "token": "12345",
        "installments": 1,
        "statement_descriptor": "approved"
      }
    }
  ]
}'
Sample answer
{
  "payments": [
    {
      "id": "pay_01J67CQQH5904WDBVZEM4JMEP3",
      "amount": "24.90",
      "status": "processed",
      "status_detail": "accredited",
      "payment_method": {
        "id": "visa",
        "type": "credit_card",
        "token": "12345",
        "installments": 1,
        "statement_descriptor": "approved"
      }
    }
  ]
}