Chargebee integration
How to set up affiliate & referral programs with Chargebee
Chargebee manages your subscriptions. ReferBeam reads its subscription and invoice events and gives the partner who sent each customer the commission your rules say they earned.
How it works with Chargebee
Time to launch: most teams finish the 4 steps below in an afternoon. Updated December 2, 2026. This page covers how to setup affiliate and referral programs with Chargebee, the setup for referral program software and affiliate programs alike.
- 1
Add the tracking script
It records clicks and stores the visitor ID on your domain.
- 2
Create the webhook in ReferBeam
You get a webhook URL and credentials for your Chargebee site.
- 3
Add the webhook in Chargebee
Under Settings, Webhooks, add the URL and turn on basic authentication with the credentials from ReferBeam.
- 4
Save the visitor ID on the customer
Store it in a custom field named referbeam_vid at signup, so payments can be credited to a partner.
What ReferBeam tracks from Chargebee
- Subscription and invoice events
- Payments, upgrades and cancellations for recurring commissions
- The visitor ID from your custom field, to credit the right partner
Save the visitor ID on the Chargebee customer
// Create a custom field "referbeam_vid" on Customers in Chargebee, then at signup:
chargebee.customer.create({
email,
cf_referbeam_vid: visitorId, // from window.ReferBeam?.visitorId()
});Recurring commissions
Fraud checked before payday
One approval pays everyone
Questions about Chargebee
Do I need to write code?
A little: one script tag, and one line to save the visitor ID on the customer when they sign up.
Does it handle refunds and cancellations?
Yes. Refunds reverse the commission, and recurring commissions stop when the customer stops paying or your window ends.