AI resources

Refunds and cancellations

Important
This documentation is for integrators. If you need to cancel a purchase or request a refund, visit the Mercado Pago Help Center. In your account, select the purchase and choose Need help to see the options for that purchase.

The examples on this page use the Payments API, which applies to Checkout Bricks payments. Use the id returned when creating the payment. If your integration uses a different API, check its management operations before running these examples.

Refunds are transactions made when a certain charge is reversed and the amounts paid are returned to the buyer. This means that the customer will receive back the amount paid for the purchase of a certain product or service on their account or credit card statement.

Cancellations end eligible payments that have not yet been completed. To return amounts from an approved and captured payment, issue a refund.

Cancellation availability depends on the payment status and method.

In this documentation, you will find the necessary information to perform a full and partial refund, and cancel a purchase in your store.

Cancellations

Before canceling a purchase, the following factors must be considered:

  • Current status: query the status, status_detail and, for card authorizations, captured fields in the response from Get paymentGET before requesting cancellation. pending and in_process are values of status.

  • Eligibility: Payments with status: pending or status: in_process may be eligible for cancellation, depending on the payment method. The examples below state the conditions and markets for each cancellation scenario. For payments already approved and captured, request a refund.

  • Expiration: check date_of_expiration and the rules of the payment method you integrated. Do not use a universal 30-day deadline to decide whether to cancel the purchase. After cancellation, confirm the payment status through the API; do not promise same-day credit-limit availability to the buyer.

See Update paymentPUT for the cancellation operation parameters.

Refunds

Refunds can be made in two ways: full, when the total sale amount is returned to the buyer, or partial, when only part of the paid amount is returned to the buyer.

Before performing a refund, it is important to consider the factors below.

  • Refund Deadline: it is possible to refund a payment within 180 days of its approval date.

  • Account Balance: you must have sufficient balance available in your account to refund the amount, otherwise the transaction will not be concluded.

  • Payment method: for payments by credit card, the amount will be refunded directly on the invoice. For other payment methods such as Pix, for example, the amount will be returned to the payer's account.

To create a refund, see Create refundPOST. To check a completed operation, use Get specific refundGET from the Payments API.

Run operations with the Payments API

Keep the Access Token on the backend only. Replace PAYMENT_ID with the payment you want to manage. Before running the operation, query the payment to confirm its status and amount.

Choose the instructions for the payment’s current status. Cancellation, total refund and partial refund are alternatives; do not run all three examples in sequence on the same payment. Generate a unique key for each refund operation, such as a UUID v4, to replace the illustrative key in the examples.

Check the operation

To query the payment and the specific refund, use the IDs returned by the API:

curl
curl 'https://api.mercadopago.com/v1/payments/PAYMENT_ID' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
curl
curl 'https://api.mercadopago.com/v1/payments/PAYMENT_ID/refunds/REFUND_ID' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN'

If a refund request needs to be repeated, reuse the same idempotency key and body. Use a different key for a new refund operation. If the API returns an error, query the payment and existing refunds before starting another operation. An amount greater than the available refundable amount can be rejected; do not consider a refund complete just because the request was sent.