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

# consentToPriceIncreaseForTransaction(identifier:)

Simulates a user consenting to a price increase for an auto-renewable subscription.

## Declaration

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

## Parameters

- `identifier`: The transaction doc://com.apple.storekittest/documentation/StoreKitTest/SKTestTransaction/identifier of the auto-renewable subscription that has a pending price increase.

## Discussion

Discussion To test how your app handles the price increase consent flow for auto-renewable subscriptions, first call requestPriceIncreaseConsentForTransaction(identifier:). Call the consentToPriceIncreaseForTransaction(identifier:) method to simulate a user consenting to the price increase. This method removes the subscription’s pending price increase status. The subscription renews at the next billing period.

## See Also

### Testing price increase consent

- [requestPriceIncreaseConsentForTransaction(identifier:)](storekittest/sktestsession/requestpriceincreaseconsentfortransaction(identifier:).md)
- [declinePriceIncreaseForTransaction(identifier:)](storekittest/sktestsession/declinepriceincreasefortransaction(identifier:).md)
