Change expiration date
The expiration date represents the maximum deadline to complete a payment. With Checkout Pro, you can customize the default expiration date for offline payments using the config.default_payment_due_date field in the order creation request.
The config.default_payment_due_date field accepts values in ISO 8601 format. For example, P1D equals 1 day from the order creation.
To configure the expiration date, include the config.default_payment_due_date field when sending the request to the Create orderAPI endpoint.
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", "payer": { "email": "buyer@email.com" }, "items": [ { "title": "My product", "unit_price": "1000.00", "quantity": 1, "unit_measure": "unit", "total_amount": "1000.00" } ], "config": { "default_payment_due_date": "P3D" } }'