All posts

Magento 2 orders stuck in pending payment: causes and fixes

Every Magento store has a few Pending payment orders: shoppers who reached the payment page and walked away. The problem starts when paid orders land there too. The money arrives, the order never moves, and Magento may cancel it a few hours later.

Free checkout scan

Enter your store address. A real browser adds a product to the cart and walks the checkout up to the payment step, like a customer, and shows you every step with a screenshot.

  • Free, no account
  • Stops before payment, no order
  • Nothing to install
· Updated · 3 min read
An hourglass standing on pebbles

What pending payment means

For redirect and hosted payment methods, Magento creates the order before the shopper pays and sets it to the pending_payment state. It moves to Processing only when the payment provider confirms the payment, through the return to the store or a server-to-server notification.

StateMeaningWhat to do
Pending paymentOrder created, no confirmation yetNormal for minutes, a problem after an hour
ProcessingPayment confirmed, invoice createdShip it
CanceledCleaned up by cron, stock releasedCheck the provider if the customer paid

Magento cancels them after a while

The cron job sales_clean_orders cancels Pending payment orders older than the lifetime set in Stores → Configuration → Sales → Sales → Orders Cron Settings → Pending Payment Order Lifetime. The default is 480 minutes.

A paid order can be cancelled

If the notification never arrives, the cleanup cancels an order the customer paid for and releases its stock. The customer has a charge and an email from the bank, and you have a cancelled order.

Abandoned or lost?

List the orders that have been waiting longer than an hour, with their payment method:

sql
SELECT o.increment_id, o.created_at, o.grand_total, p.method
FROM sales_order o
JOIN sales_order_payment p ON p.parent_id = o.entity_id
WHERE o.state = 'pending_payment'
  AND o.created_at < NOW() - INTERVAL 1 HOUR
ORDER BY o.created_at DESC
LIMIT 50;
  1. Look up each order at the provider. Search the provider dashboard by order number. Paid there means the notification was lost.
  2. Count by method. One method with all the stuck orders points to that integration, not to shoppers.
  3. Compare with yesterday. A sudden jump on a normal day means something changed: a deploy, a firewall rule, a new key.

Common causes of missed notifications

The notification is a POST from the provider’s servers to a URL on your store. Anything that blocks it leaves the order waiting:

CauseSign
WAF, firewall or Cloudflare rule403 on the notification URL in the access log
Maintenance mode or a redirect503 or 301 for the provider’s requests
Old domain or URL in the provider accountNo requests at all reach the store
New signing secret or API key after a migrationRequests arrive, Magento rejects the signature
Module error while processing500 and an exception in var/log or var/report
bash
# Did the provider reach the store? Adjust the path to your payment module
grep -E "POST /(paypal/ipn|stripe/webhooks)" /var/log/nginx/access.log | tail -20
More on each provider in payment notifications on Magento.

Catch it the day it starts

Alert when the number of Pending payment orders older than an hour grows. The free MageSentinel Magento module checks for payments stuck pending every 15 minutes on its Store health page and emails you when the count turns red. Related: Magento cron and the WooCommerce version of this problem.

Check your own store now with the free Magento checkout test: it walks the checkout in a real browser up to payment and shows the step where it stops.

Find out your checkout broke before your customers do.

Real checkout checks for Magento and WooCommerce · free plan · no card requiredMagento checkout monitoring →
FAQ

Common questions

Still have a question?More answers, and a way to reach us.Support →
01Why are my Magento orders stuck in pending payment?

Either the shopper did not finish paying, or the provider’s confirmation never reached Magento because of a firewall, a redirect, an old URL or a signature error.

02Does Magento cancel pending payment orders?

Yes. The sales_clean_orders cron job cancels them after the Pending Payment Order Lifetime, 480 minutes by default, and releases the stock.

03How do I find paid orders stuck in pending payment?

List Pending payment orders older than an hour and look each one up in the payment provider’s dashboard. Paid there means the notification was lost.