Launch and scale your affiliate program with AFFY. Track referrals, automate payouts, and manage partners with our intuitive affiliate management software.
Chargebee has no affiliate tracking built in. AFFY connects via webhooks and a custom checkout field to automatically attribute every subscription, renewal, and refund to the right affiliate — no manual reconciliation, no spreadsheets.
Without AFFY
With AFFY + Chargebee
Three steps — including the custom field that makes attribution reliable.
Paste one script tag into your site's <head>. AFFY stores a 30-day attribution cookie when a visitor clicks an affiliate link.
Copy your AFFY webhook URL, register it in Chargebee with Basic Auth credentials, enter the same credentials in AFFY, and save your API Key and Site Name.
Create the custom field in Chargebee's checkout settings and use the AFFY checkout API to pass the click ID at checkout. This is the key step for reliable attribution.
Step 2 in detail — Chargebee Dashboard
In AFFY → Settings → Integration, copy the Chargebee Webhook URL and note your API Key and Site Name fields.
In Chargebee → Settings → API Keys & Webhooks → Webhooks, add a new webhook. Paste the AFFY URL, enable Basic Auth with a username and password of your choice, and select events: payment_succeeded, subscription_created, subscription_renewed, subscription_cancelled, payment_refunded.
Back in AFFY, enter the same Basic Auth username and password, your Chargebee API Key, and your Site Name (e.g. your-site.chargebee.com). Click Save Settings.
Step 3 in detail — cf_click_id custom field
This field stores the affiliate click ID on the Chargebee subscription. It's what makes attribution reliable when customers change emails between click and checkout.
In Chargebee → Configure Chargebee → Checkout & Self-Serve Portal → Fields tab, click Add/Manage Custom Fields under "Custom fields for subscription".
Select the Subscriptions tab and add a new field: Type = Single line text, Label = Affiliate Click ID, API Name = cf_click_id (must be exactly this).
Return to the Fields tab, find Affiliate Click ID, click Edit, set In checkout to "Use as hidden parameter" and In portal to "Hide". Click Apply, then Publish.
subscription[cf_click_id] directly in the hosted page URL is silently dropped by Chargebee v4. Use the AFFY checkout API (see below) to set it server-side instead.// 1. Read the AFFY click ID from the tracking script
const clickId = typeof AffyJS !== 'undefined' && AffyJS.getReferralId
? AffyJS.getReferralId()
: null;
// 2. Call the AFFY checkout API — it creates the Chargebee
// hosted page server-side with cf_click_id correctly set
const res = await fetch(
'https://affy.pro/api/v1/public/chargebee/YOUR_PUBLIC_ID/create-checkout',
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
planId: 'your-chargebee-item-price-id',
email: customerEmail,
clickId: clickId, // null is fine — AFFY handles it gracefully
}),
}
);
// 3. Redirect the customer to Chargebee checkout
const { checkoutUrl } = await res.json();
window.location.href = checkoutUrl;AFFY tries the most reliable method first. Each fallback ensures no referral is lost.
Stored on the Chargebee subscription at checkout via the AFFY API. Works even if the customer changes email.
Passed via subscription metadata at checkout. Reliable when populated.
Email from the Chargebee webhook matched against leads recorded by the tracking script. Fails if the customer uses a different email.
Track every renewal via subscription_renewed. Configure first-payment-only or lifetime recurring commissions per flow — no extra code.
AFFY supports both Chargebee catalog models. Whether you use the legacy Plans model or the newer Items model, checkout creation works correctly.
Click ID → affiliate ref → email fallback. AFFY tries the most reliable method first and falls back gracefully so no referral is lost.
Chargebee handles global billing. AFFY auto-converts transaction amounts to your base currency at the time of the event.
payment_refunded triggers automatic commission reversal — full or proportional. No manual corrections in your records.
Webhook requests are protected with HTTP Basic Auth credentials you control. Unauthenticated requests are rejected before touching commission data.
Select all five events when creating the webhook in Chargebee.
| Chargebee Event | What AFFY does |
|---|---|
| payment_succeeded | Creates a commission for the referred affiliate. |
| subscription_created | Records the new subscription; commission created on first payment. |
| subscription_renewed | Creates a commission for the renewal payment. |
| subscription_cancelled | No commission action — cancellation logged for reporting. |
| payment_refunded | Marks the related commission as Refunded and removes it from the payout queue. |
Neither Tolt nor Rewardful supports Chargebee. AFFY is the only affordable option.
| Feature | AFFY from €29/mo | Tolt from $49/mo | Rewardful from $49/mo |
|---|---|---|---|
| Starting price | €29/mo | $49+/mo | $49/mo |
| Chargebee | |||
| Stripe | |||
| Paddle | |||
| Subscription renewals | |||
| Refund auto-handling | |||
| Plans & Items models | |||
| GDPR self-service | |||
| 1099 tax generation | Premium | ||
| Telegram approval bot |
Among major affiliate tools, AFFY is the only one that supports Chargebee at a non-enterprise price point. Full comparison →
2 months free on PRO. The only affordable tool with native Chargebee support.
No credit card · Cancel anytime · Also supports Stripe & Paddle