Webhooks are automated HTTP POST requests sent from one system to another when specific events occur. In payment processing, webhooks notify your server about payment status changes in real-time.An event occurs (e.g., payment confirmed)
Gateway sends HTTP POST to your webhook URL
Your server processes the notification
Your server responds with 200 OK Event Description
Payment created, awaiting funds
Payment confirmed on blockchain
Payment deadline passed
Payment processing failed HMAC signatures: Verify the
Timestamp validation: Reject old requests
Idempotency: Handle duplicate deliveries Return 200 quickly: Process asynchronously if needed
Be idempotent: Same webhook may arrive multiple times
Log everything: Debug issues with complete logs
Handle failures: Gateway will retry on non-2xx responses API Authentication
HMAC Signature
Crypto Payment Gateway Webhook Security Guide
Webhooks Documentation
How Webhooks Work
βββββββββββββββ Event occurs ββββββββββββββββ
β Payment β ββββββββββββββββΆ β Your β
β Gateway β POST /webhook β Server β
βββββββββββββββ ββββββββββββββββ ββββββββββββββββ
200 OK response
Common Payment Webhook Events
|-------|-------------|
payment.pendingpayment.confirmedpayment.expiredpayment.failedWebhook Security
Always verify webhook authenticity:
X-Signature headerExample Webhook Payload
{
"event": "payment.confirmed",
"timestamp": 1705320600,
"payment": {
"id": "pay_abc123",
"status": "CONFIRMED",
"amount": 100.00,
"tx_hash": "a1b2c3..."
}
}