Web hook - Offramp
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 offramp 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
Offramp Webhook Events
Onmeta offramp flow allows you to receive real-time notifications through webhook events when certain events occur. There are four types of webhook events that are supported in this flow:
- pending - This event is triggered when a user has initialised the order but crypto transfer is pending.
- orderReceived - This event is triggered when a user transfers crypto and the tokens are received by Onmeta.
- InProgress (Optional) - This event is triggered when the order is in-progress on the blockchain while swapping tokens (in case of non-base tokens).
- CryptoReceived - When we successfully validate the crypto received from user we send this event.
- PayoutSuccess - This event is triggered when the fiat amount is successfully deposited in the users bank account
- refunded - This event is triggered when refund is successfully completed in case of amount/token mismatch
Example Webhook Request :
๏ปฟ