Skip to main content

Widget Integration

You can also use the Zoksh payment script to trigger the ramp flow.

Embed script

Include the script hosted at https://pay.sandbox.zoksh.com/public/embed.js to your site to enable ramp on the site.

Trigger widget

<body>
<button id="buy_now">Buy now</button>
</body>
<script src="https://pay.sandbox.zoksh.com/public/embed.js" ></script>
<script>
document.querySelector('#buy_now').addEventListener('click', async () => {
const mp = new Zoksh({
mode: 'ramp',
apiKey: '63a003db4b7c475b2fb782e6', // REQUIRED
environment: 'test', // test , prod
prefill: {
name: 'Demo user',
email: 'demo@demo.com'
},
rampConfig: {
wallets: {
ethereum: '0xf2ccabfb643a44d9c7b775a60b2c26dce9895fed655f********************',
bitcoin: 'bc1qxy2kgdygjrsqtzq2n0yrf****************'
},
networks: ['ethereum', 'bitcoin'],
cryptos: ['ETH','BTC']
}
});
mp.init();
})
</script>