SubscriptionTransaction
Represents a subscription transaction in the customer's purchase history.
The offerType, subscriptionGroupId, and store fields were added in 2.4.7.
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 (2.4.7+)
trial- introductory offer.code- offer redeemed with a promo code.promotional- promotional offer.winback- win-back offer (iOS 17.2+ only).
Store values (2.4.7+)
appStore, stripe, paddle, playStore, superwall, other.
Usage
Inspect subscription transactions:
final customerInfo = await Superwall.shared.getCustomerInfo();
for (final subscription in customerInfo.subscriptions) {
print('Product: ${subscription.productId}');
print('Active: ${subscription.isActive}');
print('Store: ${subscription.store}');
print('Offer: ${subscription.offerType}');
print('Group: ${subscription.subscriptionGroupId ?? "unknown"}');
}Related
CustomerInfo- Source of subscription dataNonSubscriptionTransaction- Non-subscription transactionsgetCustomerInfo()- Fetch customer info
How is this guide?
Edit on GitHub