Payment GatewaysSquare

Square

Connect Square to PayLexer to accept card payments, digital wallets, and point-of-sale transactions across the US, Canada, UK, Australia, and more.

Square is an omnichannel commerce platform supporting online and in-person payment processing. It operates across the United States, Canada, United Kingdom, Australia, Japan, France, Spain, and Ireland, supporting card payments, digital wallets, and point-of-sale integration for businesses of all sizes.

  • Supported Regions (Merchant Accounts): United States, Canada, United Kingdom, Australia, Japan, France, Spain, and Ireland - view full list
  • Supported Currencies: USD, CAD, GBP, AUD, JPY, and EUR - view full list

This guide walks you through connecting Square to PayLexer, configuring API credentials and webhooks, and testing transactions before going live.

Supported Features

  • One-time payments
  • Refunds
  • Real-time payment status updates
  • Multiple payment methods (cards, Apple Pay, Google Pay, Cash App Pay)
  • Point-of-sale integration

Before You Start

Make sure you have:

Looking for a different payment processor? View all supported gateways →

Configuring Square

You need an Application ID, Access Token, and Location ID from Square for this integration.

Getting API Credentials

Open the Square Developer Dashboard

Select an environment

Toggle between the Sandbox and Production tabs to access the credentials for each environment.

Copy your Application ID and Access Token

Go to the Credentials tab and copy your Application ID and Access Token.

Copy your Location ID

Go to the Locations tab and copy your Location ID.

Square provides separate credentials for Sandbox (test) and Production (live) modes.

Adding Credentials to PayLexer

Open PayLexer Dashboard

Log in to your PayLexer dashboard and navigate to Payment Gateways → Square.

Enter your credentials

Paste the Application ID, Access Token, and Location ID you copied from Square.

Understanding Live/Production and Sandbox Settings:

EnvironmentPurpose
Live / Production (Mandatory)Used for real transactions. Cannot be empty, even when testing.
Test / Sandbox (Optional)Used for testing only. No real money is processed.

How PayLexer selects credentials:

  • Debug/Test mode ON → Test credentials are used
  • Debug/Test mode OFF → Live credentials are used

Test and save

Click Save to save your configuration and verify your credentials. Click Verify Connection to test the connection.

Configuring Webhooks (Mandatory)

Webhooks enable real-time payment updates and significantly improve reliability.

Benefits of Webhooks:

  • Instant payment status updates
  • Automatic refund processing
  • Real-time payment event notifications
  • Dispute notifications

Open the Square Developer Dashboard

Log in to your Square Developer Dashboard and go to the Webhooks tab.

Add a subscription

Click Subscriptions, then click Add subscription and enter a Webhook name.

Enter the notification URL

Copy the Webhook URL from PayLexer, paste it into the Notification URL field, select the events you want to receive, then click Save.

Copy the Signature Key

Click on the webhook you created, copy the Signature Key shown after saving, paste it into PayLexer, then click Save Configuration.

Square uses a Signature Key for webhook verification, not a Webhook Secret.

Integrate Square to Your Website

If you have already added and configured your site, you can enable Square in your existing setup.

Go to Websites

Navigate to Websites in your PayLexer dashboard.

Edit your website

Click the Edit Icon of your added website.

Enable Square

Click the checkbox to enable Square for the website.

If you haven't added a website yet, Continue to Add Your Website →

Troubleshooting

Best Practices

  • Test in Sandbox before enabling Production mode
  • Confirm webhooks are working
  • Validate the first live transaction after switching
  • Monitor the gateway dashboard for failed payments
  • Keep API credentials and secrets secure
  • Use separate Sandbox and Production credentials
  • Ensure Debug/Test mode is enabled during testing, use only official Square test cards, and save Sandbox credentials in PayLexer, not just Production credentials

FAQs

Still Have Questions?

Was this page helpful?