AI resources
Refund payment

This endpoint refunds an advanced payment, either totally or partially. If the request body is empty or the "amount" field is 0, a full refund is performed. For a partial refund, specify the amount to be returned. In case of success, the request will return a response with status 200.

POST

https://api.mercadopago.com/v1/advanced_payments/{advanced_payment_id}/refunds
Request parameters
Header
Authorization
string

REQUIRED

Access Token obtained through the developer panel. Must be sent in all requests.
Path
advanced_payment_id
number

REQUIRED

Unique identifier of the advanced payment to be refunded.
Body
amount
number
Amount to be refunded. If 0 or omitted, the full advanced payment amount is refunded.
Response parameters
id
number
Unique identifier of the refund.
payment_id
number
Unique identifier of the payment associated with this refund.
amount
number
Amount refunded.
source
object
Errors

400Request error.

400

Bad Request.

500Processing error.

internal_error

Some error occurred on our side while attempting to process the request. Please try again later.

Request
curl -X POST \
    'https://api.mercadopago.com/v1/advanced_payments/{advanced_payment_id}/refunds'\
    -H 'Content-Type: application/json' \
       -H 'Authorization: Bearer APP_USR-5*********956537-12*********ff1a3d36d*********47e7b9985*********770' \
    
Response
[
  {
    "id": "1009042015",
    "payment_id": "18552260055",
    "amount": "24.50",
    "source": {
      "name": "user_name",
      "id": "abcdef1e23f4567d8e9123eb6591ff68df74c57930551ed980239f4538a7e530"
    }
  }
]