Define order validity
Validity is the period defined for an order to remain active. By configuring it, you can set an effective start date and an expiration date that defines the maximum deadline to complete the payment.
To configure the validity, include the config.online.available_from and expiration_time parameters when sending the request to the Create orderAPI endpoint:
- In
config.online.available_from, enter the effective start date and time in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ssZ). For example:"2026-01-15T12:00:00.000-04:00". - In
expiration_time, enter the expiration time from the order creation in ISO 8601 format. For example:"P1D"equals 1 day.
curl
curl -X POST \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ENV_ACCESS_TOKEN' \ -H 'X-Idempotency-Key: UNIQUE_KEY' \ 'https://api.mercadopago.com/v1/orders' \ -d '{ "type": "online", "processing_mode": "manual", "total_amount": "1000.00", "external_reference": "order_pro_123", "expiration_time": "P1D", "payer": { "email": "buyer@email.com" }, "items": [ { "title": "My product", "unit_price": "1000.00", "quantity": 1, "unit_measure": "unit", "total_amount": "1000.00" } ], "config": { "online": { "available_from": "2026-01-15T12:00:00.000-04:00" } } }'