Square Payments

Required for this integration:

Supported Features

  • Tokenization - This gateway tokenizes payment methods in a way that allows Autoship Cloud's hosted service, QPilot to create and pay for recurring orders automatically.  In Square, this can be found in the merchant dashboard.

Unsupported Features

  • "Authorize Only" transactions
  • Digital Wallets (Apple / Google Pay)

Connect to Square Before Testing

If you're setting up the Square for WooCommerce for the first time, you can find detailed documentation from WooCommerce here.

You will need to first connect to Square by selecting the "Connect with Square" button in  WP-Admin > WooCommerce > Settings > Square before entering "Sandbox" mode. See the "Getting Started" heading in the linked WooCommerce documentation.

Setting up Square in "Sandbox" (Test) Mode

Once you have connected your WooCommerce store to Square you will be able to test Square in its "Sandbox" or test mode.

To connect to Square in test mode, you will first go to  WooCommerce > Settings > Square and select the checkbox "Enable Sandbox Mode"

You will then go to your Square Developer Account ( https://developer.squareup.com/apps ) open your Square app and enter your Sandbox Application Id and Sandbox Access Token to connect your WooCommerce site to your Square sandbox application. After entering your Square credentials, select "Save Changes"

You will then go to  WooCommerce > Settings > Payments > Square ensuring that Square is enabled, and then enable the checkbox for "Customer Profiles" which allows for tokenization of saved payment methods. 

Once these have been set, select "Save changes", and complete a test order via checkout from your store to ensure that Square is working.

Setting up Square payments with Autoship Cloud (Test Mode)

Once you have ensured that the payment gateway can successfully process an order via checkout and save a payment method in your store, you are ready to add Square as a payment integration in Autoship Cloud.

To do this, navigate in your WordPress Admin to  WP-Admin > Autoship Cloud > Payment Integrations. Once there, select the "Add" button (blue circle with the "+" sign in it) to add a new payment integration. 

Make sure that "Test Mode" is enabled (unless you are ready to begin using the gateway in Live mode), select the "Payment Method Type" dropdown, and then select "Square", enter the same Sandbox Access Token that you used to configure the plugin in your WooCommerce Settings and the Location Id which can be found under the "Locations" menu inside your Square app (make sure you have your app in sandbox mode to get the correct Location Id). When you're done, select "CREATE". 

You should now see a new Square payment integration in your Payment Integrations list.

Placing a Test Square Order as a Test Customer

Before using a payment gateway in Live Mode, it is necessary to ensure that it works in Test Mode (sometimes referred to as the "sandbox"). You will be able to place a test order on your site by adding at least 1 product scheduled for Autoship to your cart and selecting Square as your payment method at checkout.

Use a Square test card number to test placing an order as a customer via Square and save the Square payment method as your payment method for Scheduled Orders.

Placing your test order via Square:

1. Visit your store as a customer (make sure you are logged out of the WordPress Admin)

2. Add at least 1 item scheduled for Autoship to your Cart.

3. Complete a checkout using Square as the payment method (test card numbers linked above)

4. Verify that the order has successfully processed

5. As the same customer, visit  My Account > Scheduled Orders and verify that you have created a Scheduled Order, and that the products, schedule frequency, and payment method attached to the Scheduled Order are correct

6. Log back into your site as an administrator, navigate to  WP-Admin > Autoship Cloud > Scheduled Orders, and verify that the newly created Scheduled Order is present in your list of Scheduled Orders with the Square payment method used at checkout attached

Going Live 

To do this, navigate (in your WP-Admin) to  WooCommerce > Settings > Payments > Square and toggle off "Enable Sandbox Mode" and select "Save Changes". You will then see the button "Connect With Square" display, select the button and follow the steps to connect your WooCommerce store to Square. 

You will then go back to your Square developer account and select the connected app. Be sure it is set to "Production" (at the top of the page), then copy the Production Access Token from the "Credentials" menu and your Location Id from the "Locations" menu. Go to WP-Admin > Autoship Cloud > Payment Integrations and edit your Square integration, paste the credentials in their fields, then toggle off "Test Mode".

You are now ready to test  Checkout and Scheduled Orders with Autoship Cloud.

How to Manually Add a Saved Payment Method to a Scheduled Order with Square

Need to manually add a payment to a Scheduled Order for a customer who has already saved a Credit Card in their account?
If a customer has already saved a credit card (via Square Payments) at checkout or by logging into your site (  My Account > Payment Methods) the tokenized payment ID's will be saved to their User in WordPress (WP-Admin > Users).

First, locate the saved payment method in WordPress:

  1. As an administrator, visit WP-Admin > Users
  2. Edit the user for the customer that owns the saved payment method
  3. Locate the "Square Payment Tokens" section
  4. Note the "Token ID" and "Customer ID".  You will be using these fields in the next steps.

Second, add the payment method to the Customer in Autoship Cloud:

  1. Visit WP-Admin > Autoship Cloud > Customers 
  2. Search the name or email address to locate the Customer
  3. Select the option to "Edit" 
  4. Locate the "Payment Methods" section and select the "ADD" action.
  5. For the "Payment Method Type" option, select "Square"
  6. Fill in fields with information copied from the Wordpress User's Square Payment Tokens (from the previous step):
    • Gateway Customer ID => Square Payment Tokens: Customer ID
    • Gateway Payment ID => Square Payment Tokens: Credit Card (Square) ID
    • Payment Method Description => Card type, last four digits of card number of expiration copied from Payment Profile fields
      • Example Description: Visa Ending in 4422 (Expires 11/24)
    • Billing Address Fields => Copy these fields (First Name, Last Name, Billing Street 1, etc) directly from the Billing Address of the Wordpress User
  7. Select "Add" to save the payment method
  8. Confirm your change for this Customer by selecting "Update" 

Last step, edit the Scheduled Order's Payment Method:

  1. Visit WP-Admin > Autoship Cloud > Scheduled Orders
  2. Search the name or email address to locate the Customer's Scheduled Order(s)
    1. Pro Tip: if the Scheduled Order recently failed to process a payment, it will have a status of "Failed"
  3. Select the option to "Edit" the Scheduled Order
  4. At the bottom section of the Scheduled Order, locate the "Payment Method" option and select the Payment Method you want to apply to the Scheduled Order 
  5. Review the Scheduled Order:
    1. Make sure to set the Scheduled Order's Status to "Active" if you want it to process automatically on the Next Occurrence Date 
  6. Confirm your changes for the Scheduled Order by selecting "Update"

If you need to process the Scheduled Order right away, select the action for Continue Processing or Process Now.

Still need help? Contact Us Contact Us