Integrating with Chargebee

If you are using Chargebee and looking to award recurring commissions to your affiliates, this guide is for you. This guide assumes that you have a Zapier account with a (paid) plan that has the “Make Zaps with 3+ steps” feature. Alternatively, you could use Chargebee’s webhooks feature to take care of recurring commissions.

This guide is split into two parts. The first part is the integration for Chargebee V2, and the second part are the steps specific to V3. You should only follow the section of the guide which applies to the version of Chargebee you are using.

Chargebee V2

  1. Place the code just after the <body> tag of every page of your website.

    <script src="https://script.tapfiliate.com/tapfiliate.js" type="text/javascript" async></script>
    <script type="text/javascript">
        (function(t,a,p){t.TapfiliateObject=a;t[a]=t[a]||function(){
        (t[a].q=t[a].q||[]).push(arguments)}})(window,'tap');
    
        tap('create', '((((YOUR ACCOUNT ID))))', {include_methods: ['3p']});
        tap('detect');
    </script>
    

    {{{{NO_ACCOUNT_ID_SET_MESSAGE}}}}

  2. Hit save

  3. Next, in your Chargebee dashboard, got to: Settings > Tracking & Font Settings

  4. In the Conversion Tracking Pixel Code box, add the following code

    <script src="https://script.tapfiliate.com/tapfiliate.js" type="text/javascript" async></script>
    <script type="text/javascript">
        (function(t,a,p){t.TapfiliateObject=a;t[a]=t[a]||function(){
        (t[a].q=t[a].q||[]).push(arguments)}})(window,'tap');
    
        tap('create', '((((YOUR ACCOUNT ID))))', {include_methods: ['3p']});
        tap('conversion', '{{ subscription.id }}', 0);
    </script>
    

    {{{{NO_ACCOUNT_ID_SET_MESSAGE}}}}

  5. Hit save

Chargebee V3

  1. Place the following code just after the <head> tag of every page of your website:

    <script src="https://script.tapfiliate.com/tapfiliate.js" type="text/javascript" async></script>
    <script type="text/javascript">
        (function(t,a,p){t.TapfiliateObject=a;t[a]=t[a]||function(){
        (t[a].q=t[a].q||[]).push(arguments)}})(window,'tap');
    
        tap('create', '((((YOUR ACCOUNT ID))))');
        tap('detect');
      
        var cbInstance = Chargebee.getInstance();
        cbInstance.setCheckoutCallbacks(function(cart) {
          return {
            success: function(hostedPageId, data) {
                tap('conversion', data.subscription.id, 0);
            }
          }
    });
    </script>
    

    {{{{NO_ACCOUNT_ID_SET_MESSAGE}}}}

  2. Next, go to Settings > Customer facings Essentials > Checkout & self serve portal, then navigate to the Advanced Settings and add a domain in the option “Add domain”

  3. Save the changes you’ve made, and you’re done!

Recurring commissions

To setup recurring commissions, you can use our Zapier app.

Do note that you will need a Zapier plan that supports multi-step Zaps.

Important

Please remember to test a conversion before starting your program. This way you can verify that tracking has been set up correctly. You can create a test conversion by following the steps described here.

Start a 14-day free trial with all our features enabled

Start now