Configure callback URL

Learn everything you need to know to define callback URL.

The callback_url parameter is used in the REDIRECT flow to return the user to this URL after the user completes the payment flow or returns from the payment instructions page.

How does it work

dLocal will send an HTTP POST request to this callback_url with the following parameters:

ParameterDescription
paymentIdThe payment ID is returned by dLocal API when sending the initial payment request. Part of the signature validation.
statusPart of the signature validation. See table below.
signatureSignature to validate the integrity. See below how to validate it.
datePOST request date. Part of the signature validation.

Status

StatusDescription
COMPLETEDApplies only to cards for 3DS flow. 3DS authentication was completed but the card has not been charged yet.
APPROVEDThe payment was approved.
REJECTEDThe payment was rejected.
PENDINGThe payment is still waiting for confirmation.

📘

Important

Do not use the status parameter in this POST to update the final status in your database. Instead use the get payment status with the paymentId received in the POST to retrieve the current status.

Signature

It is suggested to validate the signature sent in the POST to make sure dLocal is sending the request.

$RequestBody='{status:'+$body_status+',paymentId:'+$body_payment_id+'}' 
$signature=hmac256($API-secretKey, $X-Login+$body_date+$RequestBody)

You must compare $signature result with the signature sent in the POST request