AI resources
Refund paymenthttps://api.mercadopago.com/v1/advanced_payments/{advanced_payment_id}/refunds
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
Request parameters
Header
Authorization
Access Token obtained through the developer panel. Must be sent in all requests.string
REQUIRED
Path
advanced_payment_id
Unique identifier of the advanced payment to be refunded.number
REQUIRED
Body
amount
Amount to be refunded. If 0 or omitted, the full advanced payment amount is refunded.number
Response parameters
id
Unique identifier of the refund.number
payment_id
Unique identifier of the payment associated with this refund.number
amount
Amount refunded.number
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-4*********994754-12*********c73b4e1ac*********cef36b27c*********840' \
Response
[
{
"id": "1009042015",
"payment_id": "18552260055",
"amount": "24.50",
"source": {
"name": "user_name",
"id": "abcdef1e23f4567d8e9123eb6591ff68df74c57930551ed980239f4538a7e530"
}
}
]