Docs

Configuring Offer Management without a Billing Integration 

If you do not use one of Chargebee Retention's supported Billing Integrations (Stripe, Recurly, or Chargebee) to manage your offers, we have a few options for you. You can choose one of the following to help manage your offers.

Processing offers via dynamic URL redirect 

The most common way our customers choose to process offers is by using a static URL placed in Chargebee Retention offer editor, or by passing a dynamic URL along in the precancel request that defines your canceller's profile. Chargebee Retention has a pre-defined key that you can use to send a URL that can be placed in experiences. That key is the save_return_url. Typically our customers will use the save_return_url to return customers back to their subscription settings. Our standard field mapping will allow the dynamic URL to be used in cancel sessions when placed as the URL redirect option for your modal or button. Note if you are unfamiliar with how Chargebee Retention precancel requests work, check out our brief tutorial, Installing Chargebee Retention.js.

Note

We've already placed the save_return_url as the nevermind buttons and back buttons in confirmation modals. Using the above expression can apply a unique URL for your canceller to follow that will come across to your endpoint as a GET request. When the user clicks Nevermind they will be redirected to the endpoint you have defined in the precancel request. In this way, you can dynamically append query parameters to your endpoint and trigger follow-up actions in your billing or other systems.

Dynamic URL example 

Note

In this example, INTERNAL_USER_ID, represents the dynamic variable to be passed along with each precancel request you can pass as many query parameters as are necessary to process your internal automation.

"save_return_url" : "https://www.example.com/save?id=INTERNAL_USER_ID"

If desired, a combination of dynamic elements passed through the snippet and static query parameters can be formed in the Chargebee Retention offer editor to provide more flexibility for your Admins. In the following example we'll pass a base URL for applying a promo code to a subscription with a dynamic internal id and static promo code that can easily be updated at any time.

"promo_code_url" : "https://www.example.com/promo?id=INTERNAL_USER_ID&promo_code="

You can see that the base URL above does not include the promo code to be applied. We'll do that inside of the Chargebee Retention offer editor.

Note

The dymanic URL will be checked for invalid characters when an attempt to save it is made.

The resulting URL will be fully formed when your canceller accepts the offer and a query parameter of promo_code=BB10 will be attached to the URL. If your user's id was 123 for instance. The end result would look like the following.

Example

https://www.example.com/promo?id=123&promo_code=BB10

Processing offers via webhook 

Using Chargebee Retention's webhook notification system is a powerful way to process offers. In order to utilize our webhook notifications, you'll first need to create an endpoint that can accept POST requests. If you are considering this option and want to take a deeper look into how to authenticate and read the request body for offers, please take a look at our help article, Using Webhooks.

Requests will all come call from Chargebee Retention's block of static IP's that you can whitelist for your app in order to receive requests. The body of the POST request comes in standard JSON format with a number of keys you can use to trigger follow-up automation and processing, first and most notable is the notification type. In this case, it will be, offer.

{
  "data": {
    "type": "offer"
  }
}

The POST request will also include responses from the Survey which are the canceller's Reason for leaving, Likelihood to return, Competition, and free form feedback text from the Additional Comments box if they were filled out at the time the user accepted the offer.

Note

The offer key holds the information you can use to trigger your follow-up automation. We'll include a unique name created when the offer was created which is immutable, the display name from the offer editor and the immutable name key which is generated when the offer is created.

{
  "data": {
    "offer": {
      "name": "100_dollar_discount.1694114780",
      "display_name": "100 dollar discount",
      "type": "Discount",
      "category": "$"
    }
  }
}

HTTP response codes 

By default we consider responses in the 200's to be a success. In the event you receive an event and do not wish to process it, please respond with a response code in the 200 level so as not to trigger our retry logic even if no downstream processing is necessary.

Additionally, the fields key will contain all of the profile information sent to us at the time of the precancel request.

{
  "data": {
  "fields": {
      "cancel.app_id": "bAJDE0xo5E",
      "cancel.first_name": "Jane",
      "cancel.account.created_at": "1622050643",
      "cancel.account.plan_term": "monthly",
      "cancel.account.value": "1234",
      "cancel.save_return_url": "http://chargebee.com?save_return_url",
      "cancel.last_name": "Bee",
      "cancel.account.company_name": "Chargebee",
      "cancel.custom.test": "value",
      "cancel.account.plan": "Premium",
      "cancel.email": "jane@chargebee.com",
      "cancel.account.billing_id": "",
      "cancel.context.url": "about:srcdoc",
      "cancel.timestamp": "2021-05-26T17:38:43.361Z",
      "cancel.account.internal_id": "b5a01a2",
      "cancel.subscription_id": "1234",
    }
  }
}

Processing offers via email 

Using Chargebee Retention's email notification system is another option for you if you intend to have agents processing offers manually in your billing system or if you would like to trigger follow-up workflows in your helpdesk.

Note

All Chargebee Retention notification emails come from bot@prod.brightback.com. Ensure that you have whitelisted that email address in your helpdesk.

You will want to turn on the Offer event notification and add an email address to which all offer accept emails should go. Head over to Settings > Alerts and edit the Accept Offer alert.

Activate the alert and edit the content of the email notification. You can include dynamically mapped expressions, such as name, email, and internal_id, as well as unique Survey responses (if they were filled out at the time the offer was accepted. As always if you have any questions please feel free to reach out to us at retention-support@chargebee.com if you have any questions!

Was this article helpful?
Loading…