AI resources
Create order

This endpoint allows creating orders for payment transactions with Wallet Connect. In case of success, the request will return a response with status 201.

POST

https://api.mercadopago.com/v1/orders
Request parameters
Header
Authorization
string

REQUIRED

Access Token obtained through the developer panel. Must be sent in all requests.
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
Body
type
string

REQUIRED

Order type, associated with the Mercado Pago solution for which it is created. For Wallet Connect payments, the only possible value is online.
external_reference
string

REQUIRED

It is the external reference of the order, assigned when creating it. This field must have a maximum of 64 characters and can only be numbers, letters, hyphens (-) and underscores (_). Special characters such as ([ ], ()
total_amount
string

REQUIRED

Total amount to be paid. The field can contain two decimal places or none.
description
string
Description of the purchased product or service, the reason for the payment order.
Response parameters
id
string
Identifier of the order, automatically generated by Mercado Pago when the order is created through the endpoint POST /v1/orders.
type
string
Order type.
online: Value associated with the creation of orders for Wallet Connect payments.
processing_mode
string
Indicates how the order will be processed. For Wallet Connect orders, the only allowed value is automatic.
automatic: The order is processed automatically in a single step.
external_reference
string
It is the external reference of the order, assigned when creating it. This field must have a maximum of 64 characters and can only be numbers, letters, hyphens (-) and underscores (_). Special characters such as ([ ], ()
Errors

400Request error.

empty_required_header

The X-Idempotency-Key header is required and was not sent. Make the request again including it.

invalid_idempotency_key_length

The X-Idempotency-Key must be between 1 and 64 characters.

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 was not sent.

property_type

Wrong property type was submitted. Check the message returned in the error details to find out what the problem was and try again.

minimum_items

Array length is below the minimum allowed.

maximum_items

Array length exceeds the maximum allowed.

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 provided.

invalid_total_amount

The value entered in total_amount is not equivalent to the sum of the transactions.payments.amount field of the total transactions. Please verify if the values are correct.

invalid_order_type

Order type is invalid or unsupported.

401Error. Payer Token not authorized.

unauthorized_payer_token

The payer_token provided is not authorized for this transaction. Verify that the token is valid and belongs to the authenticated payer.

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.

402Processing error.

402

Order was created, but some transaction failed. Check the errors field for more information.

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.

operation_not_supported

The operation is not supported for this order. Please check the order status and status_detail and try again.

422Error.

unprocessable_entity

The payment profile associated with the payer_token is corrupted or incomplete.

423Resource locked.

resource_locked

The idempotency key (X-Idempotency-Key) is currently locked by an in-flight request. Please retry after a short delay.

500Generic error.

idempotency_validation_failed

Idempotency validation failed. Please try submitting the request again.

internal_error

Generic error. Please try submitting the request again.

Request
curl -X POST \
    'https://api.mercadopago.com/v1/orders'\
    -H 'Content-Type: application/json' \
       -H 'Authorization: Bearer APP_USR-4*********994754-12*********c73b4e1ac*********cef36b27c*********840' \
       -H 'X-Idempotency-Key: 1b14424f-f690-4421-a202-d87d8f0ad895' \
    -d '{
  "type": "online",
  "external_reference": "ext_ref_1234",
  "total_amount": "50.00",
  "description": "Smartphone",
  "capture_mode": "automatic",
  "integration_data": {
    "platform_id": "123abc"
  },
  "transactions": {
    "payments": [
      {
        "amount": "50.00",
        "payment_method": {
          "type": "wallet",
          "id": "wallet",
          "token": "123abc123abc123abc123abc123abc12",
          "statement_descriptor": "My Store"
        },
        "stored_credential": {
          "reason": "recurring",
          "payment_initiator": "merchant"
        }
      }
    ]
  }
}'
Response
{
  "id": "ORDBTA01KHY4WFPYXJ9Z7S5CGED7WCTP",
  "type": "online",
  "processing_mode": "automatic",
  "external_reference": "ext_ref_1234",
  "description": "Smartphone",
  "total_amount": "50.00",
  "total_paid_amount": "50.00",
  "country_code": "MX",
  "user_id": "1090806071",
  "status": "processed",
  "status_detail": "accredited",
  "capture_mode": "automatic",
  "currency": "MXN",
  "created_date": "2026-02-20T18:27:08.639Z",
  "last_updated_date": "2026-02-20T18:27:09.797Z",
  "integration_data": {
    "application_id": "8251964915044164",
    "platform_id": "123abc"
  },
  "transactions": {
    "payments": [
      {
        "id": "PAY01KHY4WFPYXJ9Z7S5CGG0SE8KN",
        "amount": "50.00",
        "paid_amount": "47.28",
        "reference_id": "30f45a189ec043c28e6c4b73e0dd65a3",
        "status": "processed",
        "status_detail": "accredited",
        "attempts": [
          {
            "id": "514336a54ba74712a2478d0e79c92b14",
            "status": "processed",
            "status_detail": "accredited",
            "payment_method": {
              "id": "wallet",
              "type": "wallet",
              "installments": 1
            }
          }
        ],
        "payment_method": {
          "id": "wallet",
          "type": "wallet",
          "statement_descriptor": "Descriptor",
          "installments": 1
        },
        "stored_credential": {
          "payment_initiator": "merchant",
          "reason": "recurring"
        }
      }
    ]
  }
}