Start Here 👋
With Cometly, you can track Stripe events like payments and trials. This guide will walk you through the steps for setting up Stripe Webhooks to track:
New Payments
New Trials
💡 Tip: To track other custom events from Stripe (New Customers, Converted Trials), start with the New Payments webhook setup. This will help you understand the process and apply it to any other events you want to track in Cometly.
Webhooks are the recommended way to integrate Stripe with Cometly for real-time tracking. They allow you to send specific Stripe events, such as new payments, trials, or subscription conversions, to Cometly with precision. Follow the steps below to configure your integration.
Before You Begin:
Email Required for Tracking: Make sure there’s a lead opt-in form earlier in your funnel to collect emails. Without an email captured, Stripe events cannot be properly attributed.
Using Stripe Checkout? Ensure your forms collect email addresses to track conversions accurately.
If you prefer using Zapier, jump to the Zapier Integration section of this article for step-by-step instructions.
Step 1: Setup Event
Go to the Space Setup page.
Click Add Events to start sending event data.
Where it asks you where you would like to send your event from, choose Webhooks and click Next.
After choosing Webhooks you will be able to choose from a pre-configured event or create a new event.
After selecting Webhooks, choose an event to track from the pre-configured options or create a new event.
New Payments: Select Purchase (automatically calculated in Gross Revenue).
New Trials: Select Start Trial
Copy the Webhook URL generated by Cometly—you’ll need this in Step 2.
Step 2: Add the Webhook to Stripe
Log in to your Stripe Dashboard.
Navigate to Developers > Webhooks in the bottom left-hand menu.
On the Developers page click Webhooks in the top menu below
Click + Add Endpoint
Paste the Webhook URL in the Endpoint URL box
Click Select events to listen to and use the sections below to configure events for specific scenarios:
Below are detailed instructions for each type of event. You can choose to set up any or all of these based on your tracking needs.
Important: Each Cometly event gets its own webhook. In Stripe, make sure each webhook is linked to only one Stripe event to avoid mapping issues later.
New Payments
Tracks successful payments for any method of payment (credit cards, ACH, Wire, Affirm, Klarna, etc.)
Stripe Event:
invoice.paid
Selecting invoice.paid
Stripe Event Instructions
Search for invoice paid
Select
invoice.paid
as the event in Stripe.Select Add Events
Click Add Endpoint
Navigate back to the webhook in Cometly and click Check for Data.
Wait for your app to send an event. If no data shows up right away, don't worry, you can return to this step later once events are sent.
If no data was sent yet, you can click Skip and map data later, and come back later to Check for Data again.
To come back to that specific Webhook, you can navigate to Events Manager and you will see your Event configuration In draft
. Hover over the event and click the gear cog to navigate back to the Webhook URL to check for data.
When you click Check for Data and see recent event data from Stripe, you’re ready to start mapping. Simply click on the data to ensure data is there and then click Continue with Selected Record.
Mapping Fields for Webhook event data
Use the fields below to send the webhook data.
Email: Map
data.object.customer_email
to the Email field.Event Time: Use The time we receive the event.
Amount: Map
data.object.amount_paid
On the next step below we will show you how to apply formatting options to move the decimal place over twice so the amount is correct.
Full Name: Map
data.object.customer_name
to the Full Name field.
Amount Formatting Instructions
The payment was originally for 500 but it shows as 50000, so we need to use the formatting options to adjust the decimal places for the amount field.
In the Amount field box, click Formatting Options to expand the formatting settings.
Select Decrease decimal places icon (1) from the available options and click Select decimal places (2).
Click Enter value field
Enter -2
in the Fixed Value box and click save. This reduces the amount by two decimal places to format it correctly (e.g., 50000
becomes 500
).
The formatted value will appear under the Formatted section. Click Save & Continue to go to the next step.
Filtering Configuration for New Payments
In the Filtering Configuration section, click Add Filters to open the filter options.
Use the search bar to type
status
Select
data.object.status
from the list of available fields
After selecting the data.object.status
field:
Choose the condition (text) contains from the list of available conditions and enter
paid
as the value for the condition to ensure the webhook processes only successful payments.Click Done
Review your filter settings and click Activate to enable the webhook with the applied filter.
These steps ensure that only successful payment events (where the status
contains "paid") are processed by Cometly, filtering out unsuccessful payments.
In your Events Manager, you will now see the Webhook toggled on which indicates it is successfully processing successful New Payments from Stripe.
New Trials
Tracks when a customer starts a trial subscription.
Stripe Event:
customer.subscription.created
Selecting invoice.paid
Stripe Event Instructions
Search for invoice paid
Select
invoice.paid
as the event in Stripe.Select Add Events
Click Add Endpoint
Navigate back to the webhook in Cometly and click Check for Data.
Wait for your app to send an event. If no data shows up right away, don't worry, you can return to this step later once events are sent.
If no data was sent yet, you can click Skip and map data later, and come back later to Check for Data again.
To come back to that specific Webhook, you can navigate to Events Manager and you will see your Event configuration In draft
. Hover over the event and click the gear cog to navigate back to the Webhook URL to check for data.
When you click Check for Data and see recent event data from Stripe, you’re ready to start mapping. Simply click on the data to ensure data is there and then click Continue with Selected Record.
Mapping Fields for Webhook event data
Use the fields below to send the webhook data.
Email: Map
data.object.customer_email
to the Email field.Event Time: Use The time we receive the event.
Full Name: Map
data.object.customer_name
to the Full Name field.
Click Save & Continue to go to the next step.
Filtering Configuration for New Payments
In the Filtering Configuration section, click Add Filters to open the filter options.
Use the search bar to type billing
Select
data.object.billing_reason
from the list of available fieldsIt should say subscription_create like in the image below. You will need to create a trial on your end to ensure you are mapping a record that has subscription_create or wait for the next trial.
After selecting the data.object.billing_reason
field:
Choose the condition (text) contains from the list of available conditions and enter
subscription_create
as the value for the condition to ensure the webhook processes only successful payments.Click Done
Next, add another filter by selecting data.object.amount_paid
from the available fields. Choose the condition (text) is
from the list of options and enter 0
as the value. This filter ensures that only new trial subscriptions with a $0 invoice, indicating they are trials, are processed.
Click Activate.
In your Events Manager, you will now see the webhook toggled on which indicates it is successfully processing New Trial events from Stripe.
Zapier (For Stripe Payments)
If you prefer Zapier for tracking new payments, follow these steps:
Create a new Zap and choose Stripe as your Trigger
Choose New Payment as your Event for Stripe
For your first action, please select filter. We will use the filter to only send successful payments to Cometly.
For the Filter setup & testing section, configure the filter so it will only continue if the status (text) exactly matches succeeded
Click Continue & test and proceed to the next step.
Choose Cometly as an action and configure the Zap to send payment events to Cometly
Follow the steps below to configure the action.
You must include the following fields: Event Time, Email, Amount, and Event.
Event: select 'purchase' (required)
Event Time: write in 'now' (required)
Email: choose the email from Stripe trigger (required)
Full Name: choose the full name from Stripe trigger (recommended)
Amount: choose the amount from Stripe trigger (recommended)
Test and publish your Zap.