A customer sends a screenshot: “Money deducted!” Your dashboard says “Payment pending”. Nine times out of ten, the cause is the same: payment confirmation relies on the browser instead of webhooks.
Short answer: a webhook is a message your payment gateway sends directly to your server when a payment succeeds, fails or is refunded. Unlike the browser redirect after payment, webhooks arrive even if the customer closes the tab or loses network. Set up webhooks, verify their signatures, process them idempotently and log them — and most “pending” order problems disappear.
Redirect vs webhook
| Browser redirect | Webhook | |
|---|---|---|
| Who sends it | Customer’s browser | Gateway server |
| Can be lost | Yes (closed tab, bad network) | Rarely, with retries |
| Trustworthy alone | No | Yes, when verified |
How to set up webhooks properly
- Create a webhook endpoint in your gateway dashboard.
- Subscribe to payment, failure and refund events.
- Verify the signature using your webhook secret.
- Make processing idempotent (the same event twice shouldn’t double-process).
- Return a success response quickly; do heavy work in the background.
- Log every event for troubleshooting.
Common problems
- Firewall or security plugin blocking webhook requests — see WAF explained
- Wrong webhook URL after a migration
- Secret mismatch after regenerating keys
- Caching interfering with endpoint responses
Try this today
Open your gateway dashboard and look at webhook delivery logs. Failed deliveries are your hidden source of “pending” orders.
Related: payment gateway integration in India and UPI integration.
Fix payment issues with HezalNova
We audit and fix payment integrations for WooCommerce and custom sites. See API integration or contact us.
Frequently asked questions
Do WooCommerce payment plugins use webhooks?
Most official gateway plugins do — but they must be configured correctly.
What if a webhook fails?
Gateways usually retry; check logs and your server’s response.
Are webhooks secure?
Yes, when you verify signatures and use HTTPS.