Skip to content

WordPress WooCommerce Stripe Payments — common issues and fixes

WordPress WooCommerce Stripe issues — webhook 401s, SCA challenge failures, idempotency-key conflicts, 3DS redirect loops. The diagnosis tree and the WP-CLI commands.

WordPress WooCommerce stores using the official Stripe Payments plugin (woocommerce-gateway-stripe) account for roughly half of the WooCommerce ecosystem by volume. The plugin is in active development, ships SCA support, and works well in steady state. The failure modes show up at edges: a 3DS challenge that times out, a webhook that 401s during a CDN switch, a duplicate-charge incident traceable to an idempotency-key collision. The cluster of issues we see most often on takeover is captured below.

What’s happening

Stripe Payments for WooCommerce moves through four stages on a typical card payment:

  1. Client-side intent creation. wc_stripe_checkout_intent is created via JS when the customer reaches the checkout. Stripe Elements collects the card details and returns a payment-method token.
  2. Server-side payment-intent confirmation. WooCommerce calls Stripe\PaymentIntent::confirm with the payment-method token and the order amount. The intent enters requires_action if 3D Secure (3DS) is needed.
  3. 3DS challenge. The customer is redirected to the issuing bank’s 3DS page. On success they bounce back to ?wc-stripe-return=1&order_id=… on the store. On failure they bounce back with an error.
  4. Webhook reconciliation. Stripe sends payment_intent.succeeded (or .failed) asynchronously. WooCommerce updates the order status. If the webhook does not arrive, the order can stay in pending even though Stripe shows it as paid.

Five issues dominate WordPress WooCommerce Stripe tickets:

  • Webhook URL 401 or 404. A migration, a security plugin, or a CDN rewrites the /wc-api/wc_stripe/ endpoint and the webhook delivery fails. Stripe retries, then gives up after 3 days.
  • 3DS redirect loop. Customer bounces between the bank’s 3DS page and the WooCommerce return endpoint. Usually a session-cookie issue (SameSite, secure flag) or a CDN that strips the return query string.
  • Idempotency-key collision. WooCommerce reuses an idempotency key across two charges for the same order — typically when the customer clicks Place Order twice during a 3DS challenge. Stripe returns the first charge, WooCommerce thinks both succeeded.
  • Apple Pay / Google Pay not appearing. The button does not render. Usually a missing .well-known/apple-developer-merchantid-domain-association file or a wrong domain on Stripe’s whitelist.
  • Stripe Tax confused by manual tax rates. Stripe Tax and WooCommerce Tax both calculate, the totals diverge, the customer sees one and is charged another.

How to verify

# Stripe plugin version (matters — bugs are version-specific)
wp plugin get woocommerce-gateway-stripe --field=version

# WooCommerce webhook config (these are different from Stripe's webhooks)
wp wc webhook list --format=table

# Stripe webhook secret stored in WC settings
wp db query "SELECT option_value FROM wp_options WHERE option_name='woocommerce_stripe_settings'" | grep -i webhook

# Stripe API logs (the gateway logs every API call)
ls -la wp-content/uploads/wc-logs/stripe-*.log
tail -f wp-content/uploads/wc-logs/woocommerce-gateway-stripe-*.log

# Recent failed orders with Stripe as the payment method
wp wc shop_order list --status=failed --payment_method=stripe --per_page=20 --format=table

# Orders stuck in "pending" payment with a Stripe payment intent
wp db query "SELECT p.ID, p.post_status, pm.meta_value AS intent
  FROM wp_posts p
  JOIN wp_postmeta pm ON p.ID=pm.post_id
  WHERE p.post_type='shop_order'
    AND p.post_status='wc-pending'
    AND pm.meta_key='_stripe_intent_id'
  ORDER BY p.post_date DESC LIMIT 20"

# Test the webhook endpoint manually
curl -i 'https://example.com/?wc-api=wc_stripe' -X POST -H 'Stripe-Signature: t=test'
# Expected: 400 with "Webhook signature verification failed" — that means the endpoint is reachable.
# A 401 / 403 / 404 means something in front is blocking.

If a webhook delivery is failing, Stripe’s dashboard (Developers → Webhooks → Endpoint → Recent attempts) is the authoritative source. The HTTP status code there tells you whether WordPress received the call.

The fix

  1. Re-register the webhook endpoint after any URL or domain change. In the Stripe dashboard, the endpoint should be https://example.com/?wc-api=wc_stripe. The plugin documents /?wc-api= not /wc-api/ — the trailing slash matters. After a domain migration, delete and re-create the endpoint, copy the new signing secret into the WooCommerce settings, and send a test event.
  2. Fix the 3DS redirect loop. Most cases trace to one of:
    • SameSite cookies. Modern browsers default to Lax, which can drop the WooCommerce session on the return from the issuer. Set SameSite=None; Secure on session cookies in nginx or via cookie_domain rules.
    • CDN stripping query strings. Cloudflare and Bunny aggressive caching can strip ?wc-stripe-return=1. Bypass cache for wc-stripe-return=*.
  3. Idempotency-key audit. Look for duplicate charge meta on the same order:
    wp db query "SELECT order_id, COUNT(*) FROM wp_postmeta
      WHERE meta_key='_stripe_charge_captured'
      GROUP BY order_id HAVING COUNT(*)>1"
    For each duplicate, refund one of the charges from the Stripe dashboard. The upstream fix is preventing double-submit at the checkout — disable the Place Order button on click via JS:
    jQuery('form.checkout').on('checkout_place_order', function () {
      jQuery(this).find('#place_order').prop('disabled', true);
    });
  4. Apple Pay / Google Pay. Confirm the domain is verified in the Stripe dashboard (Settings → Payments → Apple Pay → Domains). Confirm the .well-known/apple-developer-merchantid-domain-association file is served at https://example.com/.well-known/apple-developer-merchantid-domain-association with Content-Type: text/plain.
  5. Pick one tax engine. Either Stripe Tax (Stripe calculates) or WooCommerce Tax (WC calculates). Not both. The setting is in WooCommerce → Settings → Payments → Stripe → Stripe Tax.
  6. Add monitoring on stuck-pending orders. A check that alerts when more than 5 orders with _stripe_intent_id set are in wc-pending for more than 30 minutes catches webhook-delivery failures before the customer support queue does.

For the broader Stripe + WooCommerce + WordPress operations playbook, pair this with enterprise WordPress support and the existing Action Scheduler audit article.


Stack Harbor runs WordPress WooCommerce stores on Stripe under the enterprise WordPress support on-call model — the webhook plumbing, the 3DS tuning, and the duplicate-charge reconciliation. If you have orders stuck in pending that Stripe shows as paid, we can sort it out.