Onmeta Widget Integration
Widget Creation
Steps to integrate custodial wallet (Offramp)
9min
client can integrate custodial wallets for offramp orders in onmeta widget following the steps below make sure you have set widget parameter metamask=disabled so that custodial wallet flow is triggered 1 generate sell quote by entering fiat amount 2 complete kyc check 3\ fetch bank details 4 otp api onmeta will send below request body to client's otp api endpoint to send otp to user email client has to expose otp endpoint for onmeta { type "onmetasell", email useremail, } 5\ user enters otp (stores it locally) 6\ select bank account 7\ create order on clicking the confirm button above order will be created 8 transfer api to get the crypto in users wallet send below request body to users withdrawal endpoint, client has to expose transfer api endpoint for onmeta to make transfer request { "email" "test\@gmail com", "waddress" "0x23134131", "otp" "1234", "receiverwalletaddress" "receiverwalletaddress", "token" "10 6", "orderdetails" { "orderid" 12345, "fiat" 100, "tokenaddress" "0xeeeeeeeeeeee", //sell token address "metadata" "sample" //optional if passed during widget init } } if you pass any metadata for widget initialisation that will forwarded to you from above body within orderdetails filed below is the expected response for success case of transfer api { "txnhash" "0x8a2585bb8b2c5bc4 0cf422b62e3a0331c0b7", "orderid" "646dd7248 7bf5d2c" } below is the expected reponse for failure case of transfer api set your error inside code filed to show in widget { "error" { "code" "insufficiant funds" } }