<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "StoreKit",
  "identifier" : "/documentation/StoreKit/EntitlementTaskState/transaction",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "StoreKit",
      "SwiftUI",
      "_StoreKit_SwiftUI"
    ],
    "preciseIdentifier" : "s:17_StoreKit_SwiftUI20EntitlementTaskStateOAA0aB018VerificationResultOyAD11TransactionVGSgRszlE11transactionAJvp"
  },
  "title" : "transaction"
}
-->

# transaction

The transaction value if the task is successful.

```
var transaction: VerificationResult<Transaction>? { get }
```

## Discussion

Use [`transaction`](/documentation/StoreKit/EntitlementTaskState/transaction) as a convenience to access the transaction value in code that doesn’t depend on the reason a transaction isn’t available. The value is `nil` while the transaction is loading, if it fails to load for any reason, or if the customer isn’t entitled to the product.

---

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)