<!--
{
  "availability" : [
    "iOS: 14.0.0 - 17.0.0",
    "iPadOS: 14.0.0 - 17.0.0",
    "macCatalyst: 14.0.0 - 17.0.0",
    "macOS: 11.0.0 - 14.0.0",
    "tvOS: 14.0.0 - 17.0.0",
    "watchOS: 7.0.0 - 10.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "StoreKitTest",
  "identifier" : "/documentation/StoreKitTest/SKTestSession/failTransactionsEnabled",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "StoreKit Test"
    ],
    "preciseIdentifier" : "c:objc(cs)SKTestSession(py)failTransactionsEnabled"
  },
  "title" : "failTransactionsEnabled"
}
-->

# failTransactionsEnabled

A Boolean value that determines whether transactions fail in the testing environment.

```
var failTransactionsEnabled: Bool { get set }
```

## Discussion

The default value is `false`. Set this value to `true` when you want to test your app’s response to <doc://com.apple.documentation/documentation/StoreKit/SKPaymentTransaction> transactions that fail. Attempted transactions in the payment queue show the <doc://com.apple.documentation/documentation/StoreKit/SKPaymentTransactionState/failed> state, with the error code that you set in [`failureError`](/documentation/StoreKitTest/SKTestSession/failureError).

Changing this property overrides its setting in the StoreKit configuration file for this test session. Call [`resetToDefaultState()`](/documentation/StoreKitTest/SKTestSession/resetToDefaultState()) to revert all settings to those in the configuration file.

---

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)