<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "StoreKit",
  "identifier" : "/documentation/StoreKit/Product/latestTransaction",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "StoreKit"
    ],
    "preciseIdentifier" : "s:8StoreKit7ProductV17latestTransactionAA18VerificationResultOyAA0E0VGSgvp"
  },
  "title" : "latestTransaction"
}
-->

# latestTransaction

The most recent transaction for the product.

```
var latestTransaction: VerificationResult<Transaction>? { get async }
```

## Discussion

This value is `nil` if the customer has never purchased this product. The following code example illustrates requesting the most recent transaction for a product to determine whether the customer has purchased the product:

```swift
guard let resultingTransaction = await product.latestTransaction else {
    // The customer hasn't purchased this product.
    return
}
guard case .verified(let transaction) = resultingTransaction else {
    // Ignore unverified transactions.
    return
}
// Update your app based on the details from the most recent transaction.
```

By default, when the <doc://com.apple.documentation/documentation/BundleResources/Information-Property-List/SKIncludeConsumableInAppPurchaseHistory> property list key is `false`, this value excludes finished consumable in-app purchases unless they are refunded or revoked.

If you set the <doc://com.apple.documentation/documentation/BundleResources/Information-Property-List/SKIncludeConsumableInAppPurchaseHistory> property list key to `true`, this value returns all transactions, including consumable in-app purchases that your app marked as finished ([`finish()`](/documentation/StoreKit/Transaction/finish())).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)