Getting Started

Building Blocks

Custom Fields

Subscription Features




Billing Features


Payment Methods

Direct Debit Payments

Configuring Gateways

Fraud Management

Hosted Pages


Reports and Analytics


Open Source Resources

Other Features

API Integration

Third Party Integrations


Refersion helps you build an affiliate program. It lets you track partners, sales and customer referrals. With the Refersion-Chargebee integration, you can track the number of visits to your website via your affiliates and conversions in your hosted pages that have happened via affiliate referrals. The integration tracks sign ups and payments in Chargebee, and gives commissions to affiliates that you've created in Refersion.


If you are using version 2 of the Chargebee-Refersion integration and are not using Chargebee's hosted pages, contact the support team to set up order tracking for your site via the API.

Set up Chargebee-Refersion Integration 

Step 1: Add Refersion's JS code to your site so it can start tracking your affiliate visits

Refersion is equipped to track visits and orders in your website that occur as a direct result of your affiliates. Insert this snippet of JS code   into the webpages (in your website) that you would like Refersion to keep a track of for affiliate redirected visits.

Step 2: Configure Chargebee in your Refersion site

  1. Sign up for a Refersion account. As a part of the signup process you will be prompted to connect with the platforms you are using with your website. Select Chargebee from the list.

  2. If you already have a Refersion account, login and navigate to Account > Settings > Tracking and click the Add Tracking option. Select Chargebee from the list of platforms displayed.

  3. You will have successfully connected to Chargebee when you fill in the following information on the Add Tracking > Chargebee > Connect Chargebee

  • Shop URL: This is your website's URL (example:

  • Chargebee Site URL: Your Chargebee domain name. For example: acmeinc.

  • API Key: Add your Chargebee API key. You can find this under Settings > API & Webhooks > API Keys.

Step 3: Configure Refersion in your Chargebee site

  1. Navigate to Settings > Third Party Applications > Refersion in your Chargebee site.

  2. You will have successfully connected your Chargebee site with Refersion when you fill in the following information when prompted and click Update.

    Refersion API keys (Public and Secret): You can find this information on Refersion by navigating to Account > Settings > Refersion API.

    Your subdomain: Subdomain refers to the name of your Refersion shop as it appears in your Refersion URL (example:

    The version of Refersion you are using: If you are new user or have started using Refersion select Version 2 from the dropdown menu.

Step 4: Configure webhooks for Refersion

Finally, provide Chargebee with your Refersion webhook URL. This will allow Refersion to track your orders and calculate any commissions that are owed to your affiliates.

To configure webhooks between Chargebee and Refersion use the following URL format, entering your subdomain, public key and, secret key:


If you make use of Chargebee's hosted pages for sign ups, additional setup is not necessary. The plugin setup as described above is sufficient to track site visits and site orders. If you are an API user, on the other other hand, contact Chargebee support to manually configure order tracking in your checkout pages.

Set up Commissions in Refersion 

An Offer is used for configuring affiliate commissions in Refersion. This is done under Manage > Offers.

There is a Default Offer in Refersion. You could edit this or create a new one. To create a new offer, use the Create New button.

Once you've created a new offer, you can make it default.

Creating Affiliates 

Affiliates can be created by either allowing them to create their affiliate account or you can do it on their behalf.

To allow them to register themselves, click on the Affiliate Registration link under Create New in your Refersion dashboard. Link the URL to your website.

You can create new affiliates under Manage > Affiliates.

  • One time charges added to customers are not tracked. Only one time charges applied to subscriptions will be updated in Refersion.

  • No updates are made in Refersion when refund transactions happen in Chargebee

  • For subscriptions in Trial and Future state, a $0 invoice amount is sent to Refersion to track the conversion.


What does Refersion track in my website?

Refersion tracks and reports on two things:

  • Visits to your website that are a direct result of your affiliates (these are tracked through the affiliate URLs that you set up in your Refersion site) and

  • Orders made on your website (or with Chargebee's hosted pages) that are a direct result of your affiliates.

Tracking orders also helps Refersion calculate the commission owed to your affiliate for facilitating the sale.

How can I set up tracking orders with Refersion if I am not using Chargebee's hosted pages?

If you are not using Chargebee's hosted pages, contact  to set up tracking your orders with Refersion.

Chargebee communicates with Refersion via webhook. Where can I find this webhook in my Refersion site?

The webhook that Chargebee uses to communicate with Refersion needs to be set up manually using your Refersion subdomain, your public API key and your secret API key. It cannot be copied from your Refersion website and pasted in Chargebee.

Where can I find my API keys in Refersion?

Your API keys are available at: Account > Settings > Refersion API. Log into your Refersion account and navigate to this page to access your API keys.

How do I know what version of Refersion to choose in Chargebee?

If you are a new user or are using the Chargebee-Refersion integration for the first time, then choose version two.