Onmeta Widget Integration
Widget Creation

Checkout flow - Onramp

4min
to open payment page directly with widget and to skip the quotation page, follow below steps create order via api and keep the orderid which you have received in api response initialize widget with orderid received in step 2 step 1 curl location request post 'https //stg api onmeta in/v1/orders/create' \\ \ header 'accept application/json' \\ \ header 'x api key string' \\ \ data raw '{"buytokensymbol" "string","chainid" "string","fiatcurrency" "string","fiatamount" "string","buytokenaddress" "string","receiveraddress" "string"}' note you need to have auth token to call create order api as above else you will receive 401 unauthorized error response { "success" true, "data" { "orderid" "989073230", "pgorderid" "1212121", "upicode" "", "redirect actions" { "qr checkout string" " ", "deeplinks" \[ { "name" "phonepe", "url" " ", "imageurl" "https //ik imagekit io/z3vwasz5xwz/meta widget/payment icons/phonepe 53ukywiqw\ svg" }, { "name" "google pay", "url" " ", "imageurl" "https //ik imagekit io/z3vwasz5xwz/meta widget/payment icons/gpay cqioypphf svg" }, { "name" "paytm", "url" " ", "imageurl" "https //ik imagekit io/z3vwasz5xwz/meta widget/payment icons/paytm owarcqfdy svg" }, { "name" "others", "url" " ", "imageurl" "https //ik imagekit io/z3vwasz5xwz/meta widget/payment icons/bhim t366jhpdh svg" }, { "name" "qr", "url" " ", "imageurl" "https //ik imagekit io/z3vwasz5xwz/meta widget/payment icons/bhim t366jhpdh svg" } ] } }, "error" {} } step 2 \<script src="https //stg platform onmeta in/onmeta sdk js">\</script> \<div id="widget">\</div> \<script> let createwidget = new onmetawidget({ elementid "widget", apikey "bujbw93003j4", useremail "test\@test com", onramp "enabled", fiattype "inr", fiatamount 100, //needs to be same as create order value orderid "6496b1f3dbde72d010890d84", // orderid from step 1 walletaddress "", }); \</script> once you pass orderid to widget initialisation params, it will fetch order details and load the widget with prefilled data and take user directly to payment page