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

# declinePriceIncreaseForTransaction(identifier:)

Simulates a user canceling an auto-renewable subscription by disabling auto-renew.

## Declaration

```swift
func declinePriceIncreaseForTransaction(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 declinePriceIncreaseForTransaction(identifier:) to simulate a user canceling the subscription. Specifically, this method disables auto-renew and removes the subscription’s pending price increase status. The subscription expires at the end of the billing period in the testing environment.

## See Also

### Testing price increase consent

- [requestPriceIncreaseConsentForTransaction(identifier:)](storekittest/sktestsession/requestpriceincreaseconsentfortransaction(identifier:).md)
- [consentToPriceIncreaseForTransaction(identifier:)](storekittest/sktestsession/consenttopriceincreasefortransaction(identifier:).md)
