ChargeBee Tracking

This guide will help you to integrate Chargebee with Refersion, without using our on boarding flow, and with specific instructions for each type of thank you page.

Instructions For A Hosted Thank You Page:

Step 1: Install the tracking script

Install our tracking script anywhere a user can land ( this is typically the footer). Be sure to replace both "MERCHANT" and "pub_key". This script is a modified version from step 1 on

 <!-- REFERSION TRACKING: BEGIN --><script src=“//"></script><script>_refersion();_refersion(function(){    _rfsn._setSource(“CHARGEBEE");});</script> <!-- REFERSION TRACKING: END

Step 2: Configure webhooks

Configure web hooks within Chargebee Settings > Webhook settings. Be sure to replace the "MERCHANT", "pub_key" and "sec_key" areas:

Step 3: Paste in the keys and subdomain

Visit Chargebee Settings > Refersion. Paste in your pub_key, sec_key, and your Refersion subdomain. Select v2 for version.

Continue to follow the steps below only if you have a self-hosted thank you page. If you don't then contact Refersion and let us know that the installation process is complete. Our team will then whitelist your Chargebee domain!

Instructions For A Self-Hosted Thank You Page:

Step 4: Adding parameters

Add the following URL parameter to your redirect url:

Simply copy and paste: rfsn_ci={{}}

Step 5: Add the code snippet:

Add this code snippet to your thank you page:

<script src="//"></script> <script>function rfsn_getQS(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\ \]");var t=new RegExp("[\\?&]"+e+"=([^&#]*)"),n=t.exec(;return n==null?"":decodeURIComponent(n[1].replace(/\+/g," "))} if (rfsn_getQS('rfsn_ci')) { _refersion(function(){ _rfsn._addCart(rfsn_getQS('rfsn_ci')); _rfsn._setSource("CHARGEBEE"); }); }</script>

Step 6: Notify Refersion

Let us know when the installation is complete by emailing us at [email protected]. Our team will whitelist your Chargebee domain for security and help with a test order to make sure that tracking works!

ChargeBee Tracking