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:
| Parameter | Description |
|---|---|
paymentId | The payment ID is returned by dLocal API when sending the initial payment request. Part of the signature validation. |
status | Part of the signature validation. See table below. |
signature | Signature to validate the integrity. See below how to validate it. |
date | POST request date. Part of the signature validation. |
Status
| Status | Description |
|---|---|
COMPLETED | Applies only to cards for 3DS flow. 3DS authentication was completed but the card has not been charged yet. |
APPROVED | The payment was approved. |
REJECTED | The payment was rejected. |
PENDING | The payment is still waiting for confirmation. |
Important
Do not use the
statusparameter in this POST to update the final status in your database. Instead use the get payment status with thepaymentIdreceived 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
Updated over 2 years ago
