Embedding widget
Once you are ready with the widget configuration you can embed the code within your HTML web app and start using it instantly.
Sample code shown below on how to embed the widget within a HTML page.
Note: For demo setup use the below script tag only.
Live api key from live dashboard can be used with live SDK so change the script tag url as shown in above note.
The widget events gives you data to take action on and utilise it with callBack functions and few of the responses are as below. Here orderID is unique for that transaction.
Order Created waiting for UTR.
UTR captured .
UTR verified and Crypto transfer Initiated
Crypto transfer success and transaction success.
Amount mismatch failure event - paid amount and order created amount are different.
Order creation event
In progress event
Success event
Copy the above snippet to a file in your local machine and save it as onmeta_widget.html and update the apiKey: "{demo_api_key}" with the key you received in the demo dashboard. After this open this html file in browser and you will see the widget with the default tokens and start using it.
Don't make any money transfer for testing, enter random number as UTR* and it will be processed. * UTR is 12 digit number for UPI and IMPS payment options and 16 digit alphanumeric for NEFT payment.