SubscriptionStatusIOS
SubscriptionStatusIOS#
Subscription status from StoreKit 2. Use subscriptionStatusIOS(sku) to get detailed subscription state.
iOS only. A trimmed projection of Apple's Product.SubscriptionInfo.Status — the OpenIAP wrapper exposes renewalInfo and state only; transaction from the Apple type is not surfaced (Apple docs).
Native reference: Apple · Product.SubscriptionInfo.RenewalState
| Name | Summary |
|---|---|
state | Current renewal state (see values below) |
renewalInfo | Renewal details. Contains: willAutoRenew, autoRenewPreference |
Subscription State Values#
The state field indicates the current subscription status:
| State | Description | User Access |
|---|---|---|
subscribed | Active subscription | Grant access |
expired | Subscription has expired | Deny access |
revoked | Refunded by Apple | Deny access |
inGracePeriod | Billing failed but grace period active | Grant access (temporary) |
inBillingRetryPeriod | Billing retry in progress | Consider granting access |
iOS Expiration Reasons#
When willAutoRenew is false, the expirationReason field in renewalInfo indicates why:
| Reason | Description |
|---|---|
VOLUNTARY | User cancelled the subscription |
BILLING_ERROR | Payment failed (card declined, etc.) |
DID_NOT_AGREE_TO_PRICE_INCREASE | User declined a price increase |
PRODUCT_NOT_AVAILABLE | Product no longer available for purchase |
UNKNOWN | Unknown reason |