Webhooks — Instant Payment Event Notifications
Your App Knows Instantly
When Payments Happen
NiraPay sends real-time HTTP POST notifications to your server the moment a payment event occurs. No polling, no delays — just instant, reliable webhooks with automatic retry on failure and HMAC signature verification to keep your integration secure.

Everything You Need in a Webhook System
Production-grade webhook infrastructure built directly into NiraPay — no third-party services required.
Real-Time Delivery
Events are pushed to your endpoint within milliseconds of the payment confirmation on-chain. No polling needed.
HMAC Signature Verification
Every webhook payload is signed with HMAC-SHA256. Verify the signature on your server to ensure authenticity.
Automatic Retry
If your server is temporarily unavailable, NiraPay retries delivery with exponential backoff — no missed events.
Per-Gateway Configuration
Configure a separate webhook URL for each payment gateway. Full isolation between your products and clients.
Multiple Event Types
Subscribe to payment_confirmed, payment_expired, withdrawal_completed, and more — only what you need.
Delivery Logs
Full webhook delivery history with request body, response code, and timestamp — easy debugging from your dashboard.
How Webhooks Work
Four simple steps from payment to your server being notified — all in under a second.
Set Your Webhook URL
In your gateway settings, enter the HTTPS endpoint on your server where NiraPay should send events.
Customer Makes a Payment
A customer completes a crypto payment through your NiraPay gateway.
NiraPay Sends the Event
NiraPay instantly POSTs a signed JSON payload to your URL describing the payment event.
Your Server Responds
Verify the HMAC signature, process the event (e.g. fulfil the order), and return HTTP 200.
Verify a Webhook in Seconds
// Node.js — Verify NiraPay webhook signature
import crypto from 'crypto';
app.post('/webhook', (req, res) => {
const signature = req.headers['x-nirapay-signature'];
const payload = JSON.stringify(req.body);
const expected = crypto
.createHmac('sha256', process.env.NIRAPAY_WEBHOOK_SECRET)
.update(payload)
.digest('hex');
if (signature !== expected) {
return res.status(401).send('Invalid signature');
}
const { event, data } = req.body;
if (event === 'payment_confirmed') {
// fulfil the order
fulfillOrder(data.order_id);
}
res.status(200).send('OK');
});
NiraPayStart Receiving Webhook Events Today
Set up your webhook URL in minutes. Real-time notifications, automatic retry, and HMAC verification — all included at no extra cost.
2025 NiraPay. All Rights Reserved.
