Subscription purchases of the Customer.

interface SubscriptionInfo {
    billingIssuesDetectedAt: null | Date;
    expiresDate: null | Date;
    gracePeriodExpiresDate: null | Date;
    isActive: boolean;
    isSandbox: boolean;
    originalPurchaseDate: null | Date;
    ownershipType: OwnershipType;
    periodType: PeriodType;
    productIdentifier: string;
    purchaseDate: Date;
    refundedAt: null | Date;
    store: Store;
    storeTransactionId: null | string;
    unsubscribeDetectedAt: null | Date;
    willRenew: boolean;
}

Properties

billingIssuesDetectedAt: null | Date

Date when RevenueCat detected any billing issues with this subscription. If and when the billing issue gets resolved, this field is set to null. Note the subscription may still be active, check the SubscriptionInfo.expiresDate attribute.

expiresDate: null | Date

Date when the subscription expires/expired

gracePeriodExpiresDate: null | Date

Date when any grace period for this subscription expires/expired. null if the customer has never been in a grace period.

isActive: boolean

Whether the subscription is currently active (at the time this object was obtained).

isSandbox: boolean

Whether or not the purchase was made in sandbox mode.

originalPurchaseDate: null | Date

Date when this subscription first started. This property does not update with renewals. This property also does not update for product changes within a subscription group or re-subscriptions by lapsed subscribers.

ownershipType: OwnershipType

How the Customer received access to this subscription:

  • "PURCHASED": The customer bought the subscription.
  • "FAMILY_SHARED": The customer has access to the product via their family.
periodType: PeriodType

Type of the current subscription period:

  • "normal": The product is in a normal period (default)
  • "trial": The product is in a free trial period
  • "intro": The product is in an introductory pricing period
  • "prepaid": The product is in a prepaid pricing period
productIdentifier: string

The product identifier.

purchaseDate: Date

Date when the last subscription period started.

refundedAt: null | Date

Date when RevenueCat detected a refund of this subscription.

store: Store

Store where the subscription was purchased.

storeTransactionId: null | string

The transaction id in the store of the subscription.

unsubscribeDetectedAt: null | Date

Date when RevenueCat detected that auto-renewal was turned off for this subscription. Note the subscription may still be active, check the SubscriptionInfo.expiresDate attribute.

willRenew: boolean

Whether the subscription will renew at the next billing period.