MercadoPago Refunds and Cancellations for Custom Checkout

Official Content

Refunds

MercadoPago provides an API to make refunds. There are two types of refund: Full Refund (the payment is completely refunded), or Partial Refund (part of the payment is refunded).

Full Refund

To make a full refund, you will need the Payment's Id.

Event 'FullRefund'
    MercadoPago.PaymentCustomCheckout.FullRefund(&PaymentId,&RefundSDT,&Message,&ErrorCode)
    &ResponsePaymentInfo = &RefundSDT.ToXml()
    if &ErrorCode = 0
        //Success
    else
        Msg(&Message.Description)
    endif
Endevent

&RefundSDT is RefundSDT data type, which is used to receive information about the refund.
&Message contains a description in case an error occurs.

Partial Refund

To make a partial refund, you will need the Payment's Id and the amount that is going to be refunded.
Note: That amount cannot be greater than the payment's total cost.

Event 'PartialRefund'
    MercadoPago.PaymentCustomCheckout.PartialRefund(&PaymentId,&refundAmount,&RefundSDT,&Message,&ErrorCode)
    &ResponsePaymentInfo = &RefundSDT.ToXml()
    if &ErrorCode = 0
        //Success
    else
        Msg(&Message.Description)
    endif
EndEvent

&RefundSDT is RefundSDT data type, which is used to receive information about the refund.
&Message contains a description in case an error occurs.
&refundAmount is the amount to be refunded.

Restrictions

  • You must have enough available money in your account so you can refund the payment amount successfully. Otherwise, you'll get a 400 Bad Request error.
  • You can refund a payment within 90 days after it was accredited.
  • You can only refund payments made with cards.
  • You can only refund approved payments.
  • You can perform up to 20 partial refunds in one payment.
  • By now, it is not possible to perform partial refunds of payments made to MercadoLibre articles (marketplace=MELI).
  • By now, it is not possible to perform partial refunds of payments made with Brazilian MercadoLibre card (payment_method_id=melicard).
  • By now, it is not possible to perform partial refunds of recurring payments in Argentina (operation_type=recurring_payment).

Behavior

  • The payment status will be approved:partially_refunded until it is refunded. Just then the status will change to refunded
  • The refund of payments made with credit card will be reimbursed in the card statement.
  • All fees and taxes will be refunded partially in a proportional way.

Cancellation

To cancel a payment, you will need the Payment's Id.

Event 'CancelPayment'
    MercadoPago.PaymentCustomCheckout.CancelPayment(&PaymentId,&PaymentInfoSDT,&Message,&ErrorCode)
    &ResponsePaymentInfo = &PaymentInfoSDT.ToXml()
    if &ErrorCode = 0
        //Success
    else
        Msg(&Message.Description)
    endif
Endevent

&PaymentInfoSDT is used to receive the payment's new status, where you can confirm the cancellation was made successfully.

Remarks

  • Only pending or in_process payments can be canceled.
  • Cancelled coupon payments, deposits, and transfers will be deposited in the buyer’s MercadoPago account.


Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.