Suscripción
A Subscription links a user to a Plan, so you can control access to application features. Because each Plan is tied to a Role, you can assign the plan’s role to the user and use the enforce API for permission checks.
consejo
Use the Plan’s Role with the enforce API to check subscription-based access.
Subscriptions can be created:
- By an admin (manual)
- Through the pricing/purchase flow (any user)
- Vía API
Only users with type = "paid-user" are subject to subscription enforcement (active subscription required for access).

Propiedades de la suscripción
| Property | Descripción |
|---|---|
| Propietario | Owning organization. |
| Nombre | Subscription id. |
| Fecha de creación | Creation time. |
| Nombre para mostrar | Display name. |
| Description | Optional description. |
| Duration | Subscription duration. |
| StartTime | When the subscription starts. |
| EndTime | When the subscription ends. |
| Pricing | Related Pricing. |
| Plan | Related Plan. |
| Payment | Related Payment. |
| User | User who holds the subscription. |
| State | Pending, Error, Suspended, Active, Upcoming, or Expired. |
