Skip to content
Last updated

Square integration

Square is a payments and commerce platform for taking payments and running a business. Integrating Square with Frontegg lets your application take and refund payments, create and pay orders, manage customers, browse the catalog and inventory, and read locations, payouts, bank accounts, and disputes on behalf of your users — all through Frontegg's integration layer (Square API v2). You can authenticate with either OAuth 2.0 (recommended when connecting on behalf of multiple merchants) or a Square access token.


Prerequisites

Connect to Square with OAuth

You create an application in the Square Developer Console. The application provides the Application ID (Client ID) and an Application secret (Client Secret), and defines the redirect URL that Square returns merchants to after they authorize access.

Step 1: Create an application

Sign in to the Square Developer Console and click + to create an application. Enter a name (for example, Frontegg Integration).

Step 2: Set the redirect URL and copy the credentials

Open your application and go to the OAuth page. Make sure the Production environment is selected, then:

  • Next to Redirect URL, click Update and enter your Frontegg Redirect URL: https://YOUR_MCP_GATEWAY_URL/integration-callback
  • Copy the Application ID — this is your Client ID.
  • Copy the Application secret — this is your Client Secret.

Keep your Application secret safe

The Application secret grants access to your account through the API. Treat it like a password and never expose it in client-side code or commit it to version control.

Square OAuth page with the Redirect URL, Application ID, and Application secret

Use an access token instead

If you are connecting a single Square account rather than authorizing multiple merchants, you can use an access token instead of the OAuth flow. On your application's Credentials page, with the Production environment selected, copy the Access token.

Keep your access token safe

The access token grants full production access to the corresponding Square account. Treat it like a password, and use Replace on the Credentials page to rotate it if it is exposed.

Square Credentials page with the Application ID and Access token

Configure the Frontegg portal

Configure the integration in the Frontegg portal using the method you chose:

  1. Open the Frontegg portal and navigate to [ENVIRONMENT] → Integrations → Square.
  2. For OAuth, enter the Client ID and Client Secret. For an access token, paste it into the Access Token field instead.
  3. Click Save.

Square uses the following scopes:

ScopeDescription
PAYMENTS_READView payments
PAYMENTS_WRITETake and refund payments
PAYMENTS_WRITE_ADDITIONAL_RECIPIENTSSplit payments to additional recipients
ORDERS_READView orders
ORDERS_WRITECreate and update orders
CUSTOMERS_READView customers
CUSTOMERS_WRITECreate and update customers
ITEMS_READView catalog items
ITEMS_WRITECreate and update catalog items
INVENTORY_READView inventory counts
INVENTORY_WRITEAdjust inventory counts
MERCHANT_PROFILE_READView locations and merchant profile
PAYOUTS_READView payouts
BANK_ACCOUNTS_READView linked bank accounts
DISPUTES_READView disputes
DISPUTES_WRITERespond to disputes

Keep your credentials secure

Never share or commit your Application secret or access token to version control.

Additional resources