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

# Entitlements

> Types of rewards returned when an offer is granted

Represents the types of entitlements that can be granted when a user accepts an offer. Each entitlement type includes optional value and unit fields for specificity.

## Definition

```swift theme={null}
public enum Entitlement {
  case freeTrial(value: Double? = nil, unit: EntitlementUnit? = nil)
  case discount(value: Double? = nil, unit: EntitlementUnit? = nil)
  case credit(value: Double? = nil, unit: EntitlementUnit? = nil)
}

public enum EntitlementUnit {
  case months
  case days
  case percent
  case dollars
}
```

<Warning>
  Entitlements may expire over time. Use [`isActive()`](./is-active) or [`isActivePublisher()`](./is-active-publisher) to check current status rather than storing the entitlement object.
</Warning>

## Entitlement Types

| Case         | Associated Values                          | Description                                                                    |
| ------------ | ------------------------------------------ | ------------------------------------------------------------------------------ |
| `.freeTrial` | `value: Double?`, `unit: EntitlementUnit?` | Time-limited free access to premium features. Common units: `.days`, `.months` |
| `.discount`  | `value: Double?`, `unit: EntitlementUnit?` | Percentage or dollar-based discount. Common units: `.percent`, `.dollars`      |
| `.credit`    | `value: Double?`, `unit: EntitlementUnit?` | Account credits applied to user's balance. Common unit: `.dollars`             |

## Entitlement Units

| Unit       | Description        | Typical Use                             |
| ---------- | ------------------ | --------------------------------------- |
| `.months`  | Duration in months | Free trials (e.g., "3 months free")     |
| `.days`    | Duration in days   | Free trials (e.g., "30 days free")      |
| `.percent` | Percentage value   | Discounts (e.g., "20% off")             |
| `.dollars` | Dollar amount      | Discounts or credits (e.g., "\$10 off") |

<Info>
  Entitlements are automatically tracked and synced across devices when you call [`identify()`](./identify).
</Info>
