This page provides a comprehensive guide to initializing the DEUNA Web SDK in your application.
Stable version; 1.2
Requirements
To use the DEUNA Web SDK, you must have:
- Knowledge of web development with JavaScript.
- An active account at DEUNA.
- Valid DEUNA credentials.
If you experience any delays in obtaining your credentails, please contact [email protected].
Install the Web SDK
Web SDK initialization begins.
Follow security and privacy practices when handling user financial information.
1. Add the DEUNA Web SDK to your project
Load our SDK via the official URL for the desired environment.
The DEUNA Web SDK can only be installed via CDN.
The attributecrossorigin
provides support for CORS defining how the script element handles cross-origin calls.
Add the following script to your HTML file:
<script crossorigin src="https://cdn.deuna.io/web-sdk/v1.2/index.js"></script>
You can also add the DEUNA SDK dynamically using JavaScript.
Example
if (typeof DeunaSDK === "undefined") { // si el SDK de DEUNA aun no se encuentra agregado
var script = document.createElement("script");
script.src = "https://cdn.deuna.io/web-sdk/v1.2/index.js";
script.onload = function() {
// Initicializar el SDK de DEUNA y
// mostrar un widget
};
document.head.appendChild(script);
} else {
// mostrar un widget
}
2. Initialize the SDK
Create an instance of the class DeunaSDK:
await DeunaSDK.initialize({
publicApiKey: "YOUR_PUBLIC_API_KEY", // Llave pública proporcionada por DEUNA
env: "sandbox",// Ambiente de pruebas (sandbox) o producción (production)
});
3. Choose the widget component
Continue the integration process following the specific instructions for each component.
Choose the component: