NonSubscriptionTransaction
Represents a non-subscription transaction (consumables and non-consumables).
Introduced in 4.10.0. The store property was added in 4.11.0.
Purpose
Provides details about one-time purchases in CustomerInfo, including which store fulfilled the purchase.
Properties
| Property | Type | Description |
|---|---|---|
transactionId | String | Unique identifier for the transaction. |
productId | String | Product identifier for the purchase. |
purchaseDate | Date | When the charge occurred. |
isConsumable | Bool | true for consumables, false for non-consumables. |
isRevoked | Bool | true if the transaction has been revoked. |
store | ProductStore | Store that fulfilled the purchase (4.11.0+). |
Store values (4.11.0+)
appStore, stripe, paddle, playStore, superwall, other.
Usage
Inspect non-subscription purchases:
let customerInfo = Superwall.shared.customerInfo
for purchase in customerInfo.nonSubscriptions {
print("Product: \(purchase.productId)")
print("Store: \(purchase.store)")
print("Consumable: \(purchase.isConsumable)")
print("Revoked: \(purchase.isRevoked)")
}Related
CustomerInfo- Source of transaction dataSubscriptionTransaction- Subscription transactionsgetCustomerInfo()- Fetch customer info asynchronously
How is this guide?
Edit on GitHub