AI resources
Refund order

This endpoint performs a full or partial refund of a processed order. To perform a full refund, you must not send the amount to be refunded in the request body. To perform a partial refund, you must indicate the amount to be refunded along with the transaction ID you wish to return. Multiple partial refunds can be issued against the same order as long as the cumulative refunded amount does not exceed the total paid amount. In case of success, the request will return a response with status 200.

POST

https://api.mercadopago.com/v1/orders/{order_id}/refund
Request parameters
Header
Authorization
string

REQUIRED

Access token to authenticate the request. For more information, see the [Authentication](https://www.mercadopago.com/developers/en/docs/your-integrations/credentials) documentation.
X-Idempotency-Key
string

REQUIRED

This function allows you to repeat requests safely, without the risk of carrying out the same action more than once by mistake. This is useful to avoid mistakes such as creating two identical payments. To ensure that eac
Path
order_id
string

REQUIRED

ID of the order that is being refunded. This value is returned in the response to the 'Create order' ("/v1/orders") request.
Body
transactions
array

CONDITIONALLY REQUIRED

Contains information about the transactions associated with the order. It can contain only one transaction. Required for partial refund. For a full refund, send an empty body. Mutually exclusive with "splits".
splits
array

CONDITIONALLY REQUIRED

Split participants to refund. Mutually exclusive with "transactions".
Response parameters
id
string
Identifier of the order being processed in the request.
status
string
Current status of the order.
status_detail
string
Details about the order status.
transactions
object
Contains information about the refund transactions.
Errors

400Request error.

refund_amount_exceeds

An incorrect value for some property was sent. The amount provided exceeds what is available for refund. Check the message returned in the error details to find out what the problem was and try again.

order_refund_already_in_process

A full refund is already being processed for this order. Check the message returned in the error details to find out what the problem was and try again.

401Error. Access Token not authorized.

401

The value sent as Access Token is incorrect. Please check and try again with the correct value.

invalid_credentials

There is no support for test credentials. Use test users with production credentials for the sandbox environment and your production credentials for the production environment.

404Resource not found.

transaction_not_found

The transaction ID provided does not exist in this order. Use the id from `transactions.payments[].id`.

409Some specific system rule does not allow the action to be performed due to defined restrictions.

idempotency_key_already_used

The value sent as the idempotency header ("X-Idempotency-Key") has already been used. Please try the request again sending a new value.

order_already_refunded

Order already refunded.

cannot_refund_order

Cannot refund order. Please check if the order is already refunded.

order_refund_already_in_process

There is already a full refund request in process for the order in question.

500Generic error.

internal_error

Generic error. Please try submitting the request again.

Request
curl -X POST \
    'https://api.mercadopago.com/v1/orders/{order_id}/refund'\
    -H 'Content-Type: application/json' \
       -H 'Authorization: Bearer ' \
       -H 'X-Idempotency-Key: 5c3b71ba-1743-40b1-b635-3420aeaae9bd' \
    -d '{
  "transactions": [
    {
      "id": "PAY01HRYFWNYRE1MR1E60MW3X0T2P",
      "amount": "100.00"
    }
  ],
  "splits": [
    {
      "user_id": 1,
      "amount": "50.00"
    }
  ]
}'
Response
{
  "id": "ORD01J49MMW3SSBK5PSV3DFR32959",
  "transactions": {
    "refunds": [
      {
        "amount": "100.00"
      }
    ]
  }
}