Step 1)

If you are NOT using Chargebee Drop-in JS script (the one that shows their popup checkout), skip this step and use our sign-up tracking script or API like it's specified on the setup instructions page to track the signups first and proceed to step 2 below(setting up the Chargebee webhook).

If you are using Chargebee popup checkout, you won't be able to get the customer details through Javascript(our signup tracking script won't work in this case) so we need to use another approach to match the customer with the tracking id stored in the browser cookie:

a)  Set up a text custom field for the Customer object on Chargebee called "cf_tid". Click here for more information about Chargebee custom fields. 

b) Copy-paste the following code on your pricing page. Make sure it's added AFTER Chargebee JS script  which looks like this <script src="https://js.chargebee.com/v2/chargebee.js" data-cb-site="yoursite"></script>

Tracking script to copy-paste:

<script>
var chargebeeTrackFunc=function(fprom) {
    var tid = fprom.data.tid;
    if (tid){
        var chargebeeInstance = Chargebee.getInstance();
        var cart = chargebeeInstance.getCart();
        cart.setCustomer({cf_tid:tid});
     }
};
if (window.$FPROM)
chargebeeTrackFunc($FPROM);
else{
_fprom=window.fprom||[];window._fprom=_fprom;_fprom.push(['_init',chargebeeTrackFunc]);
}
</script>

Step 2)

Make sure you are on FirstPromoter Chargebee integration setup, either by going to Settings > Integrations > Chargebee > Setup or from the Quick Setup Wizard from Getting Started section. Make sure you see this:

Set Chargebee Webhooks

  1. Login to Chargebee and go to Settings > Webhook Settings
  2. Click 'Add new webhook' button on top right(if it's visible)
  3. On Webhook name set something like 'FirstPromoter'
  4. On the Webhook URL, paste the Webhook Endpoint URL value from FirstPromoter integration setup
  5. Select API version - V2
  6. Check 'Exclude card object from webhook call'
  7. Click 'Create Webhook'
  8. Back to FirstPromoter, on 'Site' field, enter your Chargebee subdomain(look at the URL bar, if your URL is https://mycompany.chargebee.com your site is 'mycompany')
  9. Click 'Save'
Did this answer your question?