How Do I Test WooCommerce Payments Without Real Charges?
How WooCommerce Test Mode Works
Gateways maintain entirely separate test and live environments, each with its own API credentials. Switching a gateway plugin's setting to "test mode" (sometimes called sandbox mode) points all transactions at the test environment instead of the live one, and using the gateway's published test card numbers there simulates specific outcomes — a successful charge, a decline, an insufficient-funds response, or a fraud-filter block — without any real money moving.
Common Mistakes When Testing
- Test mode toggled on, but live API keys still entered (or vice versa) — the mode toggle and the credentials need to match, since some gateways will happily attempt a real charge with live keys even while the plugin's test-mode switch is on.
- Using a real card number in test mode, which most gateways will simply reject rather than charge, but which doesn't test the specific decline/error scenarios their dedicated test cards are built for.
- Forgetting to switch back to live mode before launch, which is a very common and very disruptive mistake — real customers hitting a test-mode checkout get an error instead of completing an order.
- Not testing failure scenarios at all, only a successful payment — declined cards, expired cards, and 3D Secure prompts all behave differently and are worth testing individually before launch.
Testing Properly Before Launch
- Confirm both the mode toggle and the API keys match (test mode with test keys, live mode with live keys) before testing anything.
- Use the gateway's own published test card numbers to simulate success, decline, and any specific error scenarios relevant to the store.
- Test on a staging copy first if the store already has real customers, to avoid any risk of a live transaction happening accidentally.
- Do a final check that live mode and live keys are active immediately before the store goes live, and place one small real test order to confirm end to end.
Need help setting up a proper testing process before launch? See WooCommerce fixes.