This endpoint allows to create an order for QR Code for payment and cashout transactions. It is possible to create a payment transaction, a withdrawal transaction, or both at the same time. In case of success, the request will return a response with status 201.
POST
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
400Error.
bad_request
An attempt was made to create the order with unsupported or invalid fields. Please retry sending the request, validating all fields and.
empty_required_header
The "X-Idempotency-Key" header is required and was not sent. Make the request again including it.
marketplace_not_valid
The Access Token sent as a header in the request is not one obtained through the OAuth protocol and, therefore, it is not possible to identify a valid marketplace. Please verify that you have completed the process correctly.
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.
property_type
An incorrect property type was sent. Check the message returned in the error details to find out what the problem was and try again.
sponsor_id_not_valid
An invalid value was sent as the Mercado Pago account identifier (USER_ID). Check the returned message in the error details to find out what the problem was and try again.
seller_configuration
The seller is not authorized to make requisitions with cashout ("cash_out") transactions. Please contact your Mercado Pago advisor to register the user and try again.
unsupported_site
An attempt was made to create the order from an unsupported country. Make sure you have the necessary authorization.
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.
discounts_not_allowed_with_installments
The `discounts` node is not compatible with `installments_cost`. Remove `discounts` from the request or do not include `installments_cost`.
401Error.
unauthorized
The value sent as Access Token is incorrect. Please check and try again with the correct value.
404Error.
marketplace_fee_not_allowed
The "marketplace_fee" field cannot be submitted because the marketplace could not be found. Please verify if the correct Access Token was sent and try again.
pos_not_found
The value for the "external_pos_id" field does not belong to any POS. Please confirm that you entered the correct value and try again.
409Error.
idempotency_key_already_used
The value sent as the idempotency header has already been used with a different request within the last 24 hours. Please try the request again sending a new value.
422Error.
cashout_not_allowed_with_installments_cost
The `transactions.cashouts` node is not compatible with `installments_cost`. Orders that include installment financing cannot contain cashout transactions.
500Error.
500
Generic error. Please check the returned message and try submitting the request again.
curl -X POST \
'https://api.mercadopago.com/v1/orders'\
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer APP_USR-1*********685765-12*********1b4332e5c*********e077d7679*********664' \
-H 'X-Idempotency-Key: 59d76b8b-c1ad-408f-98c3-b044c32e4d9e' \
-d '{
"type": "qr",
"total_amount": "50.00",
"description": "Smartphone",
"external_reference": "ext_ref_1234",
"expiration_time": "PT16M",
"marketplace_fee": "11.20",
"integration_data": {
"platform_id": "dev_1234567890",
"integrator_id": "dev_1234",
"sponsor": {
"id": "446566691"
}
},
"config": {
"qr": {
"external_pos_id": "EXTERNALPOS019285",
"mode": "static"
},
"payment_method": {
"default_type": "credit_card",
"installments_cost": "seller",
"installments": {
"interest_free": {
"type": "range",
"values": [
{
"value": 1
}
]
},
"available": {
"type": "all"
}
}
}
},
"transactions": {
"payments": [
{
"amount": "24.50"
}
],
"cash_outs": [
{
"amount": "24.50"
}
]
},
"items": [
{
"title": "Smartphone",
"unit_price": "24.50",
"quantity": 1,
"unit_measure": "kg",
"external_code": "777489134",
"external_categories": [
{
"id": "device"
}
]
}
],
"discounts": {
"payment_methods": [
{
"new_total_amount": "47.28",
"type": "account_money"
}
]
}
}'{
"id": "ORD00001111222233334444555566",
"user_id": "5238400195",
"type": "qr",
"external_reference": "ext_ref_1234",
"description": "Smartphone",
"expiration_time": "PT16M",
"processing_mode": "automatic",
"total_amount": "50.00",
"country_code": "AR",
"marketplace_fee": "11.20",
"integration_data": {
"application_id": "dev_1234567890",
"platform_id": "dev_1234567890",
"integrator_id": "dev_1234",
"sponsor": {
"id": "446566691"
}
},
"status": "created",
"status_detail": "created",
"currency": "ARS",
"created_date": "2024-09-10T14:26:42.109Z",
"last_updated_date": "2024-09-10T14:27:42.109Z",
"config": {
"qr": {
"external_pos_id": "EXTERNALPOS019285",
"mode": "hybrid"
},
"payment_method": {
"default_type": "credit_card",
"installments_cost": "seller",
"installments": {
"interest_free": {
"type": "range",
"values": [
1,
6
]
},
"available": {
"type": "all"
}
}
}
},
"transactions": {
"payments": [
{
"id": "PAY01J67CQQH5904WDBVZEM4JMEP3",
"amount": "24.50",
"status": "created",
"status_detail": "ready_to_process"
}
],
"cash_outs": [
{
"id": "CAS01J67CQQH5904WDBVZEM4JMEP3",
"amount": "24.50",
"status": "created",
"status_detail": "ready_to_process"
}
]
},
"items": [
{
"title": "Smartphone",
"unit_price": "24.50",
"quantity": 1,
"unit_measure": "kg",
"external_code": "777489134",
"external_categories": [
{
"id": "food"
}
]
}
],
"discounts": {
"payment_methods": [
{
"new_total_amount": "47.28",
"type": "account_money"
}
]
},
"type_response": {
"qr_data": "00020101021243650016com.mercadolibre020130636261ba79b-e543-41c7-b71a-cec05c18e72b50120008326594305204970053030325802AR5904Test6004CABA63041094"
}
}