Integrating SadaPay & NayaPay Business Accounts with Automated Webhooks
Complete developer tutorial on connecting SadaPay Business and NayaPay merchant accounts to automate order reconciliation via RESTful webhooks.
The Modern Fintech Experience: SadaPay & NayaPay
Electronic Money Institutions (EMIs) like SadaPay and NayaPay have revolutionized digital banking in Pakistan with clean developer APIs, instant notifications, and modern mobile apps.
For developers building custom React, Next.js, or Laravel applications, integrating these rails for instant checkout reconciliation provides a world-class customer payment journey.
Integration Architecture
When a customer pays via SadaPay or NayaPay:
// Sample TezVerify Webhook Payload Dispatched to Merchant Server
{
"event": "transaction.verified",
"data": {
"uuid": "013684d4-223f-481f-9fd5-85a291f601f0",
"gateway": "sadapay",
"transaction_reference": "SADA-88291039",
"amount_expected": 3500.00,
"amount_detected": 3500.00,
"status": "verified",
"verified_at": "2026-09-15T13:45:00Z",
"customer": {
"name": "Hamza Ali",
"phone": "+923001234567"
}
},
"signature": "sha256=a8f9c7e42b109e8d7c6b5a4..."
}
Step-by-Step Setup Guide
1. Register Your EMI Channel in TezVerify
Navigate to Merchant Dashboard → Payment Channels → Add Bank / Wallet Channel. Select SadaPay Business or NayaPay and configure your alert email or SMS sender code.
2. Verify Webhook Signature in Your Application
To prevent spoofing, always verify the HMAC-SHA256 signature using your TezVerify Webhook Secret:
$payload = file_get_contents('php://input');
$computedSignature = 'sha256=' . hash_hmac('sha256', $payload, config('services.tezverify.secret'));
if (!hash_equals($computedSignature, $request->header('X-TezVerify-Signature'))) {
abort(401, 'Invalid webhook signature');
}
3. Handle Idempotent Event Processing
Store processed transaction_reference IDs in your local database so duplicate webhook deliveries (due to network retries) do not result in double order fulfillment.
Conclusion
Automating SadaPay and NayaPay along with legacy bank rails gives your customers the widest choice of digital payments while keeping your back-office fully automated.