If you want to test WooPayments on a site that won’t need to process real transactions (e.g. a staging site), you can use sandbox mode to try things out.
Sandbox mode creates an “empty” WooPayments test account without using any personal information. It operates only in test mode and can’t be used to process real charges.
NOTE: WooPayments must be connected to WordPress.com, even in sandbox 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.
Enabling sandbox mode
↑ Back to topTo enable sandbox mode and create a test account:
- Install WooPayments as normal and activate it.
- Click the Enable sandbox mode button at the bottom.
- Connect to WordPress.com.
- If your site already has Jetpack connected, this step will be skipped.
- A WooPayments test account will be created for you automatically.
- Once that’s done, you’ll be returned to the admin dashboard.
You can verify that the site is in sandbox mode on the Payments > Overview page.
Note that sandbox mode will also be enabled if you’ve set WP_ENVIRONMENT_TYPE
to either of the following values in your wp-config.php
file:
development
staging
… or if you have set WP_DEVELOPMENT_MODE
to a non-default value.
Disabling sandbox mode
↑ Back to topNOTE: Starting a site in sandbox mode and later accepting live payments on it could lead to confusion. For example, transactions from sandbox mode will still be visible under WooCommerce > Orders after going live, but they won’t be shown under Payments > Transactions.
Disabling sandbox mode allows you to set up a live WooPayments account on the same site, and then start accepting real payments.
To disable sandbox mode:
- Go to Payments > Overview.
- In the Sandbox mode notice at the top of the page, click the Set up a live WooPayments account link.
- Read the information in the popup and click Continue setup.
- You’ll be returned to the original setup page.
- Click Verify business details to start onboarding.
If you’ve set either the WP_ENVIRONMENT_TYPE
or WP_DEVELOPMENT_MODE
variables as described in the section above, you will also need to remove those lines from your wp-config.php
file in order to fully disable sandbox mode.