Menu

1 / 2

Why Stripe payment retries fail in WooCommerce (and the one-line cause)

DEV Community: php·Abhijit Shilawat·6 days ago
#kJGuDyHF
#devto#dev#order#stripe#user
Long article (720 words) — no AI summary yet.
Reading 0:00
15s threshold

A customer's card is declined at checkout. They try again, maybe with the same card after approving a bank notification, maybe from their phone instead of their laptop. Instead of going through, the payment fails again with a confusing error. Some give up; others email support.

On a WooCommerce membership platform I support (FunnelKit checkout + Stripe), this was happening regularly. The cause turned out to be a single piece of data: the customer's browser user-agent string.

A quick primer on Stripe idempotency keys

When a payment plugin sends a request to Stripe, it can include an idempotency key : a unique label for that operation. If the same request is sent twice (say, after a network hiccup), Stripe recognises the key and returns the original result instead of charging the customer twice.

There's one strict rule: a key can only be reused with exactly the same parameters.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.