Including dlocal.js

Learn how to integrate and use dLocal.js.

To use dLocal.js, include the library and set up your API credentials.

Include the library

Include this script on your pages to get started—it should always be loaded directly from https://js.dlocal.com.

For testing purposes, you can use https://js-sandbox.dlocal.com.

<script src="https://js.dlocal.com/"></script>

Using Subresource Integrity (SRI)

We strongly advise implementing Subresource Integrity (SRI) to protect against potential tampering or unauthorized modifications. This security measure ensures that the content being fetched remains unaltered by external threats.

Include SRI hash

To apply SRI, include an integrity attribute within your <script> element.

VersionScriptIntegrity
6.5.0https://static.dlocal.com/modules/fields/6.5.0/parent.jssha384-XyPv8k4n+vVY8J1yZOXR4gV60nGOcvqNcRjdCXCAA3dYDYPW5BKZ0KZRulHyQWA0

Here’s an example of how to securely reference version 6.5.0:

<script src="https://static.dlocal.com/modules/fields/6.5.0/parent.js" integrity="sha384-XyPv8k4n+vVY8J1yZOXR4gV60nGOcvqNcRjdCXCAA3dYDYPW5BKZ0KZRulHyQWA0" crossorigin="anonymous"></script>