AI resources

Reserve values

A reserve of values happens when a purchase is made and its amount is reserved from the total limit of the card, ensuring that the value is kept until the completion of processing.

To carry out a reserve authorization, send a POST with all the necessary attributes and add the attribute capture=false to the endpoint /v1/payments and execute the request or, if you prefer, use one of the SDKs below.

<?php
  use MercadoPago\Client\Payment\PaymentClient;


  MercadoPagoConfig::setAccessToken("YOUR_ACCESS_TOKEN");

  $client = new PaymentClient();
  $request_options = new RequestOptions();
  $request_options->setCustomHeaders(["X-Idempotency-Key: <SOME_UNIQUE_VALUE>"]);

  $payment = $client->create([
    "transaction_amount" => 100,
    "token" => "123456",
    "description" => "My product",
    "installments" => 1,
    "payment_method_id" => "visa",
    "payer" => [
      "email" => "test_payer@example.com",
    ],
    "capture" => false
  ], $request_options);
  echo implode($payment);
?>

The response indicates that the payment is authorized and pending capture.

{
"id": PAYMENT_ID,
...
"status": "authorized",
"status_detail": "pending_capture",
...
"captured": false,
...
}

In addition, it is also possible to return as rejected or pending. Please note that authorized values cannot be used by your client until they are captured. We recommend capturing as soon as possible.

Important
The reservation will be valid for 5 days. If you do not capture it within this period, it will be canceled. In addition, it is necessary to save the payment ID in order to complete the process.