Update an order - Merchant Orders - Mercado Pago Developers
Developers
API Reference
Support
Sign in

    Start

    LISTA DE API

    Preferences

    Create a preference

    POST

    Search preferences

    GET

    Get a preference

    GET

    Update a preference

    PUT

    Identification Types

    Get document types

    GET

    Payment Methods

    Get the payment methods

    GET

    Payments

    Create payments

    POST

    Find payments

    GET

    Get a payment

    GET

    Update a payment

    PUT

    Chargebacks

    Get a chargeback

    GET

    Customers

    Create a customer

    POST

    Search for a customer

    GET

    Get a customer

    GET

    Update a customer

    PUT

    Cards

    Save a card

    POST

    Obtain customer cards

    GET

    Get a card

    GET

    Update a card

    PUT

    Delete a card

    DELETE

    Stores

    Get a Store

    GET

    Create a Store

    POST

    Search stores

    GET

    Update a Store

    PUT

    Delete a Store

    DELETE

    Point of Sale

    Create a POS

    POST

    Get all POS

    GET

    Get a POS

    GET

    Update a POS

    PUT

    Delete a POS

    DELETE

    Instore Orders

    Create an order

    POST

    Delete an order

    DELETE

    Instore Orders v2

    Create an order

    PUT

    Get an order

    GET

    Delete an order

    DELETE

    Merchant Orders

    Create an order

    POST

    Search for orders

    GET

    Get an order

    GET

    Update an order

    PUT

    Subscription Preferences

    Create a subscription

    POST

Update an order

PUT

/merchant_orders/{id}
Renew the details of a payment. Indicate the ID of the order and send the parameters with the information you want to update.
Products that use it:
Checkout Pro
Marketplace
QR Code
Request's parameters
id

REQUIRED

number
Localization: pathOrder identifier
additional_info
string
Localization: bodyAdditional information
application_id
string
Localization: bodyapplication identifier
external_reference
string
Localization: bodyReference you can synchronize with your payment system
Response parameters
id
number
Localization: bodyid
status
string
Localization: bodyShow the current merchant order state
opened: Order without payments.
closed: Order with payments covering total amount.
expired: Canceled order that does not have approved or pending payments (all rejected or returned).
external_reference
string
Localization: bodyexternal_reference
preference_id
string
Localization: bodypreference_id
Request
curl
curl -X PUT \
    'https://api.mercadopago.com/merchant_orders/{id}' \
    -H 'Authorization: Bearer ACCESS_TOKEN_ENV' \ 
    -d '{
  "external_reference": "default",
  "preference_id": "Preference identification",
  "payer": {
    "id": 123,
    "nickname": "JOHN"
  },
  "site_id": "MLA",
  "items": [
    {
      "id": "item id",
      "category_id": "item category",
      "currency_id": "BRL",
      "description": "item description",
      "picture_url": "item picture",
      "quantity": 1,
      "unit_price": 5,
      "title": "item title"
    }
  ],
  "application_id": 10000000000000000
}'
Answer
json
{
  "id": 9999999999,
  "status": "closed",
  "external_reference": "default",
  "preference_id": "Preference identification",
  "payments": {},
  "shipments": {},
  "payouts": {},
  "collector": {
    "id": 999999999,
    "email": "",
    "nickname": "TESTRPEHE21Q"
  },
  "marketplace": "NONE",
  "date_created": "2018-09-14T17:11:31.000Z",
  "last_updated": "2018-09-14T17:11:43.000Z",
  "shipping_cost": 0,
  "total_amount": 5,
  "site_id": "mla",
  "paid_amount": 5,
  "refunded_amount": 0,
  "payer": {
    "id": 999999999
  },
  "items": [
    {
      "id": "item id",
      "category_id": "item category",
      "currency_id": "BRL",
      "description": "item description",
      "picture_url": "item picture url",
      "title": "item title",
      "quantity": 1,
      "unit_price": 5
    }
  ],
  "cancelled": false,
  "additional_info": "additional information",
  "application_id": 10000000000000000,
  "order_status": "paid"
}
Errors
400bad_request
invalid_user_idinvalid users involved.
invalid_order_statethe action requested is not valid for the current merchant order state.
invalid_stringstring too long.
invalid_application_idinternal server error.
invalid_itemsonly the item quantity of an item can be modified.
user_not_alloweduser not allowed to operate.
invalid_payment_idinvalid payment identifier.
invalid_operation_typeinvalid operation type.
invalid_payerinvalid payer identifier.
invalid_shipment_idinvalid shipment identifier.
invalid_sponsor_idinvalid sponsor_id.
invalid_marketplaceinvalid marketplace.
unmarshall_errorcould not unmarshal request body into merchant order struct.
invalid_formatinvalid merchant order id.
invalid_urlinvalid URL. Isn't HTTP or HTTPS.
communication_errorError when calling...
401bad_request
invalid_tokenaccess denied.
invalid_caller_idinvalid caller_id
Was this information helpful?

© 2021 MercadoLibre S.R.L.

Terms and conditionsHow we protect your privacy
Partners Mercado Pago

Al navegar en este sitio aceptas las cookies que utilizamos para mejorar tu experiencia. Más información.