Feature entitlements
Grant app capabilities through Products.
Features describe what customers can do in your app: export a file, create an image, or use your premium tools. Product Grants define which Features a purchase includes; Entitlements give the customer that access.
Define a Feature once, then include it in as many Products as you need. Your monthly, annual, and lifetime plans can all unlock the same premium Feature. Your app makes one access check, even as your catalog grows.
Features
Each Feature has a name for your team and a stable key for your app. Features belong to an app and environment; their platform availability determines which app platforms can use them.
Feature types
Choose the type that matches what you offer:
| Type | What the customer gets |
|---|---|
| Boolean | Access that’s on or off, such as premium tools. |
| Metered | An allowance for one capability, such as 100 exports. |
| Credit system | A balance several actions can spend, such as creative credits. |
Create a Feature
Name the capability
Open Features and choose Create Feature. Give it a Feature name and check the suggested Feature key. The key accepts letters, numbers, and dashes.
Choose its type
Choose Access (on or off) or Metered usage, then select Create Feature to save.
You create credit systems under Credits. Once a Feature exists, its Overview shows its type and platform availability. Products shows which Products include it.
Metered Features and credits
Use a metered Feature when a capability needs its own allowance. For example, exports and generations can each have a separate limit.
Use credits when you want actions to share one balance. Your integration supplies the credit cost of each action and consumes the credit system’s key.
Feature keys
Keys are unique within an app and environment. Copy the key from the Feature details when adding a check to your app. The internal Feature ID and the store’s Product ID identify different things.
Reuse an existing Feature when another Product grants the same capability. That way, adding an annual plan doesn’t require changing the code that unlocks premium tools.
Delete a Feature
Choose Delete in the Features table. If an active Product Grant still uses the Feature, Nuxie asks you to remove that grant first. You can find those Products in the Feature’s Products tab.
Entitlements
An Entitlement is what a Product gives the customer. Nuxie combines their active grants when your app asks about a Feature.
Grant a Feature
Choose the Feature
Open a Product’s Entitlements tab and choose Grant Feature. Select the Feature to include.
Set the allowance
For a metered Feature or credit system, the dialog starts with Unlimited selected. Choose Fixed units and enter the allowance if the Product should include a set amount, such as 100 exports. The Feature’s type defines what you count; the Product Grant defines how much the customer receives.
Save the grant
Choose Grant Feature to save. Repeat for each Product that should grant the Feature.
The Product Grants table shows the included Features and allowances. To change a metered or credit allowance, open its edit action and choose Save Changes when you’re done.
Boolean grants
A Boolean grant turns the Feature on while that source of access is active. Your app reads allowed; there’s no numeric balance to manage.
Fixed grants
Choose Fixed units and enter a positive whole number in Units. An export pack might include 100 units. When a customer has several active fixed grants for the same Feature, those grants contribute to the available balance.
Your app consumes units when the customer uses the capability. Showing the balance or checking it doesn’t spend anything.
Unlimited grants
Choose Unlimited to include usage without a balance cap. While an unlimited grant is active, it takes precedence over fixed balances for that Feature.
Remove a grant
Use the remove action in the Product’s Entitlements tab and confirm. This removes the Feature from that Product’s grant definition.
Changing a Product Grant doesn’t directly change balances customers already hold. Those grants follow their purchase or subscription lifecycle. To handle a refund or cancellation, use the purchase integration rather than treating a catalog edit as a change to an individual customer.
Check access
Pass the Feature key to your SDK. For example, an iOS app can check Boolean access like this:
// nuxie-doc-fragment: monetization-boolean-access harness=async-body
// Boolean check
let access = try await NuxieSDK.shared.hasFeature("premium-export")
if access.allowed {
// Feature is unlocked
}
For a metered Feature, include the amount the customer needs:
// nuxie-doc-fragment: monetization-metered-access harness=async-body
// Metered check with required balance
let access = try await NuxieSDK.shared.hasFeature(
"api-calls",
requiredBalance: 1
)
if access.allowed {
// Sufficient balance remains
print("Balance: \(access.balance ?? 0)")
}
Replace the sample keys with your own. By default, the SDK uses fresh cached access and asks the server when it needs an update.
Product-independent access
Check premium-export, not the monthly Product’s identifier. A customer with an annual or lifetime Product can have the same access, and the Feature check includes those grants too.
Access and consumption
Boolean access is available when an active source grants it. Metered access is available when the customer has an unlimited grant or enough units for the requested amount.
For an action that spends units, wait for consumption before doing the work. On iOS, check success on the result of useFeatureAndWait(). An earlier balance check doesn’t reserve those units.
If your app may retry the action, save an operation ID and use the SDK’s consumption API. Repeating that operation returns its previous decision; a new ID is another usage request. Spending the last unit can succeed with zero left, so use the consumption result to allow that action.
Integration
Features and Entitlements (SDK) covers iOS checks and usage, and Feature gating shows an upgrade flow. Other platforms have the same concepts in their SDK references.
For direct HTTP calls, /entitled reads access and /feature/consume records usage. See the REST API for requests and results.