API Reference

This page will help you get started with Widget Integration.

Overview

Use our SDKs to customize and display the widget. This provides an enhanced customer experience that can be closely integrated with your website for a seamless user journey. Our cashier widget is a user interface element that allows your users to easily deposit cryptocurrency directly within your website or application.

Import

Add the SDK as a script to your HTML file.

<script src="https://cashier.blockatm.net/libs/BlockATM.umd.js?apiKey=[API_KEY]"></script>
<script src="https://cashier.blockatm.net/libs/BlockATM.umd.js?apiKey=9FE9068B-088A-40FF-B914-923FC99BA023&network=ETH"></script>

Once you've included this script, you're ready to initialize the Web SDK and start integrating with our suite of cryptocurrency payment solutions.

When you have multiple API keys corresponding to different networks, you can integrate them all together like this:

<script src="https://cashier.blockatm.net/libs/BlockATM.umd.js?apiKey=[API_KEY1],[API_KEY2]"></script>

Initialize

Initialize the SDK in your application with the flow, variant,lang and any parameters related to deposit cryptocurrency.

window.BlockATM.init(dom, {
  custNo: '**', 
  lang: 'en-US',  
  callback: ({type})=>{
    if(type==='cancel'){
      // Here is the logic to cancel the payment
    }else if(type==='finish'){
      // Here is the logic to complete the payment
    }
  }
})