Testing WooCommerce Square in Sandbox Mode

WooCommerce Square sandbox mode lets you test the extension’s configurations without any real financial transactions happening, so that you can make sure everything works correctly before you start selling.

Enabling Sandbox Mode

↑ Back to top
  1. In your WooCommerce store’s WordPress dashboard, navigate to WooCommerce > Settings > Square.
  2. Under Environment Selection, select Sandbox.
  3. The Sandbox Application ID and Sandbox Access Token fields appear as soon as you select Sandbox.

Accessing the Square Developer Dashboard

↑ Back to top
  • Visit the Square Developer dashboard and sign in with your Square account credentials.
  • If you don’t have a Square Developer account, sign up for one to proceed.

Creating a New Application

↑ Back to top
  • When signing up, you will be asked to create a new application. Fill in the necessary details.
  • You can also create a new application by clicking on the plus (+) sign on the Square Developer dashboard.

Generating Sandbox Credentials

↑ Back to top
  1. Once your application is created, navigate to the Credentials tab of that application.
  2. Make sure Sandbox is selected.
  3. Copy the Sandbox Application ID. Open Sandbox Test Accounts and copy the access token for the test account you want to use.
  1. Paste the Sandbox Application ID and Sandbox Access token obtained from the Square Developer dashboard into the respective fields in WooCommerce Square settings.
  1. Save your changes. Under Select your business location, choose a location from your sandbox test account and save again.
  1. To view this data, go to Sandbox test accounts in the Square Developer dashboard. Open Square Dashboard for the same test account.

Testing Payments in Sandbox Mode

↑ Back to top
  1. Navigate to your WooCommerce store and make a test purchase.
  2. Complete the checkout process, making sure to select Square as the payment method.
  1. Use a test card number provided by Square to simulate a transaction
  1. Complete the payment process and verify that the transaction goes through successfully.
  1. Check both your WooCommerce > Orders and the Square dashboard to confirm that the test transaction appears in both systems.

Notes on Payment Testing

↑ Back to top
  • The card expiration date needs to be set to a future month and year.
  • Payments in USD (United States), CAD (Canada), or GBP (United Kingdom) require a valid postal code.
  • Payments in Japan do not support postal codes.
  • The SCA flow requires buyers to provide a code sent to their mobile phone in an SMS message. When testing, use the provided verification code to simulate the code sent using SMS.
  • If the Square test account authorization expires, you can reauthorize by going to the Square Developer dashboard > OAuth > Test account authorizations and clicking on the Authorize an account button.

Digital Wallets testing

↑ Back to top

Testing Apple Pay

For developers testing the setup:

  1. Log into your Square Developer Dashboard at Square Developer Dashboard.
  2. Find your application that connects Square with WooCommerce.
  3. Click on Apple Pay in the side panel.
  4. Make sure you’re in the correct environment (sandbox or production).
  5. Check that your store is listed among the verified domains.

Gift card testing

↑ Back to top

If you have enabled Gift Cards under WooCommerce > Settings > Payments, you can also test gift card payments in sandbox mode.

There are a few limitations to be aware of when testing:

  • Square only accepts the gift card number 7783 3200 0000 0000 in Sandbox.
  • This gift card has an available balance of $1.00.
  • Additional funds cannot be added to this card.
  • Only full gift card payments can be tested in Sandbox.

Transitioning to Live Mode

↑ Back to top
  1. Once testing is successful and you’re satisfied with the integration, you can transition from sandbox mode to live mode.
  2. Make sure you have activated your Square account.
  3. Go to WooCommerce > Settings > Square. Under Environment Selection, choose Production and save your settings.

If you have not already connected the Production environment, click Connect to Square and approve access as the Square account owner. Then select your live business location and save your settings.

If your site uses the legacy Sandbox constant, ask your developer to turn it off before switching to Production.

Final Testing and Monitoring

↑ Back to top
  • Confirm that WooCommerce shows your live location and that the payment methods you want to offer appear at checkout. Payments in Production use real funds.
  • Monitor your WooCommerce > Orders and Square dashboard for any discrepancies or issues.
  • Regularly review transaction logs and monitor for any errors within order notes or abnormalities.

Questions and support

↑ Back to top

Do you still have questions and need assistance? 

  • Get in touch with a Happiness Engineer via our Help Desk. We provide support for extensions developed by and/or sold on WooCommerce.com, and Jetpack/WordPress.com customers.
  • If you are not a customer, we recommend finding help in the WooCommerce support forum or hiring a Woo Agency Partner. These are trusted agencies with a proven track record of building highly customized, scalable online stores. Learn more about Woo Agency Partners.

Related Products

WooCommerce Shipping is a free label-printing and fulfillment extension built into WooCommerce that lets store owners buy and print USPS,...

Automatically calculate sales tax at checkout based on your store address. For U.S. stores, additional states...

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.