Plugins Plugin hub Backup SEO Caching Security Forms WooCommerce Images Best backup plugins
Hosting Hosting directory Shared hosting Managed WordPress Cloud hosting VPS hosting By reader location Hosting finder
Themes & builders Compare Rank Math vs Yoast
Tools All tools Hosting finder Plugin stack builder Cost calculator Salt generator Theme detector Who is hosting this? Speed test Headline analyzer robots.txt generator Redirect generator Uptime calculator Blog name generator
Blog Best backup plugins Deals
Guides All guides Speed up WordPress Choose hosting Back up WordPress
How we test

WooCommerce · Guide

How to Test WooCommerce Payments Without Charging a Real Card

How to Test WooCommerce Payments Without Charging a Real Card

Short answer

To test WooCommerce payments, turn on your payment gateway's test or sandbox mode, such as Payments > Settings > Enable test mode in WooPayments, then place an order using the gateway's test card numbers. Check that the order status, emails and stock update correctly, test failed and 3D Secure payments too, and switch back to live mode before taking real orders.

Key takeaways

  • Every major WooCommerce gateway offers a test or sandbox mode that moves no real money.
  • Use the gateway's published test card numbers; real cards fail in test mode.
  • Test successful, declined and 3D Secure payments, not just the happy path.
  • Check order statuses, emails, stock and webhooks after each test order.
  • Never test by placing real orders and refunding them, because fees are usually not returned.

Why should you test WooCommerce payments?

Testing proves that customers can actually pay, that orders reach the right status and that emails and stock update, before a broken checkout costs you real sales.

Checkout problems are easy to miss. A store can look perfect while a payment setting, webhook or plugin conflict quietly blocks every order.

Test whenever you launch a store, add or change a payment gateway, update WooCommerce or a major plugin, or change your checkout page. Our guide on updating WooCommerce safely explains how testing fits into a safe update routine.

Why not just place a real order and refund it?

Real orders move real money, and most gateways keep their transaction fees when you refund, so testing with live payments costs you money and can trigger fraud checks.

WooCommerce's WooPayments testing guide warns that fees on live orders placed for testing are not refunded, and recommends test mode for all test orders.

Repeated live charges and refunds from the same card can also look suspicious to payment processors. Test mode avoids that risk entirely.

How do you test payments with WooPayments?

Go to Payments > Settings, tick Enable test mode, confirm and save, then place an order with one of WooPayments' test card numbers; test orders are created in WooCommerce and labelled as test mode.

  1. Go to Payments > Settings in your dashboard
  2. Tick Enable test mode and confirm
  3. Click Save changes
  4. Add a product to the cart and go to checkout
  5. Enter a test card number, any future expiry date and any three-digit CVC
  6. Place the order and check it under WooCommerce > Orders

Orders placed in test mode carry a notice on the order screen, and order emails get a [Test] prefix, so you can tell them apart from real sales.

On staging or development sites, use a WooPayments sandbox or test account instead. It processes only test transactions and needs no real business details.

If you are not sure what WooPayments is, our explainer on what WooPayments is covers the basics.

How do you test payments with Stripe?

In the WooCommerce Stripe plugin settings, enable test mode or connect a Stripe sandbox, then pay with Stripe's test card 4242 4242 4242 4242, any future expiry date and any CVC.

Stripe publishes a full list of test card numbers, including cards that trigger declines, insufficient funds and 3D Secure checks. They only work with test keys.

Stripe now offers sandboxes as isolated test environments with their own keys and webhooks. Make sure the keys in WooCommerce belong to the same sandbox where you look for test payments.

Our guide on setting up Stripe in WooCommerce covers connecting the account and webhooks.

How do you test PayPal payments?

Create sandbox accounts in the PayPal Developer dashboard, connect your WooCommerce PayPal plugin in sandbox mode, and pay using the sandbox buyer account instead of a real PayPal login.

The PayPal sandbox documentation explains how to create test business and personal accounts. Sandbox money is fake and never reaches a bank.

Log in to the sandbox business account afterwards to confirm the payment arrived. That checks both sides of the transaction.

Which scenarios should you test?

Test a successful payment, a declined card, a payment needing 3D Secure authentication, a refund, and an order from a guest and a logged-in customer, on both desktop and mobile.

ScenarioWhat to check
Successful paymentOrder moves to Processing or Completed
Declined cardClear error message, no order paid
3D SecureAuthentication popup works on mobile
RefundRefund recorded and email sent
Coupon orderDiscount and totals are correct
Shipping optionsRates appear and totals update

Declined payments matter as much as successful ones. Customers who see a confusing error usually leave instead of trying again.

Test 3D Secure on a real phone. Stripe's guide to Strong Customer Authentication explains why many European card payments now need this extra step. Strong Customer Authentication rules in Europe and elsewhere mean many customers will see this step.

What should you check after each test order?

Check the order status, the order notes, the customer and admin emails, stock levels, any coupons or taxes, and the payment record in your gateway's dashboard.

Order notes show what the gateway reported, which helps when something looks wrong. A payment that succeeded at the gateway but left the order pending usually points to a webhook problem.

Our troubleshooting guide for orders stuck on pending payment covers that situation in detail.

If emails did not arrive, check WooCommerce > Status > Logs for the transactional emails log before blaming the payment gateway.

How do you test webhooks and order status updates?

Place a test order, then confirm in your gateway dashboard that the webhook event was delivered successfully and that the WooCommerce order moved to the expected status without manual changes.

Webhooks are messages the payment provider sends back to your store to report what happened, such as a successful charge or a refund. If they fail, orders can stay pending even though money moved.

Most gateway dashboards list recent webhook deliveries with their response codes. A failed delivery usually points to a firewall, security plugin or caching rule blocking the request.

Our troubleshooting guide for Stripe webhook errors in WooCommerce walks through the common causes and fixes.

How do you test subscriptions and saved cards?

Buy a subscription product with a test card, then use your subscription tools to trigger an early renewal, and check that the renewal charge, emails and next payment date are correct.

Saved cards need their own test. Place one order while saving the card, then place a second order using the saved card, so you know returning customers can pay quickly.

How do you test checkout for real customers' devices?

Run your test orders on a phone and a desktop, in at least two browsers, and with autofill and wallet payments such as Apple Pay or Google Pay where your gateway offers them.

Many checkout problems only appear on mobile. Buttons can sit behind cookie banners, fields can be hard to tap, and payment popups can open off screen.

Ask someone who has never used your store to complete a test purchase while you watch. Their hesitation shows you which steps confuse real shoppers.

Should you test on a staging site or the live store?

Test major changes on a staging site first, then run a short test on the live store in test mode during a quiet period, because only the live site has your real hosting, caching and domain setup.

Staging catches most problems safely. Our guide on setting up a staging site for WordPress explains how to create one.

On the live store, remember that test mode affects all customers using that gateway. Keep the test window short, or use admin-only test mode where your gateway plugin offers it.

How do you clean up after testing?

Delete or trash test orders, restore any stock that test orders reduced, remove test customer accounts, and switch every gateway back to live mode before you announce the store is open.

WooPayments can delete its test orders in bulk from WooCommerce > Status > Tools. For other gateways, filter orders by date or note and delete them by hand.

Double-check live mode by looking at the gateway's settings page and the checkout itself. Test mode usually shows a notice on the checkout or in the dashboard, so that notice should be gone.

How often should you test checkout?

Run a quick checkout test after every WooCommerce, theme or payment plugin update, after checkout design changes, and on a regular schedule such as monthly, even when nothing seems to have changed.

Payment providers update their systems too, and an expired key or webhook can break checkout without any change on your side.

Keep a simple checklist so tests are fast and consistent. Over time, it becomes a five-minute habit that protects your revenue.

Frequently asked questions

What card number can I use to test WooCommerce?

It depends on the gateway. Stripe and WooPayments accept the test Visa number 4242 4242 4242 4242 with any future expiry date and any three-digit CVC, but only in test or sandbox mode.

Do WooCommerce test orders appear in my orders list?

Yes. Test orders are created like normal orders. WooPayments marks them with a test mode notice and prefixes test order emails, so you can tell them apart and delete them later.

Can I test payments without affecting real customers?

Use a staging site with a sandbox account for most tests. On a live store, keep test mode on only briefly, or use an admin-only test option if your gateway plugin offers one.

Why does my real card fail in test mode?

Test mode only accepts the gateway's test card numbers. Real cards are rejected because no real money can move while the gateway is in test or sandbox mode.

How do I delete WooPayments test orders?

Go to WooCommerce, then Status, then Tools, and use the option to delete WooPayments test orders. For other gateways, filter and delete test orders manually from the orders screen.

Sources

  1. WooPayments: Testing WooCommerce Docs
  2. Testing Stripe Docs
  3. Sandbox testing guide PayPal Developer
  4. Strong Customer Authentication Stripe

Is your product missing, or something out of date?

Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.

About the editors

Written and checked byWPLegible Editorial Team Independent WordPress reviews and guides

Researched from the primary sources listed above and checked against our editorial rules before publishing.