Chargebacks

Chargeback asynchronous notification

If a chargeback was applied (requested by the user) a notification is sent to the merchant to the previously registered Merchant chargeback notification URL by POST protocol, sending the following parameters:

Property

Type

Description

id

String

The chargeback id.

payment_id

String

The payment id.

amount

Positive Float

The amount of the chargeback.

currency

String

The currency of the chargeback.

status

String

The status of the chargeback.

status_code

String

The status code of the chargeback.

status_detail

String

The description of the chargeback's status.

created_date

String

The date of when the chargeback was executed.

Chargeback notifications are signed. Learn more about the signature notifications here.

Example post

POST: {merchant.chargeback_url}

{
"id": "CHAR42342",
"payment_id": "PAY245235",
"amount": 100.00,
"currency": "USD",
"status": "COMPLETED",
"status_code": "200",
"status_detail": "The chargeback was executed.",
"created_date" : "2018-02-15T15:14:52-00:00"
}

get
Retrieve a Chargeback

https://api.dlocal.com/chargebacks/{chargeback_id}
Retrieve information about a chargeback.
Request
Response
Path Parameters
chargeback_id
required
string
The chargeback id
200: OK
{
"id": "CHAR42342",
"payment_id": "PAY245235",
"amount": 100.00,
"currency": "USD",
"status": "COMPLETED",
"status_code": "200",
"status_detail": "The chargeback was executed.",
"created_date" : "2018-02-15T15:14:52-00:00"
}

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 'Authorization: V2-HMAC-SHA256, Signature: 1bd227f9d892a7f4581b998c21e353b1686a6bdad5940e7bb6aa596c96e0a6ec' \
https://api.dlocal.com/chargebacks/CHAR42342

get
Retrieve a Chargeback Status

https://api.dlocal.com/chargebacks/{chargeback_id}/status
Retrieve information about the status of a chargeback.
Request
Response
Path Parameters
chargeback_id
required
string
The chargeback id
200: OK
Example Response
{
"id": "CHAR42342",
"status": "COMPLETED",
"status_code": "200",
"status_detail": "The chargeback was executed."
}

Chargeback status

Status

Status code

Description

PENDING

100

The chargeback is pending.

COMPLETED

200

The chargeback was executed.

CANCELLED

400

The chargeback was cancelled.

REVERSAL

700

The chargeback was completed but has now been reversed.

Simulating Chargebacks in Sandbox

In the Production environment, Chargebacks are triggered by the buyer by calling their bank. In dLocal's Sandbox environment though, merchants can simulate a Chargeback using the method described below:

post
Simulate Chargeback (Sandbox only)

https://sandbox.dlocal.com/sandbox-tools/chargebacks
Simulate a Chargeback in Sandbox
Request
Response
Body Parameters
payment_id
required
string
ID of the payment that is being chargebacked.
200: OK
Successful response returns the id of the chargeback.
{
"id": "CBK-4-184-45b0b9ae-4e05-419e-9248-d5890437b719"
}

Example Request

$ curl -X POST \
-H 'X-Date: 2018-02-20T15:44:42.310Z' \
-H 'X-Login: sak223k2wdksdl2' \
-H 'X-Trans-Key: fm12O7G9' \
-H 'Content-Type: application/json' \
-H 'Authorization: V2-HMAC-SHA256, Signature: 1bd227f9d892a7f4581b998c21e353b1686a6bdad5940e7bb6aa596c96e0a6ec' \
https://sandbox.dlocal.com/sandbox-tools/chargebacks

Example Request Body

{
"payment_id" : "PAY4334346343"
}