This section explains the steps to configure callback URLs for receiving events about the completed transaction.
Configuring Webhook
Webhooks are configured in merchant dashboard.
Inside API Setup section, webhook can be added and modified under Callback URL's section.
Generating HMAC
Signature is computed using Hash-based message authentication code (HMAC) using a secret key. The secret key is the API Secret present in your merchant dashboard.
The example implementation in Nodejs is show below ⬇️
This callback will be triggered when the crypto coins are deposited to the given receiver address. will use the configured webhook url to send order completed details in POST body.
POST
Params
Header Parameters
Content-Type
optional
String
application/json; charset=utf-8
X-Onmeta-Signature
required
String
{{signature-of-the-request}} as computed above.
Body Parameters
fiat
required
String
fiat amount
receiverWalletAddress
required
String
receiver Wallet address
buyTokenSymbol
required
String
token symbol ex: BTC/USDC
buyTokenAddress
required
String
smart contract of the token example : "0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889" for WMATIC
orderId
required
String
order ID - unique for a given ID
status
required
String
order status : "completed"
currency
required
String
currency type example: "inr"
chainId
required
Number
block chain ID : example: "80001" for polygon testnet
customer
required
Object
txnHash
required
String
transaction hash for completed order.
transferredAmount
required
String
quantity of crypto tokens transferred
transferredAmountWei
required
String
transferredAmount in Gwei
createdAt
required
String
created time
eventType
required
String
onramp/offramp
eventType will be onramp for this order
Make sure you have firewall rule allowed for receiving the webhook body if not your firewall might block our webhook requests.