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

Prop

Type

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