Feature entitlements
|

From Access to Assets: Understanding Entitlements in Membership Plans

Many businesses offer tiered membership plans, each with its unique set of features. This strategy allows businesses to distinguish themselves and stay competitive. These feature sets are typically referred to as entitlements. Meaning that customers are entitled to specific features included in their membership level. However, managing feature accessibility based on membership tiers can be challenging. In this article, we will explore two different platforms designed to make this process easier.

Table of Contents

Understanding the Problem

Let’s illustrate the problem of an in-house maintenance of features tied to plans. The first challenge is the complexity of the data model. Consider these common assumptions:

  • There are several membership plans, typically 3 – 5, or even more.
  • There is a set of features your online service or platform provides to its users.
  • A single plan typically has more than one feature.
  • A feature can be part of more than a single plan.
Associating plans with features typically results in an M:N relationship.

Many to many relationships require an additional binding table, which makes it slightly harder to run database queries. Imagine you needed to add extra rules. Could that be easily modelled?

Dealing with Complexity

Now consider additional factors that take the complexity to another level:

  • Durability: Certain features are available in trial mode. Once the trial expires, the customer must make a decision whether to upgrade or let go of the feature.
  • Overrides: There could be add-ons your customers are able to purchase separately from their membership plan. Add-ons might differ in usability and validity.
  • Exceptions: In order to prevent customer churn you sometimes want to grant access to certain features, even though the purchased plan doesn’t allow for it.
  • Experiments: It’s hard to get things right from the start. You might need to repackage your plans and move features around.

As you can see, memberships, or subscriptions if you will, and features are closely related. Yet, you don’t want them become too intertwined as that would complicate your admin process.

Today, we will look at two platforms that allow for a seamless management of your customers’ entitlements to accessing features.

Setting up the Scene

Let’s assume your product is an online service providing advanced logging – similar to solutions like Graylog or Logstash. There is a free tier, and two paid tiers for premium and enterprise customers. Each tier is entitled to certain features.

FeatureBasic PlanPremium PlanEnterprise Plan
Advanced filtering
API access
Premium support
AI assistant
Extended retention

Advanced log filtering is the only feature users can enjoy for free. Whereas API access or premium support are accessible to paid plans. Enterprise customers can further leverage an AI assistant and maintain a history of audit logs, thanks to an extended data retention.

Let’s see how we would manage feature entitlements based on the user’s subscription. We will look at three different platforms. Each of them has na opinionated take on the subject and provides unique benefits.

Our review starts with Stripe – a well established payment automation platform with rich support for flexible subscription models.

Managing Entitlements with Stripe

Step 1 – Add features to the Product Catalogue

Product Catalogue is a cornerstone of one-off sales as well as recurring payments. A product describes physical goods, an online service or virtually anything your business has to offer. Features are part of the product catalogue.

Adding a new feature is easy in Stripe. This can be done both in the Dashboard and programatically.

A feature has a lookup key which serves as a unique identifier. Use it in your business code to make sense of what the user is entitled to.

Step 2 – Define a webhook and subscribe to relevant events

This is strictly speaking not necessary, but if you want to be automatically notified of changes, then this is the way to go. In the example below, I have signed up for main subscription events and, more importantly, for the entitlements.active_entitlement_summary.updated event that carries information about past and present entitlements.

The “entitlements” event allows for an easy monitoring of what a particular customer is entitled to.

Step 3 – Create a subscription

As soon as your customer subscribes to one of the plans, you will receive an event that informs you about the customer’s entitlements. Let’s start with the Basic Plan that includes only one feature identified as advanced-filtering. Since the customer has no history of previous subscriptions, there are no past entitlements either. This is all clearly visible from the intercepted event.

{
  "object": {
    "object": "entitlements.active_entitlement_summary",
    "customer": "cus_R7OwrqJiIRmDWz",
    "entitlements": {
      "object": "list",
      "data": [
        {
          "id": "ent_test_61Raaeatx3sWwaFQ641GyWpmEflR86UC",
          "object": "entitlements.active_entitlement",
          "feature": "feat_test_61RaaPqs9dQuvLP9f41GyWpmEflR83hw",
          "livemode": false,
          "lookup_key": "advanced-filtering"
        }
      ],
      "has_more": false,
      "url": "/v1/customer/cus_R7OwrqJiIRmDWz/entitlements"
    },
    "livemode": false
  },
  "previous_attributes": {
    "entitlements": {
      "data": [
      ]
    }
  }
}

Step 4 – Watch for subscription upgrades via webhooks

Suppose the customer is super happy with our platform and chooses to upgrade to the Premium plan.

The intercepted event now not only provides a larger list of features the customer is entitled to thanks to the upgrade, but it also shows the status prior to the upgrade. This can be extremely useful in case you are curious about plan transitions and what features are users interested in.

In this case, we can see that the customer gained access to two new features: premium-support and api-access. Unfortunately, the event doesn’t reveal the current and the past subscription plan, but you can always correlate it with the corresponding subscription event.

{
  "object": {
    "object": "entitlements.active_entitlement_summary",
    "customer": "cus_R7OwrqJiIRmDWz",
    "entitlements": {
      "object": "list",
      "data": [
        {
          "id": "ent_test_61Rac3vnpQEGSH0Bv41GyWpmEflR89N2",
          "object": "entitlements.active_entitlement",
          "feature": "feat_test_61RaaPqs9dQuvLP9f41GyWpmEflR83hw",
          "livemode": false,
          "lookup_key": "advanced-reporting"
        },
        {
          "id": "ent_test_61Rac3vzeFaYcZYUE41GyWpmEflR89Ds",
          "object": "entitlements.active_entitlement",
          "feature": "feat_test_61RaaPdxiKcmj8Y8T41GyWpmEflR83Cq",
          "livemode": false,
          "lookup_key": "premium-support"
        },
        {
          "id": "ent_test_61Rac3vM8DzHdEwGk41GyWpmEflR81Sy",
          "object": "entitlements.active_entitlement",
          "feature": "feat_test_61RaaPGoj81qVap1v41GyWpmEflR84qu",
          "livemode": false,
          "lookup_key": "api-access"
        }
      ],
      "has_more": false,
      "url": "/v1/customer/cus_R7OwrqJiIRmDWz/entitlements"
    },
    "livemode": false
  },
  "previous_attributes": {
    "entitlements": {
      "data": [
        {
          "id": "ent_test_61Raaeatx3sWwaFQ641GyWpmEflR86UC",
          "object": "entitlements.active_entitlement",
          "feature": "feat_test_61RaaPqs9dQuvLP9f41GyWpmEflR83hw",
          "livemode": false,
          "lookup_key": "advanced-reporting"
        }
      ]
    }
  }
}

Final Thoughts and Limitations

I like Stripe for its flexibility and outstanding developer experience. Stripe smartly incorporated entitlements to its flagship product. Their approach is simple and pragmatic. However, there are a few limitations to be aware of.

First of all, once you create a feature, you cannot change the lookup key. This is typically not a problem. However, I made a mistake and now I have no choice but to delete the feature and start from scratch. This is a subtle nuisance, nothing much to complain about.

Once you create a feature, you can’t change the lookup key.

A bigger problem is that the webhook event informing about the current and past entitlements doesn’t necessarily list all entitlements. The event is limited to ten active entitlements! Bear that in mind. Ten features is not that many and if your offering expands beyond this limit, then you should stop relying solely on webhooks. There is an API endpoint that lists all active entitlements. It allows you to increase the default limit of returned entitlements.

On the bright side, Stripe is so vastly adopted that you can even use Terraform to provision your features and possibly other resources. Impressive.

Scoping Access to Features with Chargebee

Step 1 – Define your features

Chargebee adds an additional layer of flexibility. Not only can you enumerate your features, but you can also specify when do they kick in. A direct equivalent to Stripe would be a feature of type Switch, where the feature is either on or off. However, you can tune in a more refined setup with custom rules.

Chargebee caters for a highly customized feature configuration.

Nevertheless, it doesn’t end here.

Step 2 – Refine the features and define custom rules

Once you are done with the basic definition, you can choose which resource to assign the selected feature to. For example, you can associate a feature directly with one of the plan prices. Or, you can tie it to an add-on, which is another useful concept Chargebee supports out of the box. In our setup we want to assign it to a plan. When you are done configuring, activate the feature.

Adding a feature to a plan is just one out of several other options.

Step 3 – Create a subscription

Chargebee provides a detailed guide to subscriptions. There are many parameters you can tweak, and feature entitlements are one of them. You can, for example, initially skip including entitlements to the subscription. Once you do include them, there will an Entitlement override modified event with details about the entitlement.

Entitlements are monitored individually.

Step 4 – Forget webhooks!

While there are entitlement events you can subscribe to, I honestly struggled to receive them. For example, there is a subscription_entitlements_created event that lists up to a hundred features the subscriber is entitled to.

I am not proficient with the platform, and it is likely my fault that the events didn’t trigger. However, Chargbee themselves pursue a different approach in their tutorials. They recommend making API calls and then caching the received response.

Maintaining app cache and looping to Entitlements API is an intricate process. Source – Chargbee.

Check these two tutorials for in-depth advice and implementation details:

Final Thoughts

The platform stands out for its fine grained control that goes above and beyond of what you would typically expect. Offering unparalleled flexibility and customization comes at a cost of inreased complexity. Listening to webhook events is no longer sufficient to maintain a complete picture of your subscribers’ entitlements. Luckily, Chargebee provide detailed guidance with plenty of tutorials.

Summary

Granting access to features unique to your own service offering is a common use case. Today, we looked at two platforms that make billing easier and help you manage feature entitlements.

Stripe provides basic functionality that will suffice most of the time. You can rely on webhooks and API calls to fetch (and cache) relevant data.

Chargbee got you covered in case you need fine grained control over feature entitlements, along with a possibility to set detailed rules. The downside is increased complexity, but that is counterbalanced by tutorials providing detailed guidance.

Overall, the main point is the concept of feature entitlements has been well explored and there is no need to reinvent the wheel.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *