AI resources

Create an Order

Server-Side

An Order is the central resource of the Orders API that unifies the payment lifecycle. When creating an Order for Checkout Pro, you define the transaction details — products, prices, buyer data, and notification settings — and obtain an init_point to redirect the buyer to the Mercado Pago payment form.

The Order replaces the preference as the entry point for checkout. From its creation, the Order id will be the unique identifier you use to query, cancel, or refund the transaction throughout the entire flow.

You can adapt the Checkout Pro integration to your business model by configuring additional attributes in the Order, such as return URLs, payment method exclusions, and expiration dates. To customize your Order, access the documentation in the Additional settings section.

To create an Order, send a POST with your Access TokenPrivate key of the application created in Mercado Pago, used in the backend. You can access it through Your integrations > Application details > Production credentials. and the required parameters to the endpoint Create orderAPI and execute the request.

Include the X-Idempotency-Key header in all write requests to avoid creating duplicate orders. Use a unique value, such as a UUID V4.
The notification_url must be an HTTPS URL.
Create one Order per payment or transaction flow you want to initiate.
curl -X POST \
    -H 'accept: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer ENV_ACCESS_TOKEN' \
    -H 'X-Idempotency-Key: UNIQUE_KEY' \
    'https://api.mercadopago.com/v1/orders' \
    -d '{
  "type": "online",
  "total_amount": "1000.00",
  "external_reference": "order_pro_123",
  "payer": {
    "email": "buyer@email.com"
  },
  "transactions": {
    "payments": [
      {
        "amount": "1000.00"
      }
    ]
  },
  "notification_url": "https://www.your-site.com/webhooks"
}'

Get the init_point

When the request is executed, the response will contain the Order id and the checkout_pro object with the init_point URL. This URL is the address to which you must redirect the buyer so they can access the Mercado Pago payment form and complete the transaction.

Save the Order id for future operations, such as status queries, cancellations, and refunds.

json

{
  "id": "ORD01HRYFWNYRE1MR1E60MW3X0T2P",
  "type": "online",
  "status": "created",
  "status_detail": "created",
  "external_reference": "order_pro_123",
  "total_amount": "1000.00",
  "checkout_pro": {
    "init_point": "https://www.mercadopago.com.ar/checkout/v1/redirect?pref_id=787997534-6dad21a1-6145-4f0d-ac21-66bf7a5e7a58"
  },
  "transactions": {
    "payments": [
      {
        "id": "pay_01JC1KVZ0WJY8Y4WA7MZG3A8F2",
        "amount": "1000.00",
        "status": "created"
      }
    ]
  }
}

Choose the integration type

Once you have obtained the init_point, you should proceed to the frontend configuration. To do this, choose the integration type that best suits your needs, whether for a website or a mobile application.

Select the integration type you want to implement and follow the detailed steps to complete the Checkout Pro integration.

Continue web integration
Offer payments with redirection to Mercado Pago on your website or online store.
Continue mobile integration
Offer payments with redirection to Mercado Pago on your mobile application.