Introducing the Chargebee CLI

Setting up your own Referral Program

You might want to set up a referral program of your own, where you reward your subscribers with credits if they refer their friends. You can do this with the APIs:

  1. When a customer signs up, Chargebee notifies you with the "subscription_created" webhook.

  2. Create a coupon code for that customer with the Create a coupon API.

  3. The coupon code can be Customer A's Chargebee customer ID. Chargebee can generate that ID when the subscription is created, or you can specify the ID when you create the subscription.

  4. Email the coupon code to Customer A so they can share it with friends.

  5. Customer A shares the coupon code with a friend (Customer B). When Customer B signs up, they enter the coupon code and get a discount.

  6. When the subscription is created for Customer B, another "subscription_created" webhook is triggered. This webhook includes the coupon code Customer B used.

  7. From the coupon code, identify the referrer and use the Add promotional credits to a customer API to add these credits to Customer A's account. The credits apply to future renewals.

Note: Chargebee also has integrations with Refersion and LeadDyno for referral marketing on Product Catalog 1.0 sites.