AI resources
Refund paymenthttps://api.mercadopago.com/v1/advanced_payments/{advanced_payment_id}/refunds
This endpoint refunds a payment ("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
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 payment to be refunded.
Body
amount
number
Amount to be refunded. If 0 or omitted, the full 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.
invalid_path_param
The "advanced_payment_id" provided in the path is not valid. Please confirm it and provide a valid id to try again.
500Generic error.
internal_error
An internal server error occurred. Please try again later. If the problem persists, contact support and provide the x-request-id and details about the operation performed.
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*********782856-12*********f202ca494*********f0baa4bb3*********648' \
-d '{
"amount": 24.5
}'Response
[
{
"id": "1009042015",
"payment_id": "18552260055",
"amount": "24.50",
"source": {
"name": "user_name",
"id": "abcdef1e23f4567d8e9123eb6591ff68df74c57930551ed980239f4538a7e530"
}
}
]