> ## Documentation Index
> Fetch the complete documentation index at: https://ampersand-24eb5c1a-square-proxy.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Square

## What's supported

### Supported actions

This connector supports:

* [Proxy Actions](/proxy-actions), using the base URL `https://connect.squareup.com`.

### Notes

For testing against Square's [sandbox environment](https://developer.squareup.com/docs/devtools/sandbox/overview), set `provider: squareSandbox` in your manifest file. This is identical to `square` except that it uses the base URL `https://connect.squareupsandbox.com`.

### Example integration

To define an integration for Square, create a manifest file that looks like this:

```YAML theme={null}
# amp.yaml
specVersion: 1.0.0
integrations:
  - name: squareIntegration
    displayName: My Square Integration
    provider: square
    proxy:
      enabled: true
```

## Before you get started

To integrate Square with Ampersand, you will need a [Square account](https://squareup.com/signup).

Once your account is created, you'll need to create a Square app and obtain the following credentials from it:

* Client ID
* Client Secret

You will then use these credentials to connect your application to Ampersand.

### Creating a Square app

1. Log in to the [Square developer portal](https://developer.squareup.com/apps).
2. Click **+** to create a new application and give it a name.
3. Open the application and select the **OAuth** tab.
4. Set the redirect/callback URL to: `https://api.withampersand.com/callbacks/v1/oauth`
5. Copy the **Application ID** (Client ID) and **Application Secret** (Client Secret) from the **OAuth** page.
6. Note the [OAuth permissions (scopes)](https://developer.squareup.com/docs/oauth-api/square-permissions) your integration requires.

   <img src="https://mintcdn.com/ampersand-24eb5c1a-square-proxy/BKP0KITEQK_z6PiA/images/customer-guides/square_oauth.gif?s=5c08f289bd3db5350c6b4d1c0279ca8c" alt="Square OAuth" width="1280" height="720" data-path="images/customer-guides/square_oauth.gif" />

### Add your Square app info to Ampersand

1. Log in to your [Ampersand Dashboard](https://dashboard.withampersand.com).

2. Select the project where you want to create a Square integration.

   <img src="https://mintcdn.com/ampersand-24eb5c1a-square-proxy/uJIcPIMi_VTSdhsa/images/provider-guides/dd47b7a-Ampersand.png?fit=max&auto=format&n=uJIcPIMi_VTSdhsa&q=85&s=8e2630317c3756eff07134cbd713cc35" alt="Ampersand Project Selection" width="2244" height="442" data-path="images/provider-guides/dd47b7a-Ampersand.png" />

3. Select **Provider Apps**.

4. Select **Square** from the **Provider** list.

5. Enter the **Client ID** and **Client Secret** obtained from your Square app.

6. Enter the scopes your integration requires.

7. Click **Save Changes**.

<img src="https://mintcdn.com/ampersand-24eb5c1a-square-proxy/GajiXndb9C6OC1an/images/provider-guides/square_amp.png?fit=max&auto=format&n=GajiXndb9C6OC1an&q=85&s=e7e9c52ad08b7ee45bda0e6f1aa9f3ad" alt="Ampersand Project Selection" width="1258" height="1464" data-path="images/provider-guides/square_amp.png" />

## Using the connector

To start integrating with Square:

* Create a manifest file like the [example above](#example-integration).
* Deploy it using the [amp CLI](/cli/overview).
* Embed the [InstallIntegration](/embeddable-ui-components#install-integration) UI component. The UI component will prompt the customer for OAuth authorization.
* Start making [Proxy Calls](/proxy-actions), and Ampersand will automatically handle the authentication with Square.
