Chargebee
Trigger referrals on new Chargebee charges or automatically apply Chargebee coupons or credits as rewards.
Last updated
Trigger referrals on new Chargebee charges or automatically apply Chargebee coupons or credits as rewards.
Last updated
Note: The Chargebee integration is only available to users on the GrowSurf Business plan or higher.
When you connect your Chargebee account to your GrowSurf campaign and enable Referral Trigger, GrowSurf will automatically detect and trigger referrals on new Chargebee charges.
GrowSurf will check if the Chargebee customer's email address matches a GrowSurf participant's email address. If a match is found, then a referral will trigger, giving referral credit to the referrer and unlocking any rewards, if applicable. If a referral has already been triggered (and referral credit already was awarded), then nothing else will happen because referral credit can only be awarded once.
Here's how to set up Chargebee referral triggers:
Important Note: Unless your campaign is configured to add participants automagically (see image), you'll need to make sure you first call JavaScript growsurf.addParticipant()
or REST API /POST Add Participant
to add new participants.
Step 1: In Campaign Editor > 4. Options > Integrations, open the Chargebee integration card and enter your Chargebee site, Chargebee API key, and Chargebee product catalog version for both live and test mode.
Step 2: Once connected, GrowSurf will have Referral Trigger enabled by default. Enter your webhook username and webhook password. Click here for instructions on how to configure webhooks.
Important Note: At a minimum, the following events should be selected for your Chargebee webhook:
Customer Changed
Payment Succeeded
Payment Refunded
Remember to toggle on "Exclude card information from webhook call"
(Optional) Step 3: You can add a referral trigger hold period by toggling the Show advanced settings section.
Note: The referral trigger hold period is useful for preventing fraud and helps minimizes losses due to refunds and chargebacks. During this hold period, if there is a refund or chargeback, the referral trigger will be cancelled completely.
GrowSurf will also update metadata for Chargebee customers who trigger referrals.
Metadata Key
Description
Example
GrowSurf Participant ID
The referred Chargebee customer's participant ID
xyz456
GrowSurf Participant Referred By URL
The URL of the participant who referred the Chargebee customer
https://growsurf.com/dashboard/campaign/abc123/participant/xyz456
GrowSurf Participant Referred By Email
The email address of the participant who referred the Chargebee customer
bob@loblaw.com
Our Chargebee integration comes with a test mode that allows you to test triggering referrals without using live payments. When you toggle Test Mode on, GrowSurf will also process all test mode payments made in your Chargebee account.
Important note: When you go live with your campaign, please make sure to switch back to live mode. Otherwise, referrals will not be triggered in live mode while test mode is enabled.
When testing out the Chargebee Referral Trigger integration, make sure to view participants' activity logs for details that can help you troubleshoot any issues.
If you were expecting a referral to be triggered in live mode, double-check that you do not have test mode enabled.
When a GrowSurf participant unlocks a reward, apply a coupon or credit to a Chargebee customer subscription.
Step 1: In Campaign Editor > 4. Options > Integrations, open the Chargebee integration card and enter your Chargebee site, Chargebee API key, and Chargebee product catalog version.
You must first select a default currency for your GrowSurf campaign in order to use Chargebee. Your default currency determines whether Chargebee coupons or credits can be applied to your Chargebee subscriptions. For example, if your default currency is USD then the coupon or credit that you set up can only be redeemed for Chargebee subscriptions that are using USD.
Step 2: Once connected, GrowSurf will have Referral Trigger enabled by default. You can disable it if you only want to automate rewards using Chargebee Coupons/Credits.
Step 3: Click the Coupons/Credits tab and connect a reward(s) to Chargebee by clicking the Connect a Reward button.
Note: When you connect to Chargebee, Referral Trigger will be enabled by default. If you are triggering referrals another way, disable the toggle in the Referral Trigger tab.
Click on either Coupon or Credit. If coupon is selected, enter the details of the coupon including the name, type, and discount. You can also click Show advanced coupon settings to view more customization settings.
Advanced feature tip: Issue different reward amounts by using dynamic rewards
Dynamic rewards let you offer different reward values based on specific attributes of the referred friend (such as the pricing plan they signed up for) or referrer (such as their partner status).
For example, you can award $50 in credits to winners when their referral signs up for your base plan or $100 in credits when they sign up for a higher-costing plan.
Note: By default, coupons are recommended. However, if you want rewards to be stackable (e.g, $10 off for every referred friend), you will want to use credits.
If credit is selected, enter the details of the credit including the description and credit amount, which is applied to the customer's promotional credits every time this reward is unlocked.
Then hit Save. Now, anytime this reward is unlocked by a winning participant, a Chargebee coupon or credit will also be applied to the Chargebee subscription associated with the GrowSurf participant email address.
With double-sided rewards, you have full flexibility in choosing who gets the coupon or credit reward: (1) just the referrer, (2) just the referred person, (3) or both referrer and referred person.
Once you save the reward, you should see a green dot, indicating that the Chargebee Coupons/Credits integration is enabled.
GrowSurf will pass metadata when a coupon or credit is applied to a Chargebee subscription.
Metadata Key
Description
Example
GrowSurf Participant ID
The GrowSurf participant that unlocked the Chargebee coupon
xyz456
GrowSurf Participant URL
The URL of the GrowSurf participant that unlocked the Chargebee coupon
https://growsurf.com/dashboard/campaign/abc123/participant/xyz456
GrowSurf Participant Referred By URL
The referred by URL of the GrowSurf participant that unlocked the Chargebee coupon
https://growsurf.com/dashboard/campaign/abc123/participant/xyz456/undefined
GrowSurf Participant Referred By Email
The email address of the participant's referrer
gavin.belson@hoolie.io
Our Chargebee integration comes with a test mode that allows you to test coupons/credits without using live coupons/credits. When you toggle Test Mode on, GrowSurf will apply coupons/credits only to your Chargebee account in test mode. It is important to note that Chargebee coupons/credits created in test mode will only apply to Chargebee subscriptions that exist within your Chargebee account when test mode is toggled on.
To enable test mode, toggle the Test Mode switch at the bottom-right, then connect a reward(s).
Please note that the rewards you connect while Test Mode is enabled are completely separate from the rewards you connect while in live mode.
Important note: When you go live with your campaign, please make sure to switch back to live mode. Otherwise, coupons/credits will not be issued in live mode while test mode is enabled.
If there is an issue with applying Chargebee coupons or credits, GrowSurf will send out a notification email to the campaign owner. The issue will also be stated in the participant's detail page when you view their reward or when you view the participant's activity logs.
Here are some common reasons why there may be failures:
The customer with the associated GrowSurf participant email address does not exist in Chargebee (please make sure to live or test mode depending on if you have toggled on Test Mode in the GrowSurf Chargebee integration)
If dynamic reward rules are enabled for the Chargebee reward, there may have been no matching rule found.
If you were expecting a coupon/credit to be applied in live mode, double-check that you do not have test mode enabled.
If there was a failure, you will need to manually issue the Chargebee reward from your Chargebee dashboard.
If you have manual reward approval enabled for your campaign: Chargebee coupons/credits will only be issued to the winner(s) only after you approve the reward.
If the referral was triggered recently (or if the reward was approved recently), please allow for a few minutes of server processing before viewing the participant's reward from your GrowSurf admin dashboard. During this time, the data displayed for the participant's reward may not be accurate.