> ## Documentation Index
> Fetch the complete documentation index at: https://docs.playtolia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PlaytoliaSubscriptions

> Recurring subscription state management

### Methods

| Method                              | Parameters | Returns                    | Notes                     |
| ----------------------------------- | ---------- | -------------------------- | ------------------------- |
| `GetSubscriptions()`                | —          | `List<PlayerSubscription>` | All (active + expired)    |
| `GetActiveSubscriptions()`          | —          | `List<PlayerSubscription>` | Active only               |
| `GetSubscriptionById(id)`           | `string`   | `PlayerSubscription?`      |                           |
| `GetSubscriptionByItemId(itemId)`   | `string`   | `PlayerSubscription?`      | Most recent for that item |
| `GetSubscriptionByItemSku(sku)`     | `string`   | `PlayerSubscription?`      |                           |
| `GetSubscriptionsByType(type)`      | `string`   | `List<PlayerSubscription>` |                           |
| `HasActiveSubscription()`           | —          | `bool`                     | Any active subscription   |
| `HasActiveSubscriptionOfType(type)` | `string`   | `bool`                     |                           |
| `Refresh()`                         | —          | `void`                     |                           |
| `AddListener(listener)`             | `Action`   | `void`                     |                           |
| `RemoveListener(listener)`          | `Action`   | `void`                     |                           |

### PlayerSubscription

| Field       | Type        | Notes                                          |
| ----------- | ----------- | ---------------------------------------------- |
| `Id`        | `string`    |                                                |
| `Status`    | `string`    | `subscribed`, `active`, `expired`, `cancelled` |
| `AutoRenew` | `bool`      |                                                |
| `StartsAt`  | `string`    |                                                |
| `ExpiresAt` | `string`    |                                                |
| `CreatedAt` | `string`    |                                                |
| `StoreItem` | `StoreItem` |                                                |
| `IsActive`  | `bool`      |                                                |
| `IsExpired` | `bool`      |                                                |
