Skip to main content
All CollectionsIntegrations
Integrating with Chargebee
Integrating with Chargebee

Learn how to integrate Tapfiliate with Chargebee

Anton Zelenin avatar
Written by Anton Zelenin
Updated over 10 months ago

Integrating Tapfiliate with Chargebee enables you to track affiliate-generated sales and commissions based on order amount for your subscription-based business.

In-app Checkout users

1. Insert 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', { integration: "chargebee" });

tap('detect');

var setupCb = function() {

if (typeof Chargebee === 'undefined') return;

var cbInstance = Chargebee.getInstance();

cbInstance.setCheckoutCallbacks(function(cart) {

return {

success: function(hostedPageId, data) {

tap('trial', data.subscription.customer_id);

}

};

});

};

"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?setupCb():document.addEventListener("DOMContentLoaded",setupCb);

</script>

Make sure to replace YOUR ACCOUNT ID with your actual account id.

2. Afterward, navigate to Settings > Configure Chargebee > Customer facings Essentials > Checkout & self serve portal. From there, proceed to Advanced Settings and include the domain where this code will be hosted within the 'Add domains' section > hit Save.

Additionally, you have the option to refer to our Chargebee integration guide right here.

Before launching your program, it's important to conduct a test conversion. This action will help you confirm your setup's accuracy and complete functionality before proceeding further.

How can I set up recurring commissions?

We prepared our Zapier app precisely for setting up recurring commissions. This guide assumes that you have a Zapier account. Alternatively, you could use Chargebee’s webhooks feature to handle recurring commissions.

Did this answer your question?