Run a Chargebee affiliate program with OpenPromoter
Chargebee at a glance
Does Chargebee have a built-in affiliate program?
We found no affiliate feature in Chargebee's docs as of November 2026. Its docs describe affiliate tracking through a Refersion integration and other tools connect through webhooks. OpenPromoter connects the same way and reads a click id you store on the Chargebee customer.
Source: Chargebee Refersion integration (November 2026).
The commission base is the invoice subtotal minus discounts. Tax on the invoice never earns a commission.
How Chargebee affiliate tracking works on the customer
OpenPromoter reads the click id from the Chargebee customer record. You store op_click in the customer's meta_data or in a custom field with the API name cf_op_click. Every payment webhook carries the customer and OpenPromoter credits the partner from the value it finds there.
meta_data is a JSON object of up to 65,535 characters. Source: Chargebee customers API (November 2026). OpenPromoter also reads op_click from the subscription's meta_data.
When to write the click id
Send window.openpromoter.clickId from your signup form to your server. Write it to meta_data when your server creates the Chargebee customer. It must be there before the first payment.
Hosted checkout and signup emails
Chargebee's hosted checkout can create the customer and take the first payment in one step. That leaves no time to write the click id. Call openpromoter.signup() with the buyer's email before checkout and customer_created matches that email to the partner.
Custom fields
A custom field works if your team prefers one. Chargebee allows up to 50 custom fields on each supported object. Source: Chargebee custom fields (November 2026).
Coupons as partner codes
A coupon on the invoice counts as the partner's coupon code. OpenPromoter reads the coupon id from the invoice. Enter the Chargebee coupon id on the partner's page.
{ "meta_data": { "op_click": "clk_8f2k…" } }Set up a Chargebee affiliate program in four steps
A Chargebee affiliate program needs one webhook with basic authentication and a click id on each customer. You add the webhook in Chargebee, pick six events and paste the same credentials into OpenPromoter. Then your server writes op_click when it creates the customer.
- 1
Add a webhook
Go to Settings > Configure Chargebee > API Keys and Webhooks and add /api/webhooks/chargebee/<workspaceId>.
- 2
Turn on basic auth
Protect the URL with basic authentication and choose a user name and password.
- 3
Paste the credentials
Enter the same user:password in Settings > Integrations.
- 4
Store the click id
Save op_click in meta_data or in a cf_op_click field.
Chargebee webhooks carry no signing secret. OpenPromoter checks the basic-auth credentials on every request.
Chargebee retries a failed call up to 7 times and allows up to five webhooks for each site. Source: Chargebee webhook settings (November 2026).
Chargebee webhook events and what each one does
OpenPromoter reads six Chargebee webhook events. One links the customer, one books the commission, one handles refunds and three follow the subscription status. Chargebee selects All Events by default on a new webhook and OpenPromoter ignores the events it does not use.
| Event | What OpenPromoter does |
|---|---|
| customer_created | Links the customer to a partner from meta_data or cf_op_click |
| payment_succeeded | Books the commission on the invoice subtotal minus discounts |
| payment_refunded | Reduces or reverses the commission on the original payment |
| subscription_created | Tracks the subscription and its status |
| subscription_changed | Updates the status and MRR |
| subscription_cancelled | Stops recurring commissions |
The billing providers docs list the URL and events with copy-ready values.
How Chargebee refunds and renewals change commissions
A refund is matched to the original payment through its reference transaction. A partial refund reduces the commission in proportion and a full refund reverses it. Each renewal arrives as its own payment_succeeded event and books a commission while it falls inside the window.
Refunds
A refund after payout becomes a clawback on the partner's next payout.
Set the hold period to at least your refund window. The default is 30 days.
Disputes
OpenPromoter reads no Chargebee dispute event today. Keep the hold period long enough to cover chargebacks. You can hold any commission by hand.
Trials and cancellations
A subscription in trial shows as trialing and earns nothing until a payment succeeds. subscription_cancelled stops recurring commissions.
Chargebee sends the subscription's MRR with each subscription event. OpenPromoter stores it on the referral and partners see the value they brought in.
Test on a Chargebee test site
A Chargebee test site is a sandbox with its own data and a test gateway that simulates success and failure. Turn on Sandbox when you connect the test site. OpenPromoter then tags its sales and commissions as Test.
Click Test Webhook on the webhook to send a sample event. Source: Chargebee test sites (November 2026).
When the test passes, click Delete test data. Then connect your live site with Sandbox off.
Common Chargebee affiliate setup mistakes
Most Chargebee setup problems come from a click id written after the first payment or credentials that do not match. Coupon codes that differ from the Chargebee coupon id are the other common cause. Each mistake below comes with its fix.
Click id written too late
Write op_click before the first payment. A payment without it is not credited by click.
Credentials that differ
The user:password in OpenPromoter must match Chargebee exactly.
A coupon name for the code
OpenPromoter reads the coupon id. Enter the id on the partner's page.
An idle test webhook
Chargebee turns off unused test site webhooks after an email warning.
A short hold period
Set the hold period to at least your refund window. The default is 30 days.
Pay Chargebee affiliates and handle tax
Chargebee bills your customers and OpenPromoter pays your partners. Partners choose Stripe Connect, PayPal, Wise or manual payment in their portal and you approve each batch before it goes out. Each rail charges its own fee and OpenPromoter takes 0% of payouts on every plan.
Stripe Connect needs a Stripe account of your own as the platform. PayPal and Wise payouts need no Stripe account. The payouts page compares the rails.
Partners paid by PayPal, Wise or by hand submit a W-9 or a W-8BEN in the portal. EU VAT ids are checked against the VIES service. Every payout gets a self-billed invoice with a sequential number.
US partners need a W-9 before their payouts for the year pass the 1099-NEC threshold. That threshold is $2,000 for payments made in 2026. The 1099 guide for affiliates covers the filing.
Questions
How does OpenPromoter verify Chargebee webhooks?
Where should the click id go?
What amount is the commission based on?
Do Chargebee renewals earn recurring commissions?
Is this the Chargebee partner program?
Can I self-host OpenPromoter for Chargebee?
Related

[ openpromoter ]
Try it with your own Stripe account
Free on Cloud up to $1k a month in partner revenue or free forever on your own server.