Skip to main content

Refund Transaction

This route is used when you want to refund a Paid Transaction. Only the transaction_id of the transaction is required for the refund to be effective, passed in the PATH of the endpoint.

Note

Only transactions with paid status can be refunded.

POSTv1/refund/:transaction_id

Request Path Variable

AttributeTypeDescription
transaction_idstringTransaction ID to be refunded.
Attention

It is necessary to save the transaction_id that Marlim returns in transaction requests in your application. Only with this id will it be possible to proceed with the refund.

Request Body Params

AttributeTypeDescription
amountnumberOptional parameter if you want to refund a value smaller than the total paid (partial refund).

If this parameter is omitted, the amount refunded will be the total amount paid previously (full refund).

Samples

Request
curl -X POST "https://api.wu.global.marlim.co/v1/refund/55554444" \
-H "Content-Type: application/json" \
-H "api_key: api_key_value" \
-d '{}'
Response200
{
"status": "refunded",
"nsu": "55554444",
"order_id": "123456789",
"date_created": "2022-05-04T02:00:00.000Z",
"date_updated": "2022-05-04T03:00:00.000Z",
"net_value": 300000,
"authorized_amount": 320341,
"paid_amount": 0,
"refunded_amount": 320341,
"installments": "3",
"transaction_id": "55554444",
"card_holder_name": "Lord Darth Vader",
"card_brand": "amex",
"card_first_digits": "777788",
"card_last_digits": "4444",
"acquirer_status_code": "0000"
}