website logo
Home
Widget
API
Navigate through spaces
Home
Widget
API
⌘K
Onmeta Widget Integration
🔰Getting started
🛠️Pre requisites
🏗️Widget Creation
KYC with Widget
Developer FAQs
Business FAQs
User FAQ's
How to find the UTR details?
📱Mobile SDK
Docs powered by archbee 
10min

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.

Things to verify : Demo api key from demo dashboard can be used with below sample code.

Live api key from live dashboard can be used with live SDK so change the script tag url as shown in above note.

HTML
|

Events from Widget Onramp:

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.

JSON
|

UTR captured .

JSON
|

UTR verified and Crypto transfer Initiated

JSON
|

Crypto transfer success and transaction success.

JSON
|

Amount mismatch failure event - paid amount and order created amount are different.

JSON
|

Events from Widget Offramp:

Order creation event

JSON
|

In progress event

JSON
|

Success event

JSON
|

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.

Updated 31 Jan 2023
Did this page help you?
Yes
No
UP NEXT
Production checklist
Docs powered by archbee 
TABLE OF CONTENTS
Things to verify : Demo api key from demo dashboard can be used with below sample code.
Events from Widget Onramp:
Events from Widget Offramp: