Simulate order status - Orders - Mercado Pago Developers
Simulate order status

This endpoint allows you to simulate a final status for an order created with test credentials. The simulation does not generate events or interactions with the Point terminal. The status change may take up to 10 seconds to be completed, or up to 40 seconds in the case of simulating the action_required status. In case of success, the request will return a response with status 204 and no content

POST

https://api.mercadopago.com/v1/orders/{order_id}/events
Request parameters
Path
order_id
string

REQUIRED

ID of the order that will have its final status simulated. This value is returned in the response to the "Create order" request.
Body
status
string

REQUIRED

Final status to simulate for the order. The status change may take up to 10 seconds to be processed (or up to 40 seconds to simulate the "action_required" status). The order will automatically change to the "at_terminal" status before reaching the requested final status.
processed: The order has been successfully processed.
canceled: The order has been canceled.
expired: The order has expired.
View more
payment_method_type
string
Payment method type.
debit_card: Simulates a payment made with a debit card.
credit_card: Simulates a payment made with a credit card.
qr: Simulates a payment made through QR code.
View more
installments
integer
Number of installments for the payment. Only applies when "payment_method_type" is "credit_card".
payment_method_id
string
This field allows you to specify which card brand or payment method you want to simulate. Only available when the status to simulate is "processed" or "failed".
amex: American Express credit card brand.
master: Mastercard credit card brand.
visa: Visa credit card brand.
View more
Response parameters
Esta solicitação não tem resposta
Errors

400Error.

bad_request

The order_id provided in the path is not a valid ULID. Check the value and try again.

bad_request

Invalid data was sent in the request body. For example, invalid status values, or fields like "payment_method_id" or "installments" with status values different from those mentioned in the field description, or additional fields not allowed.

bad_request

Invalid order status transition. The status change you are trying to simulate is not allowed by the status machine.

401Error.

unauthorized

The value sent as Access Token is incorrect. Please check and try again with the correct value.

403Error.

forbidden

No permission to access the resource.

404Error.

order_not_found

The Order ID provided in the URL path does not exist. Check if the ID is correct and if the order was created with test credentials.

500Error.

internal_error

An error occurred on our side while processing the request. If the problem persists, please contact Mercado Pago.

Provide valid data in the request parameters before executing.
Request
curl -X POST \
    'https://api.mercadopago.com/v1/orders/{order_id}/events'\
    -H 'Content-Type: application/json' \
       -H 'Authorization: Bearer APP_USR-8*********932064-12*********edf6d3c99*********2236c703f*********668' \
    -d '{
  "status": "processed",
  "payment_method_type": "credit_card",
  "installments": 1,
  "payment_method_id": "visa",
  "status_detail": "accredited"
}'
Response
// This request has not been responded to.