Chargebee Code Snippet
  • 22 Oct 2020
  • 1 Minute To Read
  • Contributors
  • Print
  • Share
  • Dark
    Light

Chargebee Code Snippet

  • Print
  • Share
  • Dark
    Light

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.

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?