How to Test Square Payments Before Accepting Real Payments

Would you like to run some test payments for your Square integration before publishing your payment form? By turning on Test Mode in your WPForms payments settings, you can easily try out Square payments on your site before making them available to your users.

In this tutorial, we’ll show you how to test your Square payments in WPForms.

  1. Setting Up a Square Developer Account
  2. Enabling Square Test Mode
  3. Creating a Form to Test Square Payments
  4. Enabling Square Payments in Your Form
  5. Publishing Your Form and Performing the Test
  6. Viewing Test Transactions in Your Square Account
  7. Frequently Asked Questions

Requirements: You will need a Pro license level or higher to access the Square addon.

Also, Square requires your site to have SSL (HTTPS) enabled on the page where you’re adding a live payment form, as this allows you to securely send credit card data to Square. For more details, please see WPBeginner’s guide to adding SSL and HTTPS in WordPress.


Before you get started, be sure WPForms is installed and activated on your WordPress site and that you’ve verified your license. You’ll also need to install and activate the Square addon.

1. Setting Up a Square Developer Account

First, you’ll need to create a free Square Developer account. This will enable you to set up a Sandbox Test Account and keep live transactions separate from test transactions.

Head over to the Square Developer platform and click Get Started.

Creating a Square Developer account

If you don’t have an existing Square account, create one here. You’ll be able to activate it later when you’re ready to start accepting live payments by following the instructions in the activation email sent to the address associated with your account.

Signing up for a Square Developer account

If you already have a Square Seller account, you can sign in to Square Developer using your existing credentials.

Once you’ve created your account or signed in, you’ll see the Square Developer Dashboard. To get started, click on the blue plus (+) button to create your first application.

Adding a new application in Square Developer

This will open a popup window where you can name this application (it’s for your reference only). Then click the Save button.

Naming a new app in Square Developer

In your Square Developer dashboard, you should now see your application as well as a Default Test Account.

The Square Developer dashboard and Default Test Account

Note: For the purposes of this tutorial, we will be using the Default Test Account to test Square payments in WPForms. However, you can create as many different test accounts in the Square Developer dashboard as you like, and follow the steps below to test payments with any of them.

For details on testing payments for countries in the European Union, please see the FAQ section below.

Click on the Open button for the Default Test Account to launch its dashboard.

Opening the test Seller dashboard for the Default Test Account

This will open a screen that looks just like the Square Seller dashboard. Leave this page open and log in to your WordPress site in another browser tab.

A Square Developer Sandbox Seller dashboard

Note: You must launch your Sandbox Test Account in the Square Developer dashboard before you can connect it to WPForms to test payments. For more details, please see the FAQ section below.

2. Enabling Square Test Mode

Next, you need to make sure that no real payments are processed in Square while you’re testing your form. To do so, go to WPForms » Settings in your WordPress dashboard and click on Payments.

Accessing the WPForms payments settings

Under Square, select the checkbox for Test Mode.

Enabling Test Mode for Square in WPForms

Note: For WPForms payment integrations, Test mode and Live mode are configured separately. If you’ve already set up Square for live transactions via WPForms, you’ll need to reconnect it in Test Mode.

Then click the Connect with Square button.

Connecting WPForms to a Square test account

Note: If you didn’t launch your Sandbox Test Account’s dashboard before trying to connect it to WPForms, you’ll see an error message when you click the Connect to Square button in the WPForms payments settings.

Please see the FAQ section below for more details.

This will bring you to a screen where you’ll need to log in to your Square account.

Logging in to Square to connect your test account to WPForms

Once you’ve logged in, Square will ask you to grant permission for WPForms to access certain information in your Square account. Click on the Allow button to continue.

Allowing WPForms to access Square

This will return you to your WPForms settings. If the connection was successful, you should see a green checkmark next to Connection Status, and a notice that your Square account is connected in Sandbox mode.

A successful Square sandbox connection in the WPForms settings

3. Creating a Form to Test Square Payments

Once your Square Developer account and WPForms settings are ready to go, you’ll need a form you can use to test Square payments. Create a new form or edit an existing one to open the form builder.

You can customize this form however you like, but make sure to include a Square field. You can click on this field on the left side of the builder or drag and drop it into the preview area to add it to your form.

Adding a Square field to a form

The Square field will enable you to enter test credit card information to make sure payments are working as expected.

4. Enabling Square Payments in Your Form

You’ll also need to enable Square payments for the form you’ll be testing. In the form builder, go to Payments » Square. Then toggle on the Enable Square Payments option.

Enabling Square payments for a form

This will reveal a handful of additional settings. Enter a Payment Description to help you identify this transaction in your Square Developer dashboard later.

Adding a Payment Description for Square payments

The rest of the settings are optional. We’ve covered them in more detail in our tutorial on enabling live Square transactions in WPForms.

Configure the other options if you’d like, then save your form.

5. Publishing Your Form and Performing the Test

Once your form is ready, you can test Square payments on the frontend of your site. To do so without publishing your form to a live page, you can use the form preview option in WPForms or create a private page or post.

Then simply submit a test entry for your form using one of Square’s sets of test credit card details.

6. Viewing Test Transactions in Your Square Account

After you submit your test payment, you can view the transaction in your Square account by clicking on the Transaction ID in your test entry or logging in to Square Developer.

In your Square Developer account, click on the Open button for your Sandbox Test Account to launch its dashboard.

Opening the test Seller dashboard for the Default Test Account

Then click on Transactions in the menu on the left.

Opening the Transactions screen in a Square sandbox dashboard

You should see your test transaction listed on the following screen.

A test transaction in a Square sandbox dashboard

Note: When you’re done testing Square payments, remember to disconnect your test account in WPForms » Settings » Payments, turn off Test Mode, and connect your live Seller account so you can process users’ transactions.

Frequently Asked Questions

Below, we’ve answered some of the top questions about testing Square payments in WPForms.

When I try to connect to my Square account in Test Mode, I see an error. How do I fix it?

When trying to connect your Square Developer account to WPForms in Test Mode, you may see an error that reads, “Error: To start the Oauth flow for a sandbox account, first launch the seller test account from the Developer Dashboard.”

An Oauth flow error in Square

To fix this, open your Square Developer account. For the Sandbox Test Account that you would like to use, click on Open.

Opening the test Seller dashboard for the Default Test Account

This should launch the test account and open a sandbox dashboard like this one.

A Square Developer Sandbox Seller dashboard

Once this page is open, go back to your WPForms settings and click Connect with Square again.

Can I test EU credit card verification for Square payments made through my forms?

Yes, you can test EU credit card verification for Square payments in WPForms.

To do so, you need to set up a European Sandbox Test Account in your Square Developer dashboard. Under your existing Sandbox Test Account(s), click on Add.

Adding a new Sandbox Test Account in Square

In the popup window that appears, name this Sandbox Test Account and select an EU country (Ireland or Spain) from the dropdown.

Selecting an EU country for a Square Sandbox Test Account

You may then connect this test account to WPForms by following the steps above. When testing payments in your form, use one of the EU credit cards from Square’s list of testing payment details.

Then, when you submit the form, a popup window should appear asking for the additional verification code.

The verification popup window for Square EU payments

Enter the test code provided by Square to complete the test payment.

That’s it! Now you know how to test Square payments in WPForms.

Next, don’t forget to carry out a full form test before you publish it on your site. Our complete form testing checklist walks you through the process step by step.