Skip to content

EntitlementsFeature

Source: src/Stripe/EntitlementsFeature.ts

A Stripe Entitlements Feature — a monetizable ability you attach to Products. When a customer purchases a product with this feature, Stripe creates an entitlement for them. lookup_key is unique among active features and immutable (changing it replaces the feature). Name and metadata update in place.

Stripe does not hard-delete features; destroying this resource deactivates it (active: false). Archived features cannot be edited or unarchived. An archived lookup key can be reused — a later create with the same key provisions a new feature.

Generated lookup key

const seats = yield* Stripe.EntitlementsFeature("seats");

Named feature with lookup key

const seats = yield* Stripe.EntitlementsFeature("seats", {
lookupKey: "seats",
name: "Seat licenses",
});
const seats = yield* Stripe.EntitlementsFeature("seats", {
lookupKey: "seats",
name: "Seat licenses (updated)",
metadata: { plan: "pro" },
});
// stack.destroy() / resource removal sets active: false
const seats = yield* Stripe.EntitlementsFeature("seats", {
lookupKey: "seats",
name: "Seat licenses",
});