Refunds

Learn how to make refunds.

This service allows you to create and read refunds of an existing payment.

For card payments, a Refund is the reversal of a credit card payment, where the funds are taken from the Merchant and given back to the Card Holder.

For alternative payment methods, a bank transfer will be made to the customer.
A refund processing fee may apply.

If any of the following parameters are missing or invalid, dLocal will send an email to the buyer (to the email provided during the Create payment asking them for the information.

Parameters: beneficiary_name, bank, bank_account, bank_account_type, bank_branch.

Example request

$ curl -X POST \
    -H 'X-Date: 2018-02-20T15:44:42.310Z' \
    -H 'X-Login: sak223k2wdksdl2' \
    -H 'X-Trans-Key: fm12O7G9' \
    -H 'X-Version: 2.1' \
    -H 'User-Agent: MerchantTest / 1.0 ' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: V2-HMAC-SHA256, Signature: 1bd227f9d892a7f4581b998c21e353b1686a6bdad5940e7bb6aa596c96e0a6ec' \
    https://api.dlocal.com/refunds

{
    "payment_id" : "PAY4334346343",
    "amount": 100.00,
    "currency": "USD",
    "notification_url": "http://some.url"
}

Refund asynchronous notification

If a refund is pending, the refund confirmation is sent asynchronously to the refund notification URL by POST, sending The Refund Object parameters.

Example POST

POST: {refund.notification_url}

{
    "id" : "REF42342",
    "payment_id" : "PAY245235",
    "amount" : 803.04,
    "amount_refunded" : 803.04,
    "currency" : "BRL",
    "status" : "SUCCESS",
    "status_code" : 200,
    "status_detail" : "The refund was paid.",
    "created_date" : "2018-02-15T15:14:52-00:00",
    "order_id" : "SALE-124635123"
}

Retrieve a refund

Example request

$ curl \
    -H 'X-Date: 2018-02-20T15:44:42.310Z' \
    -H 'X-Login: sak223k2wdksdl2' \
    -H 'X-Trans-Key: fm12O7G9' \
    -H 'X-Version: 2.1' \
    -H 'User-Agent: MerchantTest / 1.0 ' \
    -H 'Authorization: V2-HMAC-SHA256, Signature: 1bd227f9d892a7f4581b998c21e353b1686a6bdad5940e7bb6aa596c96e0a6ec' \
    https://api.dlocal.com/refunds/REF42342

Refunds Generic Flow