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
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.
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.
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-8*********932064-12*********edf6d3c99*********2236c703f*********668' \
-H 'X-Idempotency-Key: 2f3fa6ff-af40-4350-a1e5-52cab6904102' \
-d '{
"type": "qr",
"total_amount": "50",
"description": "Smartphone",
"external_reference": "ext_ref_1234",
"expiration_time": "PT16M",
"marketplace_fee": "11",
"integration_data": {
"platform_id": "dev_1234567890",
"integrator_id": "dev_1234",
"sponsor": {
"id": "446566691"
}
},
"config": {
"qr": {
"external_pos_id": "EXTERNALPOS019285",
"mode": "hybrid"
}
},
"transactions": {
"payments": [
{
"amount": "25"
}
],
"cash_outs": [
{
"amount": "25"
}
]
},
"taxes": [
{
"payer_condition": "payment_taxable_iva"
}
],
"items": [
{
"title": "Smartphone",
"unit_price": "25",
"quantity": 1,
"unit_measure": "kg",
"external_code": "777489134",
"external_categories": [
{
"id": "device"
}
]
}
],
"discounts": {
"payment_methods": [
{
"new_total_amount": "47",
"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",
"country_code": "CL",
"marketplace_fee": "11",
"integration_data": {
"application_id": "dev_1234567890",
"platform_id": "dev_1234567890",
"integrator_id": "dev_1234",
"sponsor": {
"id": "446566691"
}
},
"status": "created",
"status_detail": "created",
"currency": "CLP",
"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"
}
},
"transactions": {
"payments": [
{
"id": "PAY01J67CQQH5904WDBVZEM4JMEP3",
"amount": "25",
"status": "created",
"status_detail": "ready_to_process"
}
],
"cash_outs": [
{
"id": "CAS01J67CQQH5904WDBVZEM4JMEP3",
"amount": "25",
"status": "created",
"status_detail": "ready_to_process"
}
]
},
"taxes": [
{
"payer_condition": "payment_taxable_iva"
}
],
"items": [
{
"title": "Smartphone",
"unit_price": "25",
"quantity": 1,
"unit_measure": "kg",
"external_code": "777489134",
"external_categories": [
{
"id": "food"
}
]
}
],
"discounts": {
"payment_methods": [
{
"new_total_amount": "47",
"type": "account_money"
}
]
},
"type_response": {
"qr_data": "00020101021243650016com.mercadolibre020130636261ba79b-e543-41c7-b71a-cec05c18e72b50120008326594305204970053030325802AR5904Test6004CABA63041094"
}
}