Device ID
Learn how to integrate 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 strongly 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
- Sandbox: https://static-sandbox.dlocal.com/js/collector/direct.js
- Production: https://static.dlocal.com/js/collector/direct.js
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 thisevent_uuid
in the payment request within theadditional_risk_data.device.event_uuid
parameter.
Integration
Integration | Description |
---|---|
Sandbox | Replace {LIBRARY_URL} for Sandbox URL and {ENV} for ‘sandbox’. |
Production | Replace {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.
Updated about 2 months ago