> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hurrypayments.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Square

This guide explains how to connect your Square account to Hurry to accept card payments through Square's Web Payments SDK.

The wizard has three steps: credentials, checkout domain and settings.

> **Note:** Square payments are always created in **EUR**. If the order is in another currency, the amount is converted to EUR before it's charged, so the location you choose must be able to accept payments in EUR.

***

## Before you start

You need two things:

* An application in the **Square Developer Console** (**Applications → your application → Credentials**). There you'll see a **Sandbox** tab and a **Production** tab, each with its own credentials.
* A subdomain pointing to Hurry's IP, from which the checkout will be served.

### Create the DNS record

Go to your domain's DNS panel and create an **A** record with the following settings:

| Type | Name | Value |
| :- | :- | :- |
| A | checkout | 72.62.171.205 |

> **Note:** DNS propagation can take anywhere from a few minutes to several hours depending on your domain provider.

***

## Step 1. Add the gateway

In the side menu, go to **Payment providers** and click **Add payment processor**.

![Payment providers list with the Add payment processor button](https://mintcdn.com/hurrypay/Ilx8Xitn3DGPCNjv/images/square-01-payment-providers.jpg?fit=max\&auto=format\&n=Ilx8Xitn3DGPCNjv\&q=85\&s=e9de10a6119c9291c6d17da6e8081b80)

In the **Connect a payment gateway** window, select **Square**.

![Gateway selector with Square in the Guided setup list](https://mintcdn.com/hurrypay/Ilx8Xitn3DGPCNjv/images/square-02-select-square.jpg?fit=max\&auto=format\&n=Ilx8Xitn3DGPCNjv\&q=85\&s=b7f36985aed3d81d1eb07b06394514ff)

***

## Step 2. Enter the credentials

First choose the **Environment**: **Sandbox** for testing (never charges real cards) or **Production** to charge for real. Both credentials must come from the same Developer Console tab you chose here. You can open the console with the **Open Square** button.

![Empty Square credentials form](https://mintcdn.com/hurrypay/Ilx8Xitn3DGPCNjv/images/square-03-credentials.jpg?fit=max\&auto=format\&n=Ilx8Xitn3DGPCNjv\&q=85\&s=92fcfd99eb6f2d5cb91ef52cd75f8cd4)

| Field | What to enter |
| :- | :- |
| **Application ID** | Starts with `sandbox-sq0idb-` (sandbox) or `sq0idp-` (production). It's published on the checkout page so the card form can tokenize; it isn't a secret. **Don't** paste the application secret (`sq0csp-` / `sandbox-sq0csb-`). |
| **Access token** | Starts with `EAAA`. It's stored only on the server and never reaches the buyer's browser. It needs the `MERCHANT_PROFILE_READ`, `ORDERS_WRITE`, `PAYMENTS_WRITE` and `CUSTOMERS_WRITE` permissions. |

When each field's format is correct, the **Format looks right** message appears.

![Square credentials form with both fields validated](https://mintcdn.com/hurrypay/Ilx8Xitn3DGPCNjv/images/square-04-credentials-filled.jpg?fit=max\&auto=format\&n=Ilx8Xitn3DGPCNjv\&q=85\&s=338350f3c08ce563d3be784999e111b2)

Click **Validate and connect**. Hurry checks the token against Square and, if it's valid, shows the **Token accepted by Square** message and loads your account's locations.

Under **Location**, choose the location where all orders and payments will be created. It must be active, able to process cards and able to accept payments in EUR. Then click **Next**.

![Token accepted by Square and Location selector](https://mintcdn.com/hurrypay/Ilx8Xitn3DGPCNjv/images/square-05-location.jpg?fit=max\&auto=format\&n=Ilx8Xitn3DGPCNjv\&q=85\&s=2bd7bf39566bed84e1c7b374c0a6abb1)

***

## Step 3. Verify the checkout domain

In **White-label subdomain**, enter the subdomain you created earlier (for example `checkout.yourdomain.com`) and click **Verify DNS**.

If the A record is correct, the **correctly points to 72.62.171.205** message appears and the button changes to **Verified**. Click **Next**.

![Checkout subdomain verified](https://mintcdn.com/hurrypay/Ilx8Xitn3DGPCNjv/images/square-06-domain-verified.jpg?fit=max\&auto=format\&n=Ilx8Xitn3DGPCNjv\&q=85\&s=a4faf55ab25f582d69737aa4b9bd2523)

***

## Step 4. Review the connection status

At the top of the settings step you'll see a summary:

* **Square account:** account name, location, environment (**SANDBOX** or **PRODUCTION**) and **Connected** status.
* **SSL status:** the subdomain certificate takes about 15 minutes to be generated (**Pending**). In the meantime, test the checkout on the platform domain.
* **Payment confirmation:** Square confirms the payment synchronously. The card form returns a token, Hurry creates the payment with the Payments API and Square responds in the same call. **You don't need to register any webhook in Square.**

![Connection status, SSL and payment confirmation](https://mintcdn.com/hurrypay/Ilx8Xitn3DGPCNjv/images/square-07-settings-status.jpg?fit=max\&auto=format\&n=Ilx8Xitn3DGPCNjv\&q=85\&s=7dd98f8b4ed1f487292bbc2b73fba7b8)

***

## Step 5. Name, status and traffic

* **Name:** internal name to identify the gateway. By default it's filled in as `Square - <account name>`.
* **Status:** **Active** or **Inactive**. By default it's created as **Inactive** and doesn't receive payments until you activate it.
* **Traffic:** relative weight used to split payments between your gateways.
* **Square account:** shows the environment, the Application ID and the chosen **Location ID**. You don't need to change it.

If you need to rotate the token or change the location later, use **Change the credentials or the location**.

![Name, status, traffic and Square account settings](https://mintcdn.com/hurrypay/Ilx8Xitn3DGPCNjv/images/square-08-name-status-traffic.jpg?fit=max\&auto=format\&n=Ilx8Xitn3DGPCNjv\&q=85\&s=d8940441a3bade0f63f44ef8f56b22f1)

***

## Step 6. Advanced settings (optional)

The default values work in most cases.

| Field | What it's for |
| :- | :- |
| **Payment descriptor** | Description stored with the payment. Include your domain so the buyer recognizes the charge. |
| **Checkout URL prefix** | Must point to the Square checkout page: `/checkout/detail/square/v2?orderId=` |
| **Success URL** | Page the buyer lands on when the payment is completed. |
| **Amount multiplier** | `1.00` = no change, `1.10` = +10%. |
| **Fixed price** | Fixed price that replaces the order amount. Leave it empty if you don't need it. |
| **Fake email** | Sends a masked email to the gateway; the real email is only used in the CRM. |

![Advanced settings and Save credential button](https://mintcdn.com/hurrypay/Ilx8Xitn3DGPCNjv/images/square-09-advanced-save.jpg?fit=max\&auto=format\&n=Ilx8Xitn3DGPCNjv\&q=85\&s=4f3e50abdbb88ab15fe3dba0e117af02)

***

## Step 7. Save

Click **Save credential**. The **Credential created successfully** message appears.

![Square credential saved successfully](https://mintcdn.com/hurrypay/Ilx8Xitn3DGPCNjv/images/square-10-saved.jpg?fit=max\&auto=format\&n=Ilx8Xitn3DGPCNjv\&q=85\&s=c1e4ca9d6cf4ce7fdd3f5dc783a077a6)

The new gateway appears in **Payment providers** with the **Square** gateway.

![Payment providers list with the new Square gateway](https://mintcdn.com/hurrypay/w97W-oXnF9QrulqC/images/square-11-provider-list.jpg?fit=max\&auto=format\&n=w97W-oXnF9QrulqC\&q=85\&s=eff001ec4966a4b404fa89f0d94abfac)

***

## Done!

Your Square account is now connected. Once SSL is active, change the **Status** to **Active** and assign it traffic to start accepting payments.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.