All posts

Payment notifications on Magento: orders stuck in “pending payment”

When a shopper pays by card, PayPal or a bank redirect, the order in Magento only becomes Processing when the provider tells your store, in a request that goes from their server to yours. Neither you nor the shopper sees that request. When it fails, a paid order just sits there.

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
Tapping a card on a payment terminal

How payment confirmation works

There are two ways a provider reports a payment: the shopper’s browser returns to the store, and the provider sends a notification, called a webhook or IPN, to a fixed URL. The return can fail if the shopper closes the tab, so the notification is the one that counts.

Provider styleNotificationExample path
PayPal (Magento built-in)IPN/paypal/ipn/
Card providers (Stripe, Adyen, etc.)Signed webhookSet by the module, e.g. /stripe/webhooks
Bank redirect gatewaysCallback or server-to-server POSTSet by the module

The path depends on the payment module; its configuration page or documentation names it, and the provider dashboard shows where it actually sends.

Where it breaks

WhereWhat happensSign
Firewall, WAF, bot protectionThe POST is blocked before Magento403 in the access log, or nothing
RedirectsHTTP to HTTPS or www rules turn POST into GET301 or 302 for the provider
Old URLProvider still sends to staging or the old domainNo requests at all
SignatureNew secret after a migration or key rotation401 or 400 from the module
Maintenance modeDeploy window returns 503Notifications during deploys are lost unless retried
Providers retry, but not forever

Most providers retry failed notifications for hours or days. If the cause is fixed within that window, orders catch up; after it, they need a manual fix.

Test the notification URL

From a server outside your network, send a POST to the notification URL. You want the request to reach Magento: a 400 for a missing signature is fine; a 403, 301 or 503 is not:

bash
curl -s -o /dev/null -w "%{http_code}\n" -X POST \
  -H "Content-Type: application/json" -d "{}" \
  https://example.com/stripe/webhooks

Then check what the provider sees. Every major provider has a delivery log for webhooks, with the status code your store returned and a button to resend.

bash
# What did the store answer to the provider today?
grep -E "POST /(paypal/ipn|stripe/webhooks)" /var/log/nginx/access.log | awk '{print $9}' | sort | uniq -c

Prevent it

  1. Allow the path. Exclude the notification URL from WAF challenges, bot protection and rate limits.
  2. Update the provider after moves. A new domain or environment means a new webhook URL and often a new signing secret.
  3. Watch the delivery log. Failed deliveries in the provider dashboard are the earliest sign.
  4. Watch Pending payment. A growing count of old Pending payment orders means notifications are not landing; see orders stuck in pending payment.

The free MageSentinel Magento module checks for payments stuck pending every 15 minutes and emails you when the count turns red. Related: WAF rules blocking checkout. For a check of the checkout itself, run the free Magento checkout test.

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 →
01What is a payment webhook in Magento?

A server-to-server request from the payment provider to a URL on your store that confirms the payment, so Magento can move the order from Pending payment to Processing.

02Why does the Magento order stay pending after payment?

The notification did not reach Magento or was rejected: a firewall or WAF, a redirect, an old URL in the provider account, a wrong signing secret, or maintenance mode.

03How do I test a Magento webhook URL?

POST to it from outside your network and check that Magento answers, not a firewall or a redirect, then read the provider’s webhook delivery log.