Webhook Payload
This is the JSON data structure sent to your selected callback URL when a status changes.
| Field | Type | Description |
|---|---|---|
userId |
String | The unique identifier of your user, as sent in your original API request. |
orderId |
String | The unique order reference you passed when creating the payment or withdrawal request. |
amount |
Number | The nominal value of the transaction. |
status |
String | The transaction outcome enum. Possible values: PROCESSING, SUCCESS,
FAILED. |
secretKey |
String | The secret key you provided in your original API request. Use this to verify the webhook request is valid and authentic. Compare this value with the secretKey you sent during payment/withdrawal creation. |
Make sure your webhook listener responds with an HTTP
200 OK status code to acknowledge the receipt
of the payload.
Sample JSON Payload
Here is an example of what your server will receive exactly:
{
"userId": "1234",
"orderId": "5943283783228437583",
"amount": 100,
"status": "FAILED",
"secretKey": "32435j4kh53kj45"
}
🔐 Webhook Verification
How to verify that the webhook request is legitimate and not forged.
Every webhook response includes the secretKey that you originally sent in your deposit or withdrawal API request. To verify the webhook:
- Store the
secretKeyyou sent during payment/withdrawal creation on your server. - When you receive a webhook, compare the
secretKeyin the payload with the one stored on your server. - If they match, the webhook is valid. If not, reject the request.
// Example: Verify webhook on your server (Node.js)
app.post('/webhook', (req, res) => {
const { userId, orderId, amount, status, secretKey } = req.body;
// Compare with the secretKey you stored during payment creation
const storedSecretKey = getStoredSecretKey(orderId); // your DB lookup
if (secretKey !== storedSecretKey) {
return res.status(401).json({ error: 'Invalid webhook signature' });
}
// Webhook is valid — process the payment update
console.log(`Order ${orderId} status: ${status}`);
res.status(200).json({ received: true });
});
Transaction Statuses
The status property indicates the latest state of the payment. Handle these states
programmatically.
PROCESSING
PROCESSING The
transaction is still being processed and hasn't reached a final state yet.
SUCCESS
SUCCESS The funds
were transferred or the payment was received by the system.
FAILED
FAILED The
transaction could not be completed, or was rejected by the provider.
Webhook API Docs