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

# Close App

> Install the official Close app to find or create Close contacts for your Dodo Payments customers and add a note to the lead for each payment, refund, and dispute.

## What the Close app does

The Close app finds or creates a Close contact for each customer. It also adds a note to the lead of the contact for each payment, refund, and dispute. The app sets no lead status and makes no opportunities.

> [!NOTE]
>
> To send events to Close through your webhook endpoint and your transformation code, use the [Close CRM webhook connector](https://docs.dodopayments.com/integrations/close-crm.md).

## Before you start

* You are an owner or an admin of the Dodo Payments business.
* You have a Close account and you can make an API key. The user of the key must have the permission **View All Leads**.

## Install, connect, and configure

**1. Install the app**

Open **Apps**, then **Explore**. Open **Close** (publisher **Dodo Payments**) and select **Install app**.

![The Installed tab of Apps with Close in the list and the status Active](https://mintcdn.com/dodopayments/9p5nlYkB8XwTy1ds/images/app-marketplace/merchant/apps/close-4.png?fit=max\&auto=format\&n=9p5nlYkB8XwTy1ds\&q=85\&s=3f81c59b3426b54ba147e01476878422)

**2. Connect Close**

Select **Connect**. In Close, open **Settings**, then **Developer**, then **API Keys**. Make a key. Paste it in the **API Key** field, then select **Connect**. The grey text in the field is an example, not a real key.

![The Connect Close dialog with the API Key field](https://mintcdn.com/dodopayments/9p5nlYkB8XwTy1ds/images/app-marketplace/merchant/apps/close-3.png?fit=max\&auto=format\&n=9p5nlYkB8XwTy1ds\&q=85\&s=c9b658ba3c5e57253573a3d1ecc4211b)

**3. Make the contact custom fields (optional)**

To use **Write the Dodo contact custom fields**, open **Settings**, then **Custom Fields**, then **Contact** in Close. Make three text fields: `dodo_customer_id`, `dodo_subscription_status`, and `dodo_status_updated_at`. The app stops with an error when a field does not exist.

**4. Choose the settings**

Open the **Configure** tab, set the options, and select **Save**.

![The Configure tab of the Close app with the three setting switches and the Products filter](https://mintcdn.com/dodopayments/9p5nlYkB8XwTy1ds/images/app-marketplace/merchant/apps/close-1.png?fit=max\&auto=format\&n=9p5nlYkB8XwTy1ds\&q=85\&s=d0d89c296d2482653970a8ad75adff58)

**5. Pick the filters**

Pick the products and currencies, then select **Save**.

![The Close Configure tab with the Products and Currencies filters](https://mintcdn.com/dodopayments/9p5nlYkB8XwTy1ds/images/app-marketplace/merchant/apps/close-2.png?fit=max\&auto=format\&n=9p5nlYkB8XwTy1ds\&q=85\&s=466ea849a0e185bb7e5826bdcc7d4633)

## Settings

| Setting | What it does | Default |
| - | - | - |
| Add customers as contacts | Find the contact of the email for each successful payment and each new or renewed subscription, and write the name. If no contact has the email, the app creates a lead with one contact and writes the country as the lead address. | On |
| Write the Dodo contact custom fields | Also write `dodo_customer_id`, `dodo_subscription_status`, and `dodo_status_updated_at`. The app writes the status when a subscription goes on hold, is cancelled, or expires. | Off |
| Add a note for payments, refunds and disputes | Add one note to the lead of the contact for each successful payment, each successful refund, and each opened dispute. | On |
| Products | Send contact data only for the products that you pick. The notes do not use this filter. | All |
| Currencies | Send data only for the currencies that you pick. | All |

## What is sent and when

Dodo Payments sends data after the Dodo Payments event happens. The app sends the email address, the name, and the billing country code of the customer. With **Write the Dodo contact custom fields** on, it also sends the customer ID, the subscription status, and the time. A note shows the event, the amount in the major unit with the currency code, the product names, and the Dodo ID. The app sends no card data and no street address.

When no contact exists, the app creates a lead with one contact that has only the email for a note. The app updates the name of an existing contact at each payment. A name that you changed in Close changes back to the name in Dodo Payments.

Close has no create-or-update by email. If two events of a new customer occur at the same time, for example two payments, each event can create a lead. Merge the duplicate leads in Close.

## Test the app

**1. Use test mode**

Install and connect the app in test mode.

**2. Make a test payment**

Create a test payment with a test customer email.

**3. Check Close**

Open **Leads** in Close. The test customer appears. If notes are on, the lead has a note for the payment.

## Troubleshooting

| Problem | What to do |
| - | - |
| The connection fails | Make a new API key in Close. Check that the user of the key has the permission **View All Leads**. Close gives an error for a key that is not valid and for an inactive key. |
| Close refuses the update after you turn on **Write the Dodo contact custom fields** | Make the three text contact custom fields in Close. |
| A contact has the wrong name | The app writes the name of Dodo Payments at each payment. Change the name in Dodo Payments. |
| Two leads exist for one customer | Two events of a new customer ran at the same time. Merge the leads in Close. |
| **Connection needs attention** | Close stopped accepting the credentials. Select **Reconnect** and enter new credentials. |
| No data arrives | Check that the setting switch is on and that the product and currency filters do not skip the event. Check that the customer has an email address. |

## Disconnect and uninstall

Turn off the settings on the **Configure** tab to stop sending data. Uninstall the app to delete the Close connection. See [Manage and uninstall](https://docs.dodopayments.com/features/app-marketplace/manage-and-uninstall.md).


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