Payment GatewaysSquare
Payment Gateways

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 a US-based payment processor operating in the United States, Canada, United Kingdom, Australia, Japan, France, Spain, and Ireland. It supports card payments, digital wallets, and point-of-sale integration for businesses of all sizes.

TypeDetails
Supported Regions (Merchant Accounts):United States, Canada, United Kingdom, Australia, Japan, France, Spain, Ireland
Supported Currencies:USD, CAD, GBP, AUD, JPY, EUR

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

  1. Log in to your Square Developer Dashboard

  2. Go to Credentials tab

  3. Copy your Application ID and Access Token

  4. Go to Locations tab

  5. Copy your Location ID

💡Note: Square provides separate credentials for Sandbox (Test) and Production (Live) modes. Toggle between "Sandbox" and "Production" tabs to access different credentials.

Adding Credentials to PayLexer

  1. Log in to your PayLexer dashboard

  2. Navigate to Payment Gateways

  3. Click on Square

  4. Add the credentials you copied above

Understanding Live/Production and Sandbox Settings:

Here you will find settings for two environments:

  • **Live / Production (Mandatory)**These credentials are used for real transactions. This field is required and cannot be empty, even when testing.

  • **Test / Sandbox (Optional)**These credentials are used for testing only. No real money is processed.

How PayLexer Selects Credentials?

PayLexer automatically switches credentials based on your platform mode:

  • Debug/Test mode ON → Test credentials are used

  • Debug/Test mode OFF → Live credentials are used

You do not need to manually switch keys once both environments are saved.

  1. Click Test Connection to verify your credentials

  2. Click Save Configuration

Configuring Webhooks (Mandatory)

Webhooks enable real-time payment updates. While not required, they significantly improve reliability.

Benefits of Webhooks

  • Instant payment status updates

  • Automatic refund processing

  • Real-time payment event notifications

  • Dispute notifications

Setting up Webhooks

  1. Log in to your Square Developer Dashboard

  2. Go to Webhooks tab and click on Subscriptions

  3. Click Add subscription

  4. Enter Webhook name

  5. Copy Webhook URL from PayLexer

  6. Paste into Notification URL

  7. Select Events

  8. Click Save

  9. Click on the webhook Copy the Signature key shown after saving

  10. Paste it into PayLexer

  11. Click Save Configuration

Integrate Square to Your Website

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

To add to your existing site:

  1. Navigate to Websites

  2. Click on the Edit Icon of your added website

  3. Click on the checkbox to enable Square to the added website

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

Troubleshooting

Best Practices

  • Test in Sandbox before enabling Production mode

  • Validate the first live transaction after switching

  • Confirm webhooks are working

  • 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?