AI resources
Get order by ID

This endpoint allows consulting all information on an order using the ID obtained in the response to its creation. In case of success, the request will return a response with status 200.

GET

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

REQUIRED

Access Token obtained through the developer panel. Must be sent in all requests.
Path
id
string

REQUIRED

Order ID, returned in the response to the request made for its creation.
Response parameters
id
string
Identifier of the order created in the request, automatically generated by Mercado Pago.
processing_mode
string
Order processing mode
manual: Order's processing will be made manually. It is the processing mode used for the "manual" option, as it sets the processing to be made afterwards, by using the 'Process order by ID' ("/v1/orders/{order_id}/process") endpoint.
automatic: Order's processing will be made instantly. It is the capture mode used for the "automatic" option.
external_reference
string
It is an external reference of the order. It can be, for example, a hashcode from the Central Bank, functioning as an identifier of the transaction origin. This field must have a maximum of 150 characters and can only be
total_amount
string
Total amount to be paid.

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

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.

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.

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.

Request
curl -X GET \
    'https://api.mercadopago.com/v1/orders/{id}'\
    -H 'Content-Type: application/json' \
       -H 'Authorization: Bearer APP_USR-5*********956537-12*********ff1a3d36d*********47e7b9985*********770' \
    
Response
{
  "id": "ORD01J49MMW3SSBK5PSV3DFR32959",
  "processing_mode": "automatic",
  "external_reference": "ext_ref_1234",
  "total_amount": "50.00",
  "integration_data": {
    "application_id": "1234",
    "integrator_id": "dev_123",
    "platform_id": "1234567890",
    "sponsor": {
      "id": "<YOUR_SPONSOR_ID>"
    }
  },
  "user_id": "12345",
  "created_date": "2024-08-26T13:06:51.045317772Z",
  "last_updated_date": "2024-08-26T13:06:51.045317772Z",
  "country_code": "UY",
  "type": "online",
  "status": "processed",
  "status_detail": "accredited",
  "capture_mode": "automatic",
  "total_paid_amount": "50.00",
  "transactions": {
    "payments": [
      {
        "id": "PAY01J67CQQH5904WDBVZEM4JMEP3",
        "amount": "24.50",
        "paid_amount": "47.28",
        "date_of_expiration": "2027-12-31T10:00:00.000-04:00",
        "reference_id": "01JEVQM899NWSQC4FYWWW7KTF9",
        "status": "processed",
        "status_detail": "accredited",
        "payment_method": {
          "id": "master",
          "type": "credit_card",
          "token": "12345",
          "installments": 1,
          "statement_descriptor": "My Store"
        }
      }
    ],
    "chargebacks": [
      {
        "id": "CBK01J67CQQH5904WDBVZEM4JMEP3",
        "transaction_id": "PAY01J67CQQH5904WDBVZEM4JMEP3",
        "case_id": "1234567890",
        "status": "in_process",
        "references": [
          {}
        ]
      }
    ]
  },
  "description": "Smartphone",
  "items": [
    {
      "title": "Smartphone",
      "unit_price": "24.50",
      "quantity": 1,
      "description": "Smartphone",
      "external_code": "1234",
      "picture_url": "https://http2.mlstatic.com/resources/frontend/statics/growth-sellers-landings/device-mlb-point-i_medium2x.png",
      "category_id": "MLB1055",
      "type": "MLB1055",
      "warranty": "true",
      "event_date": "2014-06-28T16:53:03.176-04:00"
    }
  ],
  "client_token": "QWERTY12345.ASDFG67890",
  "config": {
    "payment_method": {
      "default_type": "credit_card",
      "installments_cost": "seller",
      "installments": {
        "interest_free": {
          "type": "range",
          "values": [
            1,
            6
          ]
        },
        "available": {
          "type": "all"
        }
      }
    }
  }
}