Check entitlements

Check whether a customer has access to a feature or read entitlement details such as usage values and limits.

After a customer logs in, purchases a product, starts a trial, receives a free plan, or gets an add-on, your app can check entitlements through the Revenipe SDK.

Entitlements are the access layer of Revenipe. Your app should use them to decide which features a customer can access and which usage values should be shown

Before you start

Before checking entitlements, make sure you have:

  • configured the Revenipe SDK

  • logged in a customer

  • created a product in the Revenipe dashboard

  • attached entitlements to the product

  • refreshed the customer state after a purchase or provider-side change

What is an entitlement?

An entitlement defines what a customer can access or consume inside your app.

Products grant entitlements. Your app checks those entitlements to decide whether a feature should be available.

  • premium access

  • support access

  • advanced exports

  • monthly credits

  • one-time credit packs

  • higher usage limits

Check simple access

Use hasEntitlement when you only need to know whether the customer has access to a feature.

Example
final hasPremium = Revenipe.instance.hasEntitlement('premium_access');

This returns a boolean value that you can use in your UI or feature logic.

Example
if (Revenipe.instance.hasEntitlement('premium_access')) { // Show premium feature } else { // Show upgrade prompt }

Get entitlement details

Use getEntitlement when you need to read more information about an entitlement.

Example
final entitlement = Revenipe.instance.getEntitlement('monthly_credits');

This is useful when you want to display entitlement-specific data such as remaining usage, limits, renewal-based values, or other access information in your app.

Use stable entitlement identifiers

The entitlement ID should match the identifier configured in the Revenipe dashboard.

Use stable identifiers because your app depends on them to unlock features and display usage values.

premium_access
monthly_credits
support_access
advanced_exports

Refresh before checking access

After a purchase, trial, checkout flow, Payment Sheet flow, add-on purchase, or provider-side purchase is completed, refresh the customer state before checking access.

Example
await Revenipe.instance.login('customer_123'); final hasPremium = Revenipe.instance.hasEntitlement('premium_access');

This ensures your app checks the latest customer access state returned by Revenipe.

Common use cases

Use case

Entitlement example

Unlock premium features

premium_access

Show monthly credits

monthly_credits

Unlock support access

support_access

Unlock advanced exports

advanced_exports

Important

Do not unlock access only because a checkout page, Payment Sheet, or provider purchase screen was opened.

Always refresh the customer state and check entitlements after the payment, trial, add-on, or provider state was confirmed.

Use hasEntitlement for simple access checks and getEntitlement when you need entitlement details such as usage values, limits, or other entitlement-specific data.

Your app should use Revenipe entitlements as the access layer instead of checking Stripe or RevenueCat state directly in the client app.

Next steps

After checking entitlements, use usage tracking for features that consume credits, limits, or other measurable values.