---
title: clearTransactions()
framework: storekittest
role: symbol
role_heading: Instance Method
path: storekittest/sktestsession/cleartransactions()
---

# clearTransactions()

Removes all transactions from the test environment.

## Declaration

```swift
func clearTransactions()
```

## Discussion

Discussion After you clear the transactions from the test environment, the test environment produces an empty receipt. Use this method to enable repeating tests for one-time purchases. To revert all the settings in the test environment to those in the StoreKit configuration file, see resetToDefaultState().

## See Also

### Managing transactions in the test environment

- [allTransactions()](storekittest/sktestsession/alltransactions().md)
- [deleteTransaction(identifier:)](storekittest/sktestsession/deletetransaction(identifier:).md)
