Web hook - Onramp
This section explains the steps to configure callback URLs for receiving events about the completed transaction.
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 β¬οΈ
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.
Sample body
ο»Ώ
- transferredAmount and transferredAmountWei will be sent in fiatPending and completed state
- conversionRate and commission is sent inside the metaData along with user-set metaData (if any) in the completed state
ο»Ώ
Webhook Events
Onramp Webhook Events
Onmeta provides six types of webhook events that allow you to receive real-time notifications when specific events occur during the onramp flow.
# | EventName | Description |
---|---|---|
1 | fiatPending | This event is triggered when a user has initialised an order but fiat deposit from user is pending. |
2 | orderReceived | This event is triggered when a user completes payment and Onmeta has initiated the crypto transfer. |
3 | InProgress (optional) | This event is triggered when the order is in-progress on the blockchain. |
4 | fiatReceived | This event is received on confirming that Onmeta has received payment for the onramp order. |
5 | transferred | This event is triggered when a user's token transfer is confirmed on the blockchain. |
6 | completed | This event is triggered when a user's order is completed and the user has received the tokens. |
7 | expired | When an order remains pending for more than three hours, the order is expired and this webhook event is triggered. |
Note : Optional events will occur when using non-native tokens
Example Webhook Request :
ο»Ώ
ο»Ώ