# Clover

Middle can connect to Clover's API via an OAuth developer app or a store token. An OAuth app is best if you want to be listed on [the Clover app marketplace](https://www.clover.com/appmarket) or integrate Middle with multiple Clover stores.

## OAuth app

Clover allows developers to create apps that are both public, meant to be listed in the app marketplace, or private.

{% hint style="warning" %}
All apps, whether public or private will require app approval by Clover. Please allow processing time on Clover side for this.
{% endhint %}

### Public app

Public apps are setup and designed for consumption on the Clover public app marketplace.

Complete the below steps to create a public app:

1. Log in to your Developer Dashboard.
2. Click **Create App**. The Create App window appears.
3. In the App Name field, enter the name of the app.
4. Select one or more countries where you want to make your app available for Clover merchants.
5. Select checkboxes for the supported languages in the region.
6. Click **Create**. The *App name* - App Settings page appears. See [Manage app settings](https://docs.clover.com/dev/docs/app-settings) to configure the new app.
7. For requested permissions, review the [#permissions](#permissions "mention") below
8. The redirect URL will look like this: `https://{your instance subdomain here}.middle.app/oauth-redirect-uri/`

### Private app

A [private app](https://docs.clover.com/dev/docs/private-apps) is built for specific merchants and is not publicly available in the Clover App Market. Developers can share a direct link to the app with the merchants. Private apps are available in any region supported by the App Market.

To setup a private app complete the below steps:

1. Log in to your Developer Dashboard.
2. Click **Create App**. The Create App window appears.
3. In the App Name field, enter the name of the app.
4. Select one or more countries where you want to make your app available for Clover merchants.
5. Select checkboxes for the supported languages in the region.
6. Click **App Type**.
7. Select **No** to the question asking if you want your app to be publicly available to merchants.
8. Click **Create**. The *App name* - App Settings page appears. See [Manage app settings](https://docs.clover.com/dev/docs/app-settings) to configure the new app.
9. For requested permissions, review the [#permissions](#permissions "mention") below
10. The redirect URL will look like this: `https://{your instance subdomain here}.middle.app/oauth-redirect-uri/`

### Entering your app credentials

Regardless of whether you are using a public or private app, you will need to create an API Key in the Clover app in the app development portal. Enter your app's credentials and your instance's redirect URL using the following JSON template:

```json
{
"client_id": "xxxxxxxxxxxxx",
"client_secret": "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"redirect_uri": "https://{your instance subdomain here}.middle.app/oauth-redirect-uri/"
}
```

These credentials can then be selected in the app connection.

## Store tokens

To create a store token follow the below steps:

1. Log into your Clover store
2. Go to **Account & Setup**
3. In the "Business" Operations" menu, select **API Tokens**
4. Click **Create new token**
5. Name the token something that indicates that it is being used by Middle
6. Check off the permissions as outlined in below: [#permissions](#permissions "mention")
7. Enter your private token and merchant ID in [the Clover app connection page in Middle](/middle-docs/building-workflows/connect-or-edit-an-app-connection.md)

The linked doc tells you [how to find your merchant ID](https://docs.clover.com/dev/docs/locating-merchant-id).

## Permissions

Check off the following permissions regardless of whether you are setting up an OAuth app or store token:

| Data      | Read                 | Write                |
| --------- | -------------------- | -------------------- |
| Customers | :white\_check\_mark: | :white\_check\_mark: |
| Employees | :white\_check\_mark: |                      |
| Inventory | :white\_check\_mark: |                      |
| Merchant  | :white\_check\_mark: |                      |
| Orders    | :white\_check\_mark: |                      |
| Payments  | :white\_check\_mark: |                      |
| Ecommerce | :white\_check\_mark: |                      |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.middle.app/middle-docs/guides/app-reference/clover.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
