bundleOriginalTransactionID
TypeScriptget bundleOriginalTransactionID(): (string) | nullSwift declaration@backDeployed(before: iOS 27.0, macOS 27.0, tvOS 27.0, watchOS 27.0, visionOS 27.0)
var bundleOriginalTransactionID: String? { get }struct · iOS 15.0+ · SDK 27.1
struct TransactionRepresents signed transaction information for a purchase.
get bundleOriginalTransactionID(): (string) | nullSwift declaration@backDeployed(before: iOS 27.0, macOS 27.0, tvOS 27.0, watchOS 27.0, visionOS 27.0)
var bundleOriginalTransactionID: String? { get }get previousOriginalTransactionID(): (number) | nullSwift declaration@backDeployed(before: iOS 27.0, macOS 27.0, tvOS 27.0, watchOS 27.0, visionOS 27.0)
var previousOriginalTransactionID: UInt64? { get }The original transaction ID of the subscription this one replaced when a customer switched between a standalone auto-renewable subscription and a subscription bundle (in either direction). For a bundle transaction, this is the standalone subscription's original transaction ID, while for a standalone transaction, this is the bundle's original transaction ID. This field is `nil` if no such switch occurred.
get appTransactionID(): stringSwift declaration@backDeployed(before: iOS 18.4, macOS 15.4, tvOS 18.4, watchOS 11.4, visionOS 2.4)
var appTransactionID: String { get }get bundleTransactionID(): (string) | nullSwift declaration@backDeployed(before: iOS 27.0, macOS 27.0, tvOS 27.0, watchOS 27.0, visionOS 27.0)
var bundleTransactionID: String? { get }get isUpgraded(): booleanSwift declarationlet isUpgraded: BoolIf this transaction was upgraded to a subscription with a higher level of service. - Important: If this property is `true`, look for a new transaction for a subscription with a higher level of service. - Note: Only for subscriptions.
get originalID(): numberSwift declarationlet originalID: UInt64The ID of the original transaction for `productID` or`subscriptionGroupID` if this is a subscription.
get signedDate(): globalThis.DateSwift declarationlet signedDate: DateThe date this transaction was generated and signed.
get storefront(): StorefrontSwift declarationlet storefront: StorefrontThe `Storefront` the transaction was completed in.
static get unfinished(): Transaction_TransactionsSwift declarationstatic var unfinished: Transaction.Transactions { get }A sequence of every unfinished transaction for this user and app.
get appBundleID(): stringSwift declarationlet appBundleID: StringIdentifies the application the transaction is for.
get environment(): AppStore_EnvironmentSwift declarationlet environment: AppStore.EnvironmentThe server environment the transaction was created in.
get productType(): Product_ProductTypeSwift declarationlet productType: Product.ProductTypeThe type of `productID`.
get currencyCode(): (string) | nullSwift declaration@backDeployed(before: iOS 16.0, macOS 13.0, tvOS 16.0, watchOS 9.0)
var currencyCode: String? { get }ISO3A code for the currency used for the purchase. - Important: The property may return a `nil` value in some uncommon cases: (1) The price is also `nil`, (2) StoreKit Testing in Xcode (workaround: test your app on a device running a more recent OS) or (3) a critical server error. @DeprecationSummary { Use the ``currency`` property instead. }
get purchaseDate(): globalThis.DateSwift declarationlet purchaseDate: DateThe date this transaction occurred on.
get ownershipType(): Transaction_OwnershipTypeSwift declarationlet ownershipType: Transaction.OwnershipTypeWhether the user purchased this transaction, or has access to it via family sharing.
get commitmentInfo(): (Transaction_CommitmentInfo) | nullSwift declarationlet commitmentInfo: Transaction.CommitmentInfo?get expirationDate(): (globalThis.Date) | nullSwift declarationlet expirationDate: Date?The date the users access to `productID` expires - Note: Only for subscriptions.
get revocationDate(): (globalThis.Date) | nullSwift declarationlet revocationDate: Date?The date the transaction was revoked, or `nil` if it was not revoked.
get revocationType(): (Transaction_RevocationType) | nullSwift declarationlet revocationType: Transaction.RevocationType?The type of refund or revocation that applies to the transaction. This property indicates whether the transaction has a full refund, a prorated refund, or is revoked from Family Sharing. This property is `nil` for transactions that are not revoked. - Note: This property is not present for Advanced Commerce transactions, which use ``AdvancedCommerceInfo/Item/refunds`` instead.
get appAccountToken(): (string) | nullSwift declarationlet appAccountToken: UUID?If an app account token was added as a purchase option when purchasing, this property will be the token provided. If no token was provided, this will be `nil`.
get billingPlanType(): (Product_SubscriptionInfo_BillingPlanType) | nullSwift declarationlet billingPlanType: SubscriptionInfo.BillingPlanType?get bundleProductID(): (string) | nullSwift declaration@backDeployed(before: iOS 27.0, macOS 27.0, tvOS 27.0, watchOS 27.0, visionOS 27.0)
var bundleProductID: String? { get }Identifies the bundle product the transaction is for. If this transaction is created as a result of a subscription bundle purchase or renewal, this field will be populated with the product ID of the bundle.
get debugDescription(): stringSwift declarationvar debugDescription: String { get }A textual representation of this instance, suitable for debugging. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(reflecting:)` initializer. This initializer works with any type, and uses the custom `debugDescription` property for types that conform to `CustomDebugStringConvertible`: struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `debugDescription` property.
get revocationReason(): (Transaction_RevocationReason) | nullSwift declarationlet revocationReason: Transaction.RevocationReason?The reason the transaction was revoked, or `nil` if it was not revoked.
get purchasedQuantity(): numberSwift declarationlet purchasedQuantity: IntQuantity of `productID` purchased in the transaction. - Note: Always 1 for non-consumables and auto-renewable suscriptions.
beginRefundRequestIn(scene: _UIKit_UIWindowScene): Promise<Transaction_RefundRequestStatus>Swift declarationfunc beginRefundRequest(in scene: UIWindowScene) async throws -> Transaction.RefundRequestStatusDisplay the refund request sheet for this transaction. - Parameter scene: The window scene to present the refund request sheet in. - Returns: The result of the refund request. - Throws: `RefundRequestError` or `StoreKitError`.
static beginRefundRequestForIn(transactionID: number, scene: _UIKit_UIWindowScene): Promise<Transaction_RefundRequestStatus>Swift declaration@MainActor static func beginRefundRequest(for transactionID: UInt64, in scene: UIWindowScene) async throws -> Transaction.RefundRequestStatusDisplay the refund request sheet. - Parameters: - transactionID: The transaction ID to request a refund for. - scene: The window scene to present the refund request sheet in. - Returns: The result of the refund request. - Throws: `RefundRequestError` or `StoreKitError`.
static currentEntitlement(productID: string): Promise<(VerificationResult<Transaction>) | null>Swift declarationstatic func currentEntitlement(for productID: String) async -> VerificationResult<Transaction>?Get the transaction that entitles the user to a product. - Parameter productID: Identifies the product to check entitlements for. - Returns: A transaction if the user is entitled to the product, or `nil` if they are not. @DeprecationSummary { Use ``currentEntitlements(for:)`` method instead. }
get deviceVerification(): ArrayBufferSwift declarationlet deviceVerification: DataA SHA-384 hash of `AppStore.deviceVerificationID` appended after `deviceVerificationNonce` (both lowercased UUID strings).
get jsonRepresentation(): ArrayBufferSwift declarationvar jsonRepresentation: Data { get }The JSON representation of the transaction.
get subscriptionStatus(): Promise<(Product_SubscriptionInfo_Status) | null>Swift declaration@backDeployed(before: iOS 17.0, macOS 14.0, tvOS 17.0, watchOS 10.0)
var subscriptionStatus: Product.SubscriptionInfo.Status? { get async }The full subscription status for the transaction. If the transaction is not for a subscription (i.e. ``Transaction/productType`` is not ``Product/ProductType/autoRenewable``), the value will always be `nil`. The value may be `nil` if there is an error retrieving the subscription status. - Note: The value's ``Product/SubscriptionInfo/Status/transaction`` property represents the latest transaction for the subscription, which is not necessarily the same as this transaction.
get webOrderLineItemID(): (string) | nullSwift declarationlet webOrderLineItemID: String?Uniquely identifies a subscription purchase. - Note: Only for subscriptions.
static currentEntitlementsFor(productID: string): Transaction_TransactionsSwift declarationstatic func currentEntitlements(for productID: String) -> Transaction.TransactionsGets the transactions that entitle the user to items purchased under a product ID. If a generic SKU is provided, the returned sequence will yield all transactions that entitle the user to Advanced Commerce Items purchased using the generic product's ID. If an ID for a regular IAP is provided, the returned sequence will contain no more than one transaction. - Parameter productID: Identifies the product to check entitlements for. - Returns: A sequence containing all transactions that entitle the user to the product.
static get currentEntitlements(): Transaction_TransactionsSwift declarationstatic var currentEntitlements: Transaction.Transactions { get }Returns all transactions for products the user is currently entitled to i.e. all currently-subscribed transactions, and all purchased (and not refunded) non-consumables
get subscriptionGroupID(): (string) | nullSwift declarationlet subscriptionGroupID: String?Identifies the subscription group the transaction is for. - Note: Only for subscriptions.
get advancedCommerceInfo(): (Transaction_AdvancedCommerceInfo) | nullSwift declarationlet advancedCommerceInfo: Transaction.AdvancedCommerceInfo?Metadata specific to Advanced Commerce.
get originalPurchaseDate(): globalThis.DateSwift declarationlet originalPurchaseDate: DateThe date the original transaction for `productID` or`subscriptionGroupID` occurred on.
get revocationPercentage(): (_Foundation_Decimal) | nullSwift declaration@backDeployed(before: iOS 26.4, macOS 26.4, tvOS 26.4, watchOS 26.4, visionOS 26.4)
var revocationPercentage: Decimal? { get }The percentage of the transaction amount that the App Store has refunded or revoked, expressed as a decimal. This property indicates the rounded percentage of the purchase amount that the App Store has refunded or revoked. The value is present only for transactions with a non-reversed refund. Valid values range from 0.0 to 100.0: - For auto-renewable subscriptions: 0.0-100.0% based on time remaining in the subscription period - For consumables, non-consumables, and non-renewing subscriptions: 0.0-100.0% based on consumption data If the purchase had a quantity greater than 1, this percentage applies to the full quantity. For example, if 1 of 3 items was refunded, the value would be approximately 33.333. The following table shows several examples of revocation percentages, and their milliunit equivalents: | Percentage | Integer equivalent, in milliunits | |-----------|---------------------------| | 67.932% | 67932 | | 0.015% | 15 | | 40% | 40000 | | 100% | 100000| * - Note: This property is not present for Advanced Commerce transactions, which use ``AdvancedCommerceInfo/Refund/amount`` instead.
get storefrontCountryCode(): stringSwift declaration@backDeployed(before: iOS 17.0, macOS 14.0, tvOS 17.0, watchOS 10.0, macCatalyst 17.0)
var storefrontCountryCode: String { get }The ISO alpha-3 country code of the `Storefront` the transaction was completed in. - Important: When using `storefrontCountryCode` on systems earlier than iOS 17.0, macOS 14.0, tvOS 17.0 or watchOS 10.0, the property may return a sentinel empty string in some uncommon cases: (1) StoreKit Testing in Xcode (workaround: test your app on a device running a more recent OS) or (2) a critical server error. If possible, use the ``Transaction/storefront`` property to guarantee a valid value. @DeprecationSummary { Use the ``storefront`` property instead. } @available(iOS, introduced: 15.0, deprecated: 17.0, message: "Use the storefront property instead")
get deviceVerificationNonce(): stringSwift declarationlet deviceVerificationNonce: UUIDThe nonce used when computing `deviceVerification`. - SeeAlso: `AppStore.deviceVerificationID`
get bundleSubscriptionGroupID(): (string) | nullSwift declaration@backDeployed(before: iOS 27.0, macOS 27.0, tvOS 27.0, watchOS 27.0, visionOS 27.0)
var bundleSubscriptionGroupID: String? { get }Identifies the subscription bundle group the transaction is for. - Note: Only for transactions of subscriptions included in a bundle.
get reasonStringRepresentation(): stringSwift declaration@backDeployed(before: iOS 17.0, macOS 14.0, tvOS 17.0, watchOS 10.0, macCatalyst 17.0)
var reasonStringRepresentation: String { get }The reason for the transaction. The possible values this can return are "PURCHASE" when a transaction is the result of a change of service, or "RENEWAL" when a transaction is the result of a subscription renewing. - Important: When using `reasonStringRepresentation` on systems earlier than iOS 17.0, macOS 14.0, tvOS 17.0 or watchOS 10.0, the property may return a sentinel string equal to "PURCHASE" in some uncommon cases: (1) StoreKit Testing in Xcode (workaround: test your app on a device running a more recent OS) or (2) a critical server error. If possible, use the ``Transaction/reason`` property to guarantee a valid value.
get id(): numberSwift declarationlet id: UInt64Unique ID for the transaction.
get environmentStringRepresentation(): stringSwift declaration@backDeployed(before: iOS 16.0, macOS 13.0, tvOS 16.0, watchOS 9.0, macCatalyst 16.0)
var environmentStringRepresentation: String { get }The server environment the transaction was created in. The possible values this can return are "Production" for apps downloaded from the App Store, "Sandbox" for the App Store Sandbox and apps downloaded from TestFlight, and "Xcode" for StoreKit Testing in Xcode. - Important: The property may return a sentinel empty string in some uncommon cases: (1) StoreKit Testing in Xcode (workaround: test your app on a device running a more recent OS) or (2) a critical server error. If possible, use the ``Transaction/environment`` property to guarantee a valid value. @DeprecationSummary { Use the ``environment`` property instead. }
get offerPeriodStringRepresentation(): (string) | nullSwift declaration@backDeployed(before: iOS 18.4, macOS 15.4, tvOS 18.4, watchOS 11.4, visionOS 2.4)
var offerPeriodStringRepresentation: String? { get }The string representation of the offer period applied to the subscription offer for this transaction. - Note: Only for subscriptions and when there is an `offer`. - Important: The property may return a sentinel nil value in some uncommon cases: (1) StoreKit Testing in Xcode (workaround: test your app on a device running a more recent OS), or (2) a critical server error. @DeprecationSummary { Use the ``offer`` property instead. }
get revocationTypeStringRepresentation(): (string) | nullSwift declaration@backDeployed(before: iOS 26.4, macOS 26.4, tvOS 26.4, watchOS 26.4, visionOS 26.4)
var revocationTypeStringRepresentation: String? { get }The string representation of the ``revocationType``, or `nil` if the transaction was not revoked. @DeprecationSummary { Use the ``revocationType`` property instead. }
get offerPaymentModeStringRepresentation(): (string) | nullSwift declaration@backDeployed(before: iOS 17.2, macOS 14.2, tvOS 17.2, watchOS 10.2)
var offerPaymentModeStringRepresentation: String? { get }The string representation of the payment mode applied to the subscription offer for this transaction. - Note: Only for subscriptions and when there is an `offer`. The payment mode may be unknown for transactions created before the release of App Store Server API 1.10. If the payment mode is unknown, the property is nil. - Important: The property may return a sentinel nil value in some uncommon cases: (1) StoreKit Testing in Xcode (workaround: test your app on a device running a more recent OS), or (2) a critical server error. @DeprecationSummary { Use the ``offer`` property instead. }
static allFor(productID: string): Transaction_TransactionsSwift declarationstatic func all(for productID: String) -> Transaction.TransactionsGets all the transactions associated with this product ID. - Parameter productID: Identifies the product to filter the transaction cache against. - Returns: A sequence containing all transactions for the given product.
static get all(): Transaction_TransactionsSwift declarationstatic var all: Transaction.Transactions { get }A sequence of every transaction for this user and app.
get offer(): (Transaction_Offer) | nullSwift declarationlet offer: Transaction.Offer?The offer applied to this transaction. - Note: Only for subscriptions.
get price(): (_Foundation_Decimal) | nullSwift declaration@backDeployed(before: iOS 17.2, macOS 14.2, tvOS 17.2, watchOS 10.2, visionOS 1.1)
var price: Decimal? { get }Amount charged to the customer when purchasing this offer. - Important: The property may return a `nil` value in some uncommon cases: (1) StoreKit Testing in Xcode (workaround: test your app on a device running a more recent OS) or (2) a critical server error.
finish(): Promise<void>Swift declarationfunc finish() asyncCall this method after giving the user access to `productID`.
static latest(productID: string): Promise<(VerificationResult<Transaction>) | null>Swift declarationstatic func latest(for productID: String) async -> VerificationResult<Transaction>?The user's latest transaction for a product. - Parameter productID: Identifies the product to check entitlements for. - Returns: A verified transaction, or `nil` if the user has never purchased this product.
get reason(): Transaction_ReasonSwift declarationlet reason: Transaction.ReasonThe reason for the transaction.
get offerID(): (string) | nullSwift declarationvar offerID: String? { get }Identifies the offer applied to this transaction for `promotional` and `code` offer types. If `offerType` is `promotional`, this will be the offer identifier. If `offerType` is `code`, this will be the offer code reference name. This will be `nil` for `introductory` offers and if there is no offer applied. - Note: Only for subscriptions. @DeprecationSummary { Use the ``offer`` property instead. }
static get updates(): Transaction_TransactionsSwift declarationstatic var updates: Transaction.Transactions { get }A sequence that emits a transaction each time it is created or updated. - Important: Create a `Task` to iterate this sequence as early as possible when your app launches. This is important, for example, to handle transactions that may have occured after `purchase` returns, like an adult approving a child's purchase request or a purchase made on another device. - Note: Any unfinished transactions will be emitted from `updates` when you first iterate the sequence.
get currency(): (_Foundation_Locale_Currency) | nullSwift declaration@backDeployed(before: iOS 17.2, macOS 14.2, tvOS 17.2, watchOS 10.2, visionOS 1.1)
var currency: Locale.Currency? { get }The `Locale.Currency` used for the purchase.
get offerType(): (Transaction_OfferType) | nullSwift declarationvar offerType: Transaction.OfferType? { get }The type of subscription offer applied to this transaction. - Note: Only for subscriptions. @DeprecationSummary { Use the ``offer`` property instead. }
get productID(): stringSwift declarationlet productID: StringIdentifies the product the transaction is for.
No declarations were skipped in this snapshot.