Real-Time Settlement Notifications
When a customer completes a QR code payment, FuturePayNG immediately sends an HTTP POST request to the webhookUrl configured in your invoice or merchant dashboard.
Webhooks are dispatched within 350ms of network biometric debit confirmation.
Every request carries a cryptographic hash in X-FuturePay-Signature.
Automatic retries for up to 24 hours if your server does not respond with HTTP 200.
How to Verify Webhook Signatures
FuturePayNG signs the webhook payload using your secret key and includes the signature in the X-FuturePay-Signature header in this format:
Verification Steps:
- Extract the timestamp
tand signaturev1from the header. - Construct the payload to sign by concatenating
{timestamp}.{raw_request_body}. - Compute the HMAC-SHA256 hash using your
FUTUREPAY_WEBHOOK_SECRET. - Compare using a constant-time comparison function (e.g.,
hash_equals()).
HMAC-SHA256 Signature Calculator
Verify signature calculation before implementing your backend webhook receiver.
Always use timing-safe comparison (hash_equals($expected, $received) in PHP or crypto.timingSafeEqual() in Node.js) instead of === to prevent timing attacks.
Sample JSON Payloads
Delivery Guarantees & Idempotency Rules
FuturePayNG guarantees at-least-once delivery. In rare situations (such as network timeouts), your server might receive the same webhook event more than once.
- Always check if your internal order status is already
paidbefore processing stock deductions or shipping. - Always respond immediately with an HTTP
200 OKwithin 5 seconds to prevent retries. - Perform long-running background jobs (e.g. sending customer confirmation emails) asynchronously after returning the 200 OK status.