Skip to main content
The Chargebee Cometly integration connects Chargebee to Cometly using Cometly webhooks. A webhook sends data from one app to another in real time. Chargebee sends Cometly an event (an action Cometly tracks, such as a purchase) for every successful payment, new subscription and converted trial. This matters because Cometly can only attribute the events it receives. Once Chargebee sends its payments and subscriptions, you can see which campaign, ad set and ad produced each paying customer. The steps below set up a webhook that sends successful payments to Cometly. The other events you can send are covered at the end.

Step 1: Create the event in Cometly and copy its webhook URL

Chargebee needs a Cometly webhook URL to send data to, so start in Cometly.
  1. In Cometly, click Events Manager in the sidebar, then click Create Event.
  2. Under App / Integration, select Webhooks.
  3. Pick the event you want to track (for example Purchase), or choose Create New Event, then click Create.
  4. On the next page, click Copy next to Your webhook URL.
Keep this page open. You come back to it in step 3. For the full walkthrough, see the Cometly webhooks guide.

Step 2: Add the webhook in Chargebee

  1. In Chargebee, go to Settings > Configure Chargebee > API Keys and Webhooks, then switch to the Webhooks tab.
  2. Click Add Webhook.
    Chargebee Webhooks tab with an arrow pointing to the Add Webhook button
  3. Fill in the webhook:
    • Webhook Name: enter any name.
    • Webhook URL: paste the webhook URL you copied from Cometly in step 1.
    Chargebee Create a Webhook dialog with Webhook Name, Webhook URL, Events to Send and Create numbered
  4. For Events to Send, choose Payment Succeeded. This sends every new successful payment in Chargebee to Cometly.
    Chargebee Events to Send dropdown with a search for Payment Succeeded
  5. Click Create.
Each webhook you set up with Cometly should send only one event. To track more than one Chargebee event, create a separate webhook in Chargebee and a separate webhook event in Cometly for each.

Step 3: Finish the webhook in Cometly

Go back to the Cometly page from step 1 and click Check for Data. Once Chargebee has sent an event, follow the Cometly webhooks guide to:
  • Select the record Cometly received.
  • Map the Chargebee data to Cometly fields. Email and Event Time are required.
  • Add filters so that only the data you want is tracked.
  • Activate the event.
We recommend setting up the events below as separate webhooks, each with its own event in Cometly. You can view the full list of Chargebee event types.

Check it worked

In Cometly, open Events Manager. Your Chargebee webhook event shows a switch that is turned on in the Status column. After the next successful payment in Chargebee, open the Events Log tab: the event appears there within 60 seconds, with SUCCESS in the Details column.

Frequently asked questions

Does Cometly have a native Chargebee integration?

No. Chargebee connects to Cometly through Cometly webhooks, as shown in the steps above. If you would rather build the connection another way, you can also use Zapier or the Cometly API.

How long does it take for a Chargebee payment to show up in Cometly?

The event shows in the Events Log within 60 seconds of Chargebee sending it. It can take up to 15 minutes to appear in the reporting areas, such as the Report Builder or Ads Manager.

Why is my Chargebee test payment missing from my Cometly reports?

Test data sent before the webhook event was activated is not processed and does not appear in your reports. Activate the event in Cometly first, then send a new payment from Chargebee.

Next steps

Still have questions or need a hand? We’re happy to help. Reach our team at support@cometly.com.