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

# Stripe integration

> Set up the Stripe Cometly integration to send payments, subscriptions and refunds to Cometly as events, so you can see which ads bring in revenue.

The Stripe Cometly integration connects your Stripe account to Cometly to automatically track revenue and key payment events, with no code required. Each payment or subscription change arrives in Cometly as an event (an action Cometly tracks, such as a purchase or a new trial).

Once your Stripe revenue is in Cometly, each payment can be tied back to the ad or channel that brought in the customer. That lets you see which campaigns produce paying customers, not only clicks or leads.

## What the Stripe Cometly integration tracks

You can send these Stripe triggers into Cometly:

* **New Payment**
* **New Subscription**
* **Updated Subscription**
* **New Trial**
* **First Payment**
* **Canceled Subscription**
* **New Customer**
* **New Refund**

You can map any of these to a Cometly event, so you can attribute purchases, track conversions and optimize your marketing campaigns with accurate revenue data.

> [!TIP]
>
> Start by using the **New Payment** trigger to fire your **Purchase** event. This ensures every successful Stripe payment is tracked in Cometly.
>
> Once that is live, create a new event called "First Payment" and use the **First Payment** trigger to track only a customer's very first successful payment. Cometly checks the Stripe Customer ID to confirm it is their first, giving you more accurate attribution for initial conversions and new revenue.

## Step 1: Create the event

In Cometly, click **Events Manager** in the sidebar, then click **Create Event**.

![Events Manager page on the Events tab with the events table and an arrow pointing to the Create Event button.](https://mintcdn.com/cometly/alvP4_0ekdK-CBm_/images/integrations/platforms/stripe/01.webp?fit=max\&auto=format\&n=alvP4_0ekdK-CBm_\&q=85\&s=1cfd0cbe17f88e1bfb9e00cb49222211)

In the **Create Event** dialog:

1. Under **App / Integration**, select **Stripe**.
2. Choose your event name. You can pick an existing event or click **Create New Event**.
3. Click **Create**.

![Create Event dialog with numbered markers on Stripe under App / Integration, Purchase under Events and the Create button.](https://mintcdn.com/cometly/alvP4_0ekdK-CBm_/images/integrations/platforms/stripe/02.webp?fit=max\&auto=format\&n=alvP4_0ekdK-CBm_\&q=85\&s=85dd17fee3dc713847f112b07b404d4a)

## Step 2: Choose the account and trigger

The new event appears in the Events Manager as a draft. Click **Configure** on its row to begin setting up the Stripe integration.

![Events Manager showing the new Stripe Purchase event with the Draft status and an arrow pointing to the Configure button on its row.](https://mintcdn.com/cometly/alvP4_0ekdK-CBm_/images/integrations/platforms/stripe/03.webp?fit=max\&auto=format\&n=alvP4_0ekdK-CBm_\&q=85\&s=3a7a084864eb09376a03f4674860af6a)

Choose the Stripe account and the trigger that will send your selected event to Cometly.

1. **App**: this field is pre-selected as **Stripe**.

2. **Account**: click **Select an account** and choose the Stripe account you want to use. If this is your first time connecting Stripe to Cometly, click **Connect new account** to add your Stripe connection.

3. **Trigger**: choose when an event should be sent to Cometly. The available triggers are:

   | Trigger | When it fires |
   | - | - |
   | **New Payment** | Any successful payment greater than 0.00 |
   | **New Subscription** | A customer has signed up for a new plan |
   | **Updated Subscription** | A customer subscription has changed |
   | **New Trial** | A customer initiates a trial period for a new subscription |
   | **First Payment** | A customer makes their first payment greater than 0.00 |
   | **Canceled Subscription** | A subscription is canceled (by a subscriber or due to end of billing period) |
   | **New Customer** | A new customer is added |
   | **New Refund** | A charge is refunded, including partial refunds |

   When the **First Payment** trigger is used, Cometly looks up the earlier payments for that **Stripe Customer ID**. This lets Cometly confirm it is the customer's first successful payment (greater than \$0.00) and attribute the event to the correct marketing source.

4. Click **Continue**.

> [!WARNING]
>
> Once you select the **Account** and **Trigger**, they cannot be changed. To use a different account or trigger, you have to create a new event. Double-check your selections before you continue.

### Retrieve sample data from Stripe

Click **Check for Data**. This fetches the three most recent records from Stripe for your trigger.

If no data appears, you can come back later to map your data once events are sent. Click **Save & Return When Data is Ready** to leave the event as a draft.

Select a record, then click **Continue With Selected Record**.

## Step 3: Configure mapping

Map the fields in the Stripe data to Cometly fields. This step makes sure the event data you send, such as email addresses, event times or other custom data, lines up with Cometly's reporting.

**Email** and **Event Time** are required fields. The Stripe integration automatically configures the mapping, including the formatting for the **Amount** field. In most cases you can proceed to the next step.

**(Optional) Map fields manually**

1. **Email**: choose the email address field from your selected record.
2. **Event Time**: choose the dynamic option "The time we receive the event".

Click **Add Field** to map more fields, such as:

* First Name
* Last Name
* Phone
* Amount

After you have mapped data to Cometly fields, click **Save & Continue**.

## Step 4: Configure filters and activate the event

Filters let you control when an event in Stripe should actually create an event in Cometly. This step is optional, but recommended when you want to track specific payments for specific products or customer types.

### Common use cases for filtering Stripe events

* Only trigger the event in Cometly when **Product = Standard Plan**
* Send the event only when an amount is greater than \$500.00
* Avoid triggering events for customers that don't meet your qualification criteria

### Add filters

1. Click **Add Filters** (or **Add Another Filter** if you already have one).
2. Select the field you want to filter by (for example `plan` or `amount`).
3. Choose your condition (for example **(text) is**, **(text) contains** or **(text) starts with**).
4. Enter the value you want to match.

### Test result

* If your test data matches the filter, you see a green success message, with a line like:

  `plan (Standard) (text) is Standard - PASS`

* If the data does not pass, you see a message letting you know the data would not have continued and will not be processed as an event.

When your filters are configured, click **Activate** to activate your event. If you are editing an event that is already active, the button reads **Save**.

## Check it worked

In the **Events Manager**, your Stripe event now shows the status **Active** instead of **Draft**. The next time the trigger fires in Stripe, open the **Events Log** tab in the Events Manager: the event appears there within 60 seconds, with a green badge and **SUCCESS** in the **Details** column.

## Frequently asked questions

### How long does it take for Stripe payments to show up in Cometly?

A Stripe event shows in the Events Log within 60 seconds of being sent. It can take up to 15 minutes to appear in the reporting areas, such as the Report Builder or Ads Manager.

### Why do my Stripe payments show up in Cometly without an ad source?

Cometly needs an email address to connect a Stripe payment to the visitor who clicked your ad. Make sure a form earlier in your funnel collects the customer's email, so Cometly has already seen that email on your site when the payment arrives. For other causes, see [Understanding No Source in reports](https://docs.cometly.com/support/troubleshooting/sources/no-source.md).

### Should I use the direct Stripe integration or Stripe webhooks?

Use the direct Stripe integration on this page where you can: it is the recommended way to connect Stripe to Cometly. Stripe webhooks are an alternative for more complex events that you cannot set up with the direct integration. See [Stripe webhooks and Zapier](https://docs.cometly.com/integrations/guides/stripe-webhooks.md).

## Next steps

* [Use the Events Log to confirm Stripe events arrive](https://docs.cometly.com/support/troubleshooting/general/event-log.md)
* [Send conversions back to your ad platforms](https://docs.cometly.com/getting-started/send-conversions.md)
* [Learn how standard and custom events work](https://docs.cometly.com/guides/events/how-events-work.md)
* [Set up Stripe webhooks or Zapier for more complex events](https://docs.cometly.com/integrations/guides/stripe-webhooks.md)
* [Track first-time and recurring Stripe payments with Zapier](https://docs.cometly.com/integrations/guides/stripe-first-vs-recurring-payments-zapier.md)

Still have questions or need a hand? We're happy to help. Reach our team at [support@cometly.com](mailto:support@cometly.com).


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