website logo
Home
Widget
API
Navigate through spaces
⌘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
KYC Webhook Configuration
Docs powered by archbee 

Steps to integrate custodial wallet (Offramp)

12min

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

Select token and enter amount to get sell quote
Select token and enter amount to get sell quote


2.Complete KYC check

Complete kyc details
Complete kyc details


3. Fetch Bank Details



Document image


4.OTP API

Onmeta will send below request body to user's otp api endpoint to send otp to user email. Client has to expose otp endpoint for onmeta.

JSON
|
{
      type: "onmetaSell",
      email: userEmail,
}


5. User enters OTP (stores it locally)

Document image


6. Select bank account

Document image


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.

JSON
|
{
    "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.

JSON
|
{
    "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.

JSON
|
{
  "error": {
      "code":"INSUFFICIANT_FUNDS"
    }
}

Document image

Document image




Updated 30 May 2023
Did this page help you?
Yes
No
PREVIOUS
Production checklist
NEXT
KYC with Widget
Docs powered by archbee 
TABLE OF CONTENTS
1.Generate Sell Quote by entering fiat amount
2.Complete KYC check
3. Fetch Bank Details
4.OTP API
5. User enters OTP (stores it locally)
6. Select bank account
7. Create Order
8.Transfer API