1. Documentation /
  2. WooPayments Documentation /
  3. WooPayments: Testing & Troubleshooting /
  4. WooPayments: Dev Mode

WooPayments: Dev Mode

If you want to test WooPayments on a site that will not need to process real payments, you can use Dev Mode.

With Dev Mode, it’s possible to create a test account that requires no personal information. This account can then be used to process test transactions. It will only operate in Test Mode and cannot be used to process live transactions.

NOTE: WooPayments must be connected to WordPress.com, even in Dev Mode. This means it’s not possible to run WooPayments locally unless you expose your site to the Internet with ngrok or a similar tool.

Enable Dev Mode

↑ Back to top

To enable Dev Mode, you can either:

  • Ensure your site’s environment type is set to either development or staging.
  • Add the following constant to your site’s wp-config.php file:
define( 'WCPAY_DEV_MODE', true );

Note that Dev Mode must be enabled before starting the signup process in order to properly create a test account!

Create a test account

↑ Back to top

Once you’ve enabled Dev Mode, complete the WooPayments test account creation process by following these steps:

  1. In your site’s dashboard, click the Payments menu item.
  2. Click the Finish Setup button.
  3. Connect to your WordPress.com account by entering your credentials.
  4. After connecting to your WordPress.com account, the setup process will continue on Stripe’s site, hosted at connect.stripe.com.
    • You can verify that Dev Mode is enabled by looking for the “Test Mode” box.

NOTE: As of WooPayments version 6.0.0 or later, some merchants will go through an experimental signup method known as gradual signup. If you are selected for this, you won’t be taken to connect.stripe.com as mentioned above. See this section of our gradual signup page for instructions on enabling Dev Mode.

  1. For the phone number, enter all zeros.
  2. Stripe will ask you to verify the phone number. Click the Use Test Code button.
  3. Enter anything for country and type of business.
  4. Enter any name and birthdate that’s in the past.
  5. Enter any valid email address.
  6. Enter any valid physical address.
  7. Enter all zeros for your tax ID, e.g. a Social Security Number.
  8. Enter any industry.
  9. For your bank details, click the Use Test Account button.
  10. At the end, click Submit to create the test account.
  11. Back on your site, you can verify that you’re in Dev Mode again under Payments > Settings.
Verifying that Dev Mode is enabled after setting up a test account.

Cloning from production to staging

↑ Back to top

If you copy a production site to a staging or development environment, and the site has never been in Dev Mode before, you will need to complete the account set up process again using the test details shown above. This will create a new test account for use while in Dev Mode.

Your transaction data from the production environment will not be available while in Dev Mode on the staging or development environments. It will remain available only for production.

Disabling Dev Mode

↑ Back to top

To disable Dev Mode, remove this line from your wp-config.php file:

define( 'WCPAY_DEV_MODE', true );

Keep in mind that, even after removing that line, Dev Mode will still be enabled if your site’s environment type is set to either development or staging.

If you onboarded using gradual signup, see that article for how to disable Dev Mode, since there are no changes to the wp-config.php file in that case.

Once Dev Mode is disabled, you will need to go through the account setup again, this time using real information for the account. (If an account was connected before Dev Mode was enabled, the store will revert to that setup.)

NOTE: Using the same site for both testing in Dev Mode and live transactions later on could lead to confusion. This is because test transactions done in Dev Mode will still be visible under WooCommerce > Orders, but not under Payments > Transactions. Other such inconsistencies make this workflow inadvisable. It’s best to use dev mode on staging URLs only, which will never need to take real transactions.