Chargebee Code Snippet
  • 15 Jan 2021
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Chargebee Code Snippet

  • Dark
    Light
  • PDF

Article summary

Installing the RetentionEngine Code Snippet

The final step to integrating the RetentionEngine with a Chargebee based app is to copy and paste the RetentionEngine code snippet into your site.

Important Note about Chargebee
The RetentionEngine API call is set to cancel subscriptions at the end of the period. If this does not match your system preferences, please contact us. 

Step 1: Locating the Code Snippet

You can find the Code Snippet in the RetentionEngine dashboard under the "Settings" tab. You have the option to either install either the Default Experience or the Embed Experience (available on Premium or as an add-on) to your site.

Once you've copied the Code Snippet you'll be using, you'll be able to paste it into your application using the next set of instructions.



The link in the href  attribute redirects to your Retention Engine. This is the link that should be added to the "Cancel" button in your application. Note that when you add this link to your "Cancel" button, you should replace SUBSCRIPTION-ID  with your client's subscription id. 

Once this is done, whenever your client clicks on the "Cancel" button, they will be redirected to your Retention Engine, and depending on what they select during their cancellation experience, we'll use your Chargebee API credentials to edit their subscription accordingly. 

At the end of the experience, your client will be redirected to the link you had specified as "Your Website URL" (which can be found under the "Settings" tab as well). 



Was this article helpful?

What's Next