Skip to content
Proud to collaborate with Microsoft for Startups

mercadopago.orders.create-order ​

Creates an Order for processing payment transactions. Supports automatic (single-stage, set processing_mode=automatic) and manual (multi-stage, set processing_mode=manual) modes. In automatic mode, include the transactions.payments array with the payment method. In manual mode, omit transactions and add them later via POST /v1/orders/{id}/transactions, then trigger processing with POST /v1/orders/{id}/process. Available for: credit card, debit card, Pix (MLB), Boleto (MLB), OXXO (MLM), SPEI (MLM), PSE (MCO), Rapipago (MLA), Pago Fácil (MLA).

Create an order

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-mercadopago
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
base_urlstringYes—Mercadopago API root, e.g. https://<host>/api
api_tokenstringNo—Bearer token; omit to use the workflow's token env var
x_idempotency_keystringYes—Unique key per order creation attempt. Prevents duplicate orders on retry.
typestringYes—Order type. Only "online" is supported for online payments.
processing_modestringNo—automatic — MP processes all transactions immediately in a single stage. manual — transactions are processed in configurable stages; use the /process endpoint to trigger processing after creation.
capture_modestringNo—automatic — authorize and capture funds at the same time. manual — authorize only (reserve funds); capture later with /capture endpoint. automatic_async — order may remain in status=processing while awaiting async update; final status delivered via webhook.
total_amountstringYes—Total amount to be paid as a decimal string. Must equal the sum of all payment transaction amounts. Example: "100.00".
external_referencestringNo—Your internal order reference ID. Returned in all order responses.
descriptionstringNo—Description of the purchased product or service.
payerjsonYes——
transactionsjsonYes—Payment transactions for this order. Currently supports one transaction.
configjsonNo—Optional settings for the order.
itemslistNo—Items included in the order.
shipmentjsonNo——
additional_infojsonNo—Additional information required for specific payment methods (e.g. PSE).
integration_datajsonNo—Integration metadata used by MercadoPago internally.

Output Schema ​

FieldTypeRequiredDefaultDescription
base_urlstringYes—Mercadopago API root, e.g. https://<host>/api
api_tokenstringNo—Bearer token; omit to use the workflow's token env var
x_idempotency_keystringYes—Unique key per order creation attempt. Prevents duplicate orders on retry.
typestringYes—Order type. Only "online" is supported for online payments.
processing_modestringNo—automatic — MP processes all transactions immediately in a single stage. manual — transactions are processed in configurable stages; use the /process endpoint to trigger processing after creation.
capture_modestringNo—automatic — authorize and capture funds at the same time. manual — authorize only (reserve funds); capture later with /capture endpoint. automatic_async — order may remain in status=processing while awaiting async update; final status delivered via webhook.
total_amountstringYes—Total amount to be paid as a decimal string. Must equal the sum of all payment transaction amounts. Example: "100.00".
external_referencestringNo—Your internal order reference ID. Returned in all order responses.
descriptionstringNo—Description of the purchased product or service.
payerjsonYes——
transactionsjsonYes—Payment transactions for this order. Currently supports one transaction.
configjsonNo—Optional settings for the order.
itemslistNo—Items included in the order.
shipmentjsonNo——
additional_infojsonNo—Additional information required for specific payment methods (e.g. PSE).
integration_datajsonNo—Integration metadata used by MercadoPago internally.
status_codeintegerNo—HTTP status code of the completed call
responsejsonNo—Parsed JSON response body
failure_reasonstringNo——
failure_typestringNo——
failed_atstringNo——
failed_stepstringNo——
failed_layerstringNo——
failed_at_statestringNo——
errorstringNo——
error_typestringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—executeWaiting to call POST /v1/orders
completedNoYesYes—HTTP call succeeded
failedNoYesNo—HTTP call failed

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompletedPerform POST /v1/orders
* (any state)failfailedRecord the failure reason

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "mercadopago.orders.create-order",
  "initial_data": {
    "base_url": "value",
    "x_idempotency_key": "value",
    "type": "value",
    "total_amount": "value"
  }
}