<script src="https://cdn.jsdelivr.net/npm/finswich-checkout@1.0.7/index.min.js"></script>
vanilla Javascript Integration
<!<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Static Template</title>
<script src="https://cdn.jsdelivr.net/npm/finswich-checkout@1.0.7/index.min.js"></script>
</head>
<body>
<button onclick="Open()" >Open</button>
<button onclick="Close()" >Close</button>
<script>
let myModal;
const init_option = {
reference: "your_user_ref",
public_key:"your_finswich_live_public_key",
balance: "your_current_user_balance",
origin: "your_whitelisted_app_origin"
};
document.addEventListener("DOMContentLoaded", function () {
myModal = new FinSwitch(init_option);
});
const Close = () => {
myModal.closeModal()
}
const Open = () => {
myModal.openModal()
}
</script>
</body>
</html>