Chargebee Billing Integration

Brightback's native integration with Chargebee makes it easy for you to retain subscribers and revenue by reducing voluntary churn. By connecting Brightback to Chargebee, you can:

  • Pull subscription data from Chargebee into Brightback to enrich the profile of your customer for using in targeting custom audiences, personalizing the cancel experience, and segmenting data records to build richer save and churn reports
  • Process cancels and offers directly to billing, either using Brightback Webhooks, pass-thru URLs, or by posting changes directly to the subscription via the Brightback Integration (currently in Beta) 

Connecting Brightback to Chargebee

In order for the Chargebee integration to work, you must first connect your Chargebee account to Brightback via our integrations page. You will want to pick a read/write API key if you plan to utilize the Manage Cancel feature to update subscriptions. You will also need to ensure you pass the Chargebee Subscription ID for that subscription via the Brightback JS. 

This ChargeBee Subscription ID is captured dynamically from the brightback.js code snippet (or from your Salesforce CRM account) when the user first initiates a session by clicking to cancel. If you haven't already, review the documentation on how to install the brightback javascript snippet

Enriching your subscription profile  

Once Chargebee is connected, you can leverage Brightback's enrichment feature to reduce the engineering time and effort needed to install the Brightback.js snippet. With the integration enabled, Brightback will use the Chargebee Subscription ID to lookup and key subscriber data in Chargebee (such as first purchase date or billing frequency), and sync it back into Brightback to map to Brightback fields using Field Mappings located under 'Settings' (read below).  

Syncing and mapping Chargebee fields into Brightback

Before you can successfully map Chargebee data into Brightback, you must first ensure that you are capturing the Chargebee sub id via the Brightback.js, and have mapped this field to the Subscription ID in the field mappings page. 

Once successfully connected to Chargebee, navigate to 'Field mappings' under Settings, to start mapping. For each Brightback field that you will map to, you must first specify the field data type (e.g. text, date, decimal, email, URL), then select the source field in Chargebee, visible under the Chargebee source in the menu dropdown. 

Go ahead and map as many fields as you would like. Mapped fields can be used to personalize the cancel page, target the cancel experience/offers, and in reporting via the customer's page. 

Example Chargebee payload

"integration_type" : "BILLING",
  "data_type" : "CHARGEBEE",
  "display_name" : "Chargebee",
  "objects" : [ {
    "requires_external_id" : false,
    "fields" : [ {
      "name" : "subscription.id",
      "label" : "Subscription Id",
      "type" : "text",
      "maps_to_type" : [ "text" ]
    }, {
      "name" : "subscription.created_at",
      "label" : "Subscription Create Date",
      "type" : "date",
      "maps_to_type" : [ "date" ]
    }, {
      "name" : "subscription.activated_at",
      "label" : "Subscription Activation Date",
      "type" : "date",
      "maps_to_type" : [ "date" ]
    }, {
      "name" : "subscription.billing_period",
      "label" : "Billing Period",
      "type" : "integer",
      "maps_to_type" : [ "integer" ]
    }, {
      "name" : "subscription.billing_period_unit",
      "label" : "Billing Period Unit",
      "type" : "text",
      "maps_to_type" : [ "text" ]
    }, {
      "name" : "subscription.started_at",
      "label" : "Subscription Start Date",
      "type" : "date",
      "maps_to_type" : [ "date" ]
    }, {
      "name" : "subscription.mrr",
      "label" : "Subscription MRR",
      "type" : "decimal",
      "maps_to_type" : [ "decimal" ]
    }, {
      "name" : "subscription.customer.id",
      "label" : "Customer Id",
      "type" : "text",
      "maps_to_type" : [ "text" ]
    }, {
      "name" : "subscription.customer.first_name",
      "label" : "Customer First Name",
      "type" : "text",
      "maps_to_type" : [ "text" ]
    }, {
      "name" : "subscription.customer.last_name",
      "label" : "Customer Last Name",
      "type" : "text",
      "maps_to_type" : [ "text" ]
    }, {
      "name" : "subscription.customer.company_name",
      "label" : "Customer Company Name",
      "type" : "text",
      "maps_to_type" : [ "text" ]
    }, {
      "name" : "subscription.customer.email",
      "label" : "Customer Email",
      "type" : "text",
      "maps_to_type" : [ "text" ]
    }, {
      "name" : "subscription.customer.created_at",
      "label" : "Customer Create Date",
      "type" : "date",
      "maps_to_type" : [ "date" ]
    }, {
      "name" : "subscription.plan_id",
      "label" : "Plan Id",
      "type" : "text",
      "maps_to_type" : [ "text" ]
    }, {
      "name" : "subscription.plan_amount",
      "label" : "Plan Amount",
      "type" : "decimal",
      "maps_to_type" : [ "decimal" ]
    }, {
      "name" : "subscription.plan_quantity",
      "label" : "Plan Quantity",
      "type" : "text",
      "maps_to_type" : [ "text" ]
    }, {
      "name" : "subscription.plan_unit_price",
      "label" : "Plan Unit Price",
      "type" : "integer",
      "maps_to_type" : [ "integer" ]
    } ]
  } ]
}<br>

Missing a field? Please contact support@brightback.com and we'll look into adding it. 

Processing Cancels and Saves in Chargebee

The Brightback cancel flow works with Chargebee in a number of ways, including enriching the subscriber data record in Brightback, validating and attributing revenue for saves or cancels, and directly or indirectly applying subscription changes against the Chargebee Subscription ID. This section deals with how to process cancels and saves in Chargebee, when triggered by cancel/save events in Brightback, as clarified in the scenario below.

The cancel user flow (below) starts when the subscriber clicks "cancel" in your site or app. This loads the brightback.js snippet, generates a new session in Brightback, and returns the cancel page URL that the user will be redirected to (Brightback can test and evolve multiple versions of the cancel page experience). The snippet also captures the subscriber data included in the payload.

The cancel session has three potential outcomes: 1) subscriber cancels, 2) subscriber actively deflects from cancelling by accepting an offer, 3) subscriber passively deflects by closing their browser tab, bouncing, or clicking 'nevermind' on the Brightback page experience. 

In the first two scenarios above, the cancel or offer accept events trigger real-time billing changes that process the cancels and offers in Chargebee. These triggers can be implemented using one of the following approaches: 

  • Brightback Webhooks - when a customer cancels or accepts an offer (e.g. 1 free month, pause, etc.), then Brightback's Webhook event URL triggers an action in Chargebee. Note: you would need to have already set up a Coupon in Chargebee, then the Brightback webhook will apply the coupon to the actual customer. 
  • Pass Thru URLs -  when a customer cancels or accepts an offer (e.g. 1 free month) then Brightback calls a URL, that can trigger an in-biling action (e.g. https://netflix.com/free-month?customer_id=12345&interval=1).
  • Direct management (currently in Beta): when a customer cancels or accepts an offer, Brightback directly posts changes to the Chargebee subscription, including canceling the subscription in response to a validated cancel request, or modifying the subscription-based on conditions defined in the accepted offer (e.g. a discount, pause, etc). Direct management of Chargebee subs using the Brightback app reduces engineering effort to install Brightback, and to evolve future offers. Right now we support Cancel Management via Chargebee and will be releasing Offer Management soon. To request access to our Beta, contact support@brightback.com and we will get you set up. 

Passive deflects (scenario 3, above) do not need any subscription modifications in Chargebee, and the canceler is redirected back to a returning URL specified in the Brightback.js snippet ('save_return_url').

Need a Brightback developer sandbox for testing the integration with a Chargebee dev account? Please contact support@brightback.com or your account manager, who can promptly set up your developer account.  

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us