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.
| State | Meaning | What to do |
|---|---|---|
| Pending payment | Order created, no confirmation yet | Normal for minutes, a problem after an hour |
| Processing | Payment confirmed, invoice created | Ship it |
| Canceled | Cleaned up by cron, stock released | Check 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.
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:
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;- Look up each order at the provider. Search the provider dashboard by order number. Paid there means the notification was lost.
- Count by method. One method with all the stuck orders points to that integration, not to shoppers.
- 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:
| Cause | Sign |
|---|---|
| WAF, firewall or Cloudflare rule | 403 on the notification URL in the access log |
| Maintenance mode or a redirect | 503 or 301 for the provider’s requests |
| Old domain or URL in the provider account | No requests at all reach the store |
| New signing secret or API key after a migration | Requests arrive, Magento rejects the signature |
| Module error while processing | 500 and an exception in var/log or var/report |
# 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 -20Catch 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 →