If NMI approved the payment but the WooCommerce order shows failed, canceled or pending, the money probably moved and the store lost track of it. The usual cause is that the approval came back from NMI but WooCommerce did not finish processing it: a timeout, a PHP error in another plugin, or a customer retry that created a second order. Do not ask the customer to pay again until you have checked the NMI portal.
Step 1: prove whether money moved
Open the NMI Merchant Portal and find the transaction by the ID in the order notes, or by amount, card last four and time. Read the result, not the order status.
- Approved sale: the customer was charged. Go to Step 2.
- Approved authorization: funds are held, not captured. It still needs a capture or a void.
- Declined or no record: no charge exists, and the failed order is correct. Offer a fresh pay link.
For field meanings, NMI’s classic API returns response=1 for approved, 2 for declined and 3 for an error in the data or system. A 3 is not an approval, even if the page said something went wrong afterward.
Step 2: choose how to reconcile
- Order is still wanted: set it to Processing, and add a note with the NMI transaction ID and the time you checked. Make sure stock was reduced once.
- Order is not wanted: refund or void. Use a void if the transaction has not settled; see NMI void vs refund.
- Customer already paid again on a second order: keep one order and reverse the other charge. Handle this carefully, because a duplicate from your side can look like a double charge on the statement.
Why approved payments end up on failed orders
The response never arrived
WooCommerce sends the charge, NMI approves it, and the connection times out before the response is read. The plugin sees an error and fails the order. Typical signs: the order note shows a connection or timeout error, and the NMI transaction exists with a time stamp a few seconds earlier. Read NMI gateway connection errors in WordPress and raise PHP max execution time and any firewall or proxy timeouts that sit between your server and NMI.
A PHP error after the charge
The charge is approved and then another plugin or theme hook triggers a fatal error while the order is being completed. Check the PHP error log for a message whose time matches the transaction. Memory limits are a frequent culprit; a 128 MB limit can run out on a busy checkout with many plugins.
The order status was changed by something else
Plugins that auto-cancel unpaid orders, stock-hold timers, or fraud tools can set an order to Canceled or Failed while a slow payment is still in flight. If a canceled order has an approval behind it, reduce the timer or exclude the payment method.
The customer retried
When a customer sees an error, they press pay again. The first charge may have been approved and the second may be a new order. NMI can flag repeats on supported processors; see NMI duplicate transaction errors. Whether a duplicate window applies depends on your processor.
Check that credentials are not the cause
If every payment fails after approval, test whether other calls work. A key that can charge but lacks other permissions, or one tied to a different account, can produce mixed results. See NMI authentication failed and invalid security key errors for what to check.
Make it easier next time
- Turn on logging for one week. Logs from this plugin strip card numbers, CVV and the security key, so they are safe to read and share with support.
- Keep the transaction ID visible in the order notes. NMI for WooCommerce stores the auth code, transaction ID and response code on the order.
- Set up a weekly comparison between approved transactions in the portal and paid orders in WooCommerce.
- Do not run auto-cancel timers shorter than your slowest checkout, including any 3D Secure step.
For the other direction, where the card is fine but the gateway says no, start with a diagnosis order for declined cards. For failed subscription charges, see the dunning playbook. More guides are in the troubleshooting center and the troubleshooting docs.
Running NMI on WooCommerce? Free covers the basics and Pro adds the paid features. Compare Free and Pro.
Last reviewed November 2026.