Superwall

SubscriptionTransaction

Represents a subscription transaction in the customer's purchase history.

Introduced in 4.10.0. offerType, subscriptionGroupId, and store were added in 4.11.0.

Purpose

Provides details about a single subscription transaction returned from CustomerInfo. Use this to understand renewal status, applied offers, and the store that fulfilled the purchase.

Properties

PropertyTypeDescription
transactionIdStringUnique identifier for the transaction.
productIdStringThe product identifier for the subscription.
purchaseDateDateWhen the App Store charged the account.
willRenewBoolWhether the subscription is set to auto-renew.
isRevokedBooltrue if the transaction has been revoked.
isInGracePeriodBooltrue if the subscription is in grace period.
isInBillingRetryPeriodBooltrue if the subscription is in billing retry.
isActiveBooltrue when the subscription is currently active.
expirationDateDate?Expiration date, if applicable.
offerTypeLatestSubscription.OfferType?Offer applied to this transaction (4.11.0+).
subscriptionGroupIdString?Subscription group identifier if available (4.11.0+).
storeProductStoreStore that fulfilled the purchase (4.11.0+).

Offer types (4.11.0+)

  • trial — introductory offer.
  • code — offer redeemed with a promo code.
  • promotional — StoreKit promotional offer.
  • winback — win-back offer (iOS 17.2+ only).

Store values (4.11.0+)

appStore, stripe, paddle, playStore, superwall, other.

Usage

Inspect subscription transactions:

let customerInfo = Superwall.shared.customerInfo

for subscription in customerInfo.subscriptions {
  print("Product: \(subscription.productId)")
  print("Store: \(subscription.store)")
  print("Offer: \(subscription.offerType?.rawValue ?? "none")")
  print("Group: \(subscription.subscriptionGroupId ?? "unknown")")
  print("Expires: \(String(describing: subscription.expirationDate))")
}

How is this guide?

Edit on GitHub