---
title: "approveAskToBuyTransaction(identifier:)"
framework: storekittest
role: symbol
role_heading: Instance Method
path: "storekittest/sktestsession/approveasktobuytransaction(identifier:)"
---

# approveAskToBuyTransaction(identifier:)

Resolves an Ask to Buy test scenario by approving the transaction.

## Declaration

```swift
func approveAskToBuyTransaction(identifier: Int) throws
```

## Parameters

- `identifier`: The transaction doc://com.apple.storekittest/documentation/StoreKitTest/SKTestTransaction/identifier of the Ask to Buy transaction.

## See Also

### Testing Ask To Buy transactions

- [askToBuyEnabled](storekittest/sktestsession/asktobuyenabled.md)
- [declineAskToBuyTransaction(identifier:)](storekittest/sktestsession/declineasktobuytransaction(identifier:).md)
