> ## 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.

# Loops App

> Install the official Loops app to add Dodo Payments customers to Loops as contacts and send payment, refund, and subscription events. The app sends no email.

## What the Loops app does

The Loops app adds a customer to Loops as a contact after a successful payment and when a subscription starts or renews. It can also send Dodo Payments events to Loops, for example `payment_succeeded`. A Loops workflow can start on an event. The app sends no email.

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

## Before you start

* You are an owner or an admin of the Dodo Payments business.
* You have a Loops account and an API key.

## Install, connect, and configure

**1. Install the app**

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

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

**2. Connect Loops**

Select **Connect**. In Loops, open the settings, then **API**, and copy the API key. Enter the key in the **API Key** field, then select **Connect**.

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

**3. Choose the settings**

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

![The Configure tab of the Loops app with the setting switches and the User groups field](https://mintcdn.com/dodopayments/9p5nlYkB8XwTy1ds/images/app-marketplace/merchant/apps/loops-1.png?fit=max\&auto=format\&n=9p5nlYkB8XwTy1ds\&q=85\&s=21e2d36ca3fa7c4329f2492b24582821)

**4. Set the user groups and the filters (optional)**

To set the Loops user group from the product, write one line for each product in **User groups**. Use the form `pdt_123=Pro`. Then pick the products and currencies.

![The User groups field with two product lines, and the Products and Currencies filters](https://mintcdn.com/dodopayments/9p5nlYkB8XwTy1ds/images/app-marketplace/merchant/apps/loops-2.png?fit=max\&auto=format\&n=9p5nlYkB8XwTy1ds\&q=85\&s=3b3fb6bd12e184df4f4f51e600779fa7)

## Settings

| Setting | What it does | Default |
| - | - | - |
| Add customers as contacts | Create or update a Loops contact for each successful payment and each new or renewed subscription. | On |
| Write the subscription status | Write the status of each subscription change, for example active or cancelled, to the contact property `dodoSubscriptionStatus`. | On |
| Send events to Loops | Send each payment, refund, and subscription change as a Loops event. | Off |
| User groups | Set the Loops user group of a contact from the product. One line for each product: `pdt_123=Pro`. The first product of the event that has a line gives the group. | Empty |
| Set the Loops user ID | Set the Loops `userId` of a contact to the Dodo customer ID. Turn it on only if no other tool sets the `userId`. | Off |
| Products | Send data only for the products that you pick. | 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 Dodo customer ID of the customer. It also sends the subscription status and the user group. An event also sends the amount, the currency code, the product IDs, and the object ID. The app sends no card data and no address.

Loops subscribes a new contact. The app never subscribes a contact again after the contact unsubscribes. When a contact does not exist, an event creates it and Loops subscribes it.

The app updates the name of an existing contact at each payment. A name that you changed in Loops changes back to the name in Dodo Payments. Add each event property in Loops before you use it in an email. If **Set the Loops user ID** is on, Loops can refuse the update when a different contact has the same `userId`.

## 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 Loops**

Open **Audience** in Loops. The contact of the test customer appears. If **Send events to Loops** is on, the `payment_succeeded` event appears on the contact.

## Troubleshooting

| Problem | What to do |
| - | - |
| The connection fails | Copy the API key again from the Loops settings, then select **Connect**. |
| Loops refuses the update when **Set the Loops user ID** is on | Another contact has the same `userId`. Turn off the setting, or remove the `userId` from the other contact. |
| An event property is not in the email | Add the event property in Loops. |
| The user group is empty | Check that each line has the form `pdt_123=Pro` and that the product ID is correct. |
| **Connection needs attention** | Loops 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 Loops 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.