What are Webhooks?
Webhooks allow CWMPay to notify your server automatically when a payment event occurs — without you needing to poll or manually verify. When a payment is confirmed, CWMPay sends aPOST request to your webhook URL with the payment details.
Setting Up Webhooks
Option 1 — Dashboard (Recommended)
- Login to app.cwmpay.in
- Go to Webhooks section from the sidebar
- Enter your HTTPS webhook URL
- Click Save Webhook
- Copy your Webhook Secret — store it safely
Option 2 — Per Payment
PasswebhookUrl in the Create Payment request:
Per-payment
webhookUrl takes priority over the dashboard webhook URL.Webhook Payload
CWMPay sends aPOST request with Content-Type: application/json:
Payload Fields
Events
Handling Webhooks
Retry Logic
If your webhook endpoint fails (non-2xx response or timeout), CWMPay will retry automatically.Security
Always verify the webhook signature before processing. See Verify Signature for detailed instructions.Testing Webhooks
Use the Test Webhook button in your dashboard to send a test event to your webhook URL. Use webhook.site for quick testing during development.Next Steps
Verify Signature
Learn how to verify webhook signatures
Error Reference
View all error codes

