WooCommerce Stripe: Pending Payments Stuck — Causes & Fixes
If you are using WooCommerce with the Stripe payment gateway, you might encounter an issue where payments remain stuck in a “pending” status indefinitely. This problem prevents orders from completing and can disrupt your store’s sales flow. The quick fix usually involves ensuring that Stripe webhooks are correctly configured and that WooCommerce’s scheduled tasks (cron jobs) are running properly.
Quick Fix: Set Up Stripe Webhooks and Verify WooCommerce Cron
- Log in to your Stripe Dashboard.
- Navigate to Developers > Webhooks.
- Create a new webhook endpoint with your WooCommerce webhook URL:
https://yourdomain.com/?wc-api=wc_stripe - Select the following events to listen for:
payment_intent.succeededpayment_intent.payment_failedcharge.refundedcharge.failedcheckout.session.completed
- Save the webhook and copy the signing secret.
- Go to WooCommerce > Settings > Payments > Stripe and paste the webhook secret.
- Ensure your WordPress cron is running by installing a plugin like WP Crontrol or setting up a real cron job on your server.
- Manually trigger WooCommerce scheduled tasks or wait for the next cron run to update payment statuses.
Why This Happens
WooCommerce Stripe payments rely on Stripe’s webhook notifications to update order statuses automatically. When a customer completes payment, Stripe sends an event to your site’s webhook URL. WooCommerce listens for these events and updates the order status accordingly.
If webhooks are missing, misconfigured, or blocked, WooCommerce never receives payment confirmation. As a result, payments stay in a “pending” state. Additionally, if WordPress cron jobs are disabled or not running, scheduled tasks that check payment statuses and update orders won’t execute, causing delays or stuck statuses.
Step-by-Step: Fix WooCommerce Stripe Pending Payments
- Verify your webhook URL in Stripe:
https://yourdomain.com/?wc-api=wc_stripeThis URL must be publicly accessible and use HTTPS.
- Create or update the webhook in Stripe:
- Log in to Stripe Dashboard > Developers > Webhooks
- Click Add endpoint
- Enter the URL above
- Select these events:
payment_intent.succeeded payment_intent.payment_failed charge.refunded charge.failed checkout.session.completed - Save and copy the webhook secret key
- Add the webhook secret to WooCommerce:
- Go to WordPress Admin > WooCommerce > Settings > Payments > Stripe
- Find the Webhook secret field
- Paste the copied webhook secret
- Save changes
- Ensure WordPress cron is running:
- Install the WP Crontrol plugin
- Go to Tools > Cron Events and check for WooCommerce scheduled tasks like
woocommerce_scheduled_subscription_paymentorwoocommerce_cancel_unpaid_orders - If cron is disabled, enable it by editing
wp-config.phpand removing or settingdefine('DISABLE_WP_CRON', false); - Alternatively, set up a real server cron job to call
wp-cron.phpevery 5-10 minutes:
* * * * * wget -q -O - https://yourdomain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1 - Manually trigger webhook events or wait for cron:
- In Stripe Dashboard, you can resend webhook events to test
- Wait for WordPress cron to run and update order statuses
- Check WooCommerce orders to confirm payment status updates
Checking Logs for Troubleshooting
Logs help identify webhook delivery issues or errors in payment processing.
- Stripe Logs: In Stripe Dashboard, go to Developers > Logs to see webhook delivery status and errors.
- WooCommerce Logs: Go to WooCommerce > Status > Logs, select the Stripe log file (e.g.,
stripe-YYYY-MM-DD.log), and review recent entries. - Server Logs: Check your web server error logs for any 4xx or 5xx errors related to the webhook URL.
Works on
| Environment | Notes |
|---|---|
| Apache | Ensure mod_rewrite is enabled and .htaccess rules allow webhook URL access. |
| Nginx | Configure location blocks to allow access to ?wc-api=wc_stripe endpoint. |
| LiteSpeed | Compatible with Apache .htaccess; verify rewrite rules. |
| cPanel / Plesk | Supports cron jobs and SSL setup needed for webhooks. |
| Managed WordPress Hosting | Check with host if WP cron is disabled and request real cron setup. |
FAQ
- Q: How do I know if Stripe webhooks are working?
- A: Check the Stripe Dashboard under Developers > Webhooks for recent delivery attempts and their status. Successful deliveries show a green checkmark.
