Device ID

Javascript integration

This library will allow the collection of detailed device information that will enhance the fraud prevention capabilities for each processed payment, so we recommend the integration of the Fraud Prevention javascript library within the payment flow of the client application.

For merchants with chargeback guarantee service, it's mandatory.

Javascript library URLs

For web applications, in order to integrate our library you should include the following code right after the opening <body> tag:

<!-- Scripts -->
<script src=LIBRARY_URL></script>

<script text="text/javascript">
   dlocalCollector.create({ ENV: {ENV}, apiKey: {API_KEY} }).then((event_uuid) => console.log(event_uuid));
</script>

Setup

Within this code, you should:

  • Replace API_KEY with the public key merchant. This key can be obtained from the Settings > Integration section in the Merchant Dashboard.
  • Retrieve the event_uuid returned by the call to the create method, and submit this event_uuid in the payment request within the additional_risk_data.device.event_uuid parameter.

Integration

IntegrationDescription
SandboxReplace {LIBRARY_URL} for Sandbox URL and {ENV} for ‘sandbox’.
ProductionReplace {LIBRARY_URL} for Production URL and {ENV} for ‘production’ or you can send it empty.

Device ID - Mobile SDKs

For Mobile applications, dLocal provides SDKs for both Android and iOS that enable collecting device information which can then be provided in the payment request, within the additional_risk_data.device.event_uuid parameter.