For the complete documentation index, see llms.txt. This page is also available as Markdown.

Integrate with Chargebee

Chargebee is a subscription billing and revenue management platform. impact.com B2B brands are often running Performance programs to drive new subscription sign-ups and reward partners based on recurring payments from the sign-ups.

If you're using Chargebee, you can configure an integration to report subscription events and refunds directly to your program on impact.com.

How it works

  1. On your website (or store), you'll implement a script that captures an impact.com im_ref value from the user's landing page query string, then create a custom field in Chargebee account for the Click ID value.

  2. You'll then generate a read-only Chargebee API key for impact.com to use.

  3. You'll provide the Chargebee API key for impact.com via our partner integration portal, which will generate URLs for the webhooks.

  4. Once authenticated, the integration uses Event Webhooks to capture subscription events and refund events from Chargebee and send them to your impact.com account.

Check before integrating

Before proceeding with the Chargebee integration, ensure you have:

  • Access to your impact.com account

  • Admin access to your Chargebee account

  • Your impact.com account credentials ready

  • A Performance program set up in impact.com

Configure a Chargebee custom field for the Click ID

Create an impact_click_id field and add it to the subscription as a custom field.

  1. In the left navigation menu, select Settings → Configure Chargebee.

  2. In the Advanced section, select Custom fields.

  1. At the top of the screen, use to dropdown to select Custom fields for your Subscription, then select Single line text.

  1. For Field Label, enter impact_click_id.

  2. Leave all other fields to their default values and select Save to site.

💡 Example

The example below indicates the JavaScript to add to your subscription checkout page to ensure that every new subscription record gets the impact_click_id value added to the subscription custom field:

Integration setup

1

Create a Chargebee API key

Chargebee API Keys Refer to Chargebee Docs to learn how to create a read-only API key, or follow the steps below.

  1. In the left navigation menu of your Chargebee account, select Settings → Configure Chargebee.

  2. Next to API Keys and Webhooks, select API keys.

  3. On the API Keys and Webhooks screen, select Add API Key.

  4. In the Create an API Key modal, select Read-Only Key.

  5. For the next step, select All, name the key Impact, then select Create Key.

2

Configure the integration

  1. On the dashboard under Platforms, select Chargebee.

  2. On the login screen, enter your impact.com API Account SID & Auth Token.

    • Refer to the callout below for your Account SID & Auth Token.

  1. Enter your impact.com info in the fields.

  • Refer to the callout below for your Account SID & Auth Token.

  1. Select Submit.

  • The portal will display the information you submitted and generate two Execution URLs — one for conversions, and other for refunds. Save your execution URLs somewhere safe — you'll need to add these to your Chargebee account.

impact.com Account Info Cheat Sheet

Not sure what your account info is? Refer to the table below:

Field
Description

Impact Account SID *

In the impact.com platform, from the top navigation bar, select [User profile] → Settings → API and copy your Account SID.

Auth Token *

In the impact.com platform, from the top navigation bar, select [User profile] → Settings → API and copy your Auth Token.

Program ID *

In the impact.com platform, select your brand name in the top-left corner. Your Program ID is the numerical value under the program name.

Program ID screenshot

Event Type ID *

In the impact.com platform, from the top navigation bar, select [User profile] → Settings → Event Types. Copy the number in parenthesis next to the name of the event type.

Recurring Tracker ID *

In the impact.com platform, navigate to your Event Types. Copy the number in parenthesis next to the name of the Recurring Subscription event type.

3

Create Chargebee webhooks

Create a webhook for "Payment Succeeded"

  1. In the Chargebee navigation menu, select Settings → Configure Chargebee.

  2. Go to the API Keys and Webhooks section, then select Webhooks.

  3. On the Webhooks screen, select Add Webhook.

  4. For Webhook Name, input Impact Conversion Webhook.

  5. For Webhook URL, input the Execution URL for Conversions you received from impact.com Integration Partner Portal.

  6. Ensure Protect webhook URL with basic authentication is [Off].

  7. For API version, select Version 2.

  8. For Events to Send, use the dropdown to select Payment Succeeded.

  9. Leave the remaining options [Off], then select Create.

Create a webhook for "Payment Refunded"

  1. In the Chargebee navigation menu, select Settings → Configure Chargebee.

  2. Go to the API Keys and Webhooks section, then select Webhooks.

  3. On the Webhooks screen, select Add Webhook.

  4. For Webhook Name, input Impact Conversion Webhook.

  5. For Webhook URL, input the Execution URL for Refunds you received from the integration partners portal.

  6. Ensure Protect webhook URL with basic authentication is [Off].

  7. For API version, select Version 2.

  8. For Events to Send, use the dropdown to select Payment Refunded.

  9. Leave the remaining options [Off], then select Create.


Conversion and Refund Reporting

Payment Succeeded

When a Payment Succeeded event takes place in Chargebee, the request is sent to impact.com with the following data mapping:

impact.com Parameter
Chargebee

CampaignId

taken from integration settings

ActionTrackerId

taken from integration settings

IntegrationSource

Impact_Chargebee_Plugin

ClickId

content.subscription.cf_impact_click_id

EventDate

timestampToISO(content.invoice.paid_at)

OrderId

content.invoice.id

CustomerId

content.customer.id

OrderPromoCode

content.invoice.discounts[0]

CurrencyCode

content.transaction.currency_code

CustomerEmail

content.customer.email

ItemSku{i}

content.invoice.line_items[].entity_id

ItemCategory{i}

content.invoice.line_items[].description

ItemQuantity{i}

content.invoice.line_items[].quantity

ItemSubTotal{i}

Calculated from various attributes

Payment Refunded

When a Payment Refunded event takes place, a request will be sent to impact.com. After one hour has passed (to ensure a valid initial conversion), impact.com will process the refund request, with the following data mapping:

impact.com Parameter
Chargebee charge.refund parameter

EventTypeId

taken from integration settings

Reason

OTHER

ItemSku{i}

content.credit_note.line_items[].entity_id

ItemQuantity{i}

Calculated from various attributes

ItemSubtotal{i}

Calculated from various attributes

OrderId

content.invoice.id

Last updated