---
title: transaction
framework: storekit
role: symbol
role_heading: Instance Property
path: storekit/entitlementtaskstate/transaction
---

# transaction

The transaction value if the task is successful.

## Declaration

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

## Discussion

Discussion Use 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.

## See Also

### Getting the transaction with the entitlement

- [value](storekit/entitlementtaskstate/value.md)
