1. Documentation /
  2. WooCommerce Payments Documentation /
  3. WooCommerce Payments: Testing & Troubleshooting /
  4. Testing WooCommerce Payments

Testing WooCommerce Payments

This document provides instructions for testing payments and the payment-related functionality of WooCommerce Payments. To learn more about WooCommerce Payments, including how to set it up on your store, see our main documentation page.

Enabling test mode

↑ Back to top

By default, WooCommerce Payments will accept real payment methods, such as cards, and actually charge your customers. To test payments, refunds, disputes, and other such processes, you need to switch WooCommerce Payments into Test Mode.

Working on a staging or development site? Create a test account with Dev Mode.

To enable Test Mode:

  1. Go to Payments > Settings
  2. Check the Test Mode box.
  3. Click Save changes at the bottom.
Test mode enabled in the WooCommerce Payments settings.

Test mode data

↑ Back to top

While test mode is enabled, the Payments admin pages will only show test mode data. This includes data shown under Deposits, Transactions, and Disputes.

To remind store owners that test mode is currently enabled, a notice is also displayed at the top of any page under the Payments menu item.

An alert showing that test mode is enabled.

Testing card payments

↑ Back to top

To simulate a card payment:

  1. Enable test mode, if it’s not already.
  2. Go to your site’s store page.
  3. Add a product to your cart.
  4. Proceed to the checkout page.
  5. Complete checkout form fields.
  6. Enter a test card number.
    • Real card details will not work in test mode.
  7. Enter any future month and year.
  8. Enter any 3 digit CVC code.
  9. Place your order.

The order will be processed just as if you had used a real card.

After you land on the Order Received / “Thank you” page, you can go back into the admin dashboard of your site and find the test transaction in all the usual places, including under WooCommerce > Orders and Payments > Transactions.

Test card numbers

↑ Back to top

To test payments, the following test card numbers should be used:

NumberBrandExp. DateCVC Code
4242 4242 4242 4242VisaAny future dateAny three digits
4000 0566 5566 5556Visa (debit)Any future dateAny three digits
5555 5555 5555 4444MastercardAny future dateAny three digits
5105 1051 0510 5100Mastercard (prepaid)Any future dateAny three digits
3782 8224 6310 005American ExpressAny future dateAny three digits
6011 1111 1111 1117DiscoverAny future dateAny three digits

Country-specific test card numbers

↑ Back to top

Cards issued outside the country or region of your WooCommerce Payments account can incur additional fees. To test an international payment, the following test card numbers should be used:

NumberCountryExp. DateCVC Code
4000 0003 6000 0006Australia (AU)Any future dateAny three digits
4000 0004 0000 0008Austria (AT)Any future dateAny three digits
4000 0005 6000 0004Belgium (BE)Any future dateAny three digits
4000 0007 6000 0002Brazil (BR)Any future dateAny three digits
4000 0012 4000 0000Canada (CA)Any future dateAny three digits
4000 0025 0000 0003France (FR)Any future dateAny three digits
4000 0027 6000 0016Germany (DE)Any future dateAny three digits
4000 0037 2000 0005Ireland (IE)Any future dateAny three digits
4000 0038 0000 0008Italy (IT)Any future dateAny three digits
4000 0048 4000 8001Mexico (MX)Any future dateAny three digits
4000 0052 8000 0002Netherlands (NL)Any future dateAny three digits
4000 0055 4000 0008New Zealand (NZ)Any future dateAny three digits
4000 0061 6000 0005Poland (PL)Any future dateAny three digits
4000 0062 0000 0007Portugal (PT)Any future dateAny three digits
4000 0072 4000 0007Spain (ES)Any future dateAny three digits
4000 0075 6000 0009Switzerland (CH)Any future dateAny three digits
4000 0082 6000 0000United Kingdom (UK)Any future dateAny three digits
4242 4242 4242 4242United States (US)Any future dateAny three digits

3D Secure test cards

↑ Back to top

The following card numbers can be used to test payments that require 3D Secure Authentication.

DescriptionNumberDetails
Authenticate unless set up4000 0025 0000 3155This card requires authentication for off-session payments unless you set it up for future payments. After you set it up, off-session payments no longer require authentication.
Always authenticate4000 0027 6000 3184This card requires authentication on all transactions, regardless of how the card is set up.
Already set up4000 0038 0000 0446This card is already set up for off-session use. It requires authentication for one-time and other on-session payments. However, all off-session payments succeed as if the card has been previously set up.
Insufficient funds4000 0082 6000 3178This card requires authentication for one-time payments. All payments are declined for insufficient funds even after being successfully authenticated or previously set up.

Test express checkout methods

↑ Back to top

How to test each specific express checkout method can vary depending on which one you’re testing. Please see the section below for instructions on each one.

Apple Pay

↑ Back to top

Consult our dedicated Apple Pay document for guidance on how to test Apple Pay.

Google Pay

↑ Back to top

To test paying via Google Pay:

  1. Enable test mode, if it’s not already.
  2. Add a test card to your browser’s payment methods.
    • In Chrome, this is at the URL: chrome://settings/payments
  3. Go to a product page, cart, or checkout and use the Google Pay button.
  4. Select the test card in the payment popup.
  5. Click Pay.

Your test transaction will be visible in the dashboard after it completes.

↑ Back to top

Please see our dedicated Link by Stripe document for instructions on testing.

Testing refunds

↑ Back to top

To test a refund:

  1. Place a test order as shown above.
  2. Go to WooCommerce > Orders.
  3. Click the order ID of the test order.
  4. Follow the refund process as usual.

The order status should change to Refunded, and your test balance should be reduced.

Testing manual capture

↑ Back to top

To test a card payment authorization with manual capture:

  1. Go to Payments > Settings.
  2. Enable Manual Capture.
  3. Complete the steps to Test Card Payments.
  4. Go to WooCommerce > Orders.
  5. Click the order ID of the order created with a test card.
  6. Confirm the order has a note saying: A payment of $xx.xx was authorized using WooCommerce Payments.
  7. Click Choose an action.
  8. Click Capture charge.
  9. Click Update.
  10. Confirm the order has a note saying: A payment of $39.00 was successfully captured using WooCommerce Payments.
  11. Go to Payments > Transactions.
  12. Confirm a transaction with type Charge is listed.
Capture Charge action on Edit Order screen example screenshot

Testing disputes

↑ Back to top

To simulate a dispute with WooCommerce Payments:

  1. Enable Test Mode if it’s not already enabled.
  2. Go to your shop page
  3. Add a product to the cart.
  4. Go to your store’s checkout page, e.g. example.com/checkout/
  5. Complete checkout form fields.
  6. Enter one of the test card numbers that results in a dispute.
  7. Click Place order.

The order will be processed as if using a real credit card. The payment will be immediately disputed. You can then view and respond to the dispute by going to Payments > Disputes in your WordPress dashboard.

Test cards for disputes

↑ Back to top

The following card numbers can be used with:

  • Any date in the future as the expiration month / year
  • Any 3 digit CVC value
NumberScenario
4000 0000 0000 0259Payment disputed as “Fraudulent.”
4000 0000 0000 2685Payment disputed as “Product Not Received.”

Testing dispute responses

↑ Back to top

After creating a dispute with a dispute test card, to test dispute responses:

  1. Go to Payments > Disputes
  2. Click ⓘ next to the dispute
  3. Click Challenge Dispute
  4. In the Additional Details field:
    1. Enter winning_evidence to win the dispute
    2. Enter losing_evidence to lose the dispute
Payments > Disputes administration screen example screenshot

WooCommerce

The most customizable eCommerce platform for building your online business.

  • 30-day money-back guarantee
  • Support teams across the world
  • Safe and secure online payment