Create refund - Refunds - Mercado Pago Developers
Create refund

POST

/v1/payments/{id}/refunds
Create Partial/Full Refund for a specific payment. If the amount field is filled, it will create a partial refund, if not, it will create a full refund.
Request's parameters
id

REQUIRED

string
Localization: pathPayment identifier
X-Idempotency-Key
string
Localization: headerIdempotency key. When used, avoids duplicated refund
amount
number
Localization: bodyRefund amount. If this property (amount) is removed from body, it will create a full refund.
Response parameters
id
number
Localization: bodyRefund identifier
payment_id
number
Localization: bodyPayment identifier
amount
number
Localization: bodyRefund amount
metadata
array
Localization: bodyContains payment metadata that is sent to us in the payment post
Request
curl
curl -X POST \
    'https://api.mercadopago.com/v1/payments/{id}/refunds' \
    -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
    -H 'Content-Type: application/json' \
    -d '{
  "amount": 5
}'
Answer
json
{
  "id": 1009042015,
  "payment_id": 18552260055,
  "amount": 10,
  "metadata": [
    {}
  ],
  "source": [
    {
      "name": "Firstname Lastname",
      "id": "1003743392",
      "type": "collector"
    }
  ],
  "date_created": "2021-11-24T13:58:49.312-04:00",
  "unique_sequence_number": null,
  "refund_mode": "standard",
  "adjustment_amount": 0,
  "status": "approved",
  "reason": null,
  "label": [
    {}
  ],
  "partition_details": [
    {}
  ]
}
Errors
400bad_request
2063missing-information-on-header-or-the-payment-was-fully-refund-
401bad_request
401Valid-token-required-
4040Amount-should-be-more-than-0-
4041Amount-should-be-a-number-
404bad_request
2032X-Idempontency-key-already-used-
2000Payment_Id_does_not_exist-