---
title: failTransactionsEnabled
framework: storekittest
role: symbol
role_heading: Instance Property
path: storekittest/sktestsession/failtransactionsenabled
---

# failTransactionsEnabled

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

## Declaration

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

## Discussion

Discussion The default value is false. Set this value to true when you want to test your app’s response to SKPaymentTransaction transactions that fail. Attempted transactions in the payment queue show the SKPaymentTransactionState.failed state, with the error code that you set in failureError. Changing this property overrides its setting in the StoreKit configuration file for this test session. Call resetToDefaultState() to revert all settings to those in the configuration file.

## See Also

### Forcing failed transactions

- [failureError](storekittest/sktestsession/failureerror.md)
