Reading view

Razorpay payment captured but WooCommerce sometimes cancels order as "Unpaid" — webhook configuration keeps changing

I'm trying to figure out a strange Razorpay + WooCommerce issue and would appreciate some help from anyone who has dealt with something similar.

Setup:

WordPress / WooCommerce: 11.0.1

Razorpay WooCommerce plugin: 4.8.7

Hosting: Namecheap

Razorpay live payments

The main problem is that a customer can successfully complete a Razorpay payment, and Razorpay shows the payment as Captured, but in some cases WooCommerce later marks the order as:

"Cancelled — Unpaid order cancelled"

It doesn't happen to every order. For example, I had around 10 orders and most went through correctly, while 2 ended up cancelled.

The more concerning issue is the webhook configuration.

I had configured the webhook with the required payment events, including:

payment.authorized

payment.captured

payment.failed

order.paid

refund.created

But the webhook later reverted to only 2 of events (payment.authorised and refund.created)

I checked Razorpay's API logs and found something strange. The same webhook was repeatedly being updated:

GET /webhooks?count=10&skip=0

followed about 1 second later by:

PUT /webhooks/SYam0mYdbMI4Ns

This happened on:

15 Aug → GET → PUT

16 Aug → GET → PUT

17 Aug → GET → PUT

I did not manually edit the webhook on those dates.

When I inspected the resulting webhook configuration, payment.authorized and refund.created was enabled but payment.captured, payment.failed and order.paid were disabled.

submitted by /u/404ClicksFound
[link] [comments]
  •  
❌