<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "StoreKitTest",
  "identifier" : "/documentation/StoreKitTest/SKTestSession/disableAutoRenewForTransaction(identifier:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "StoreKit Test"
    ],
    "preciseIdentifier" : "c:objc(cs)SKTestSession(im)disableAutoRenewForTransactionWithIdentifier:error:"
  },
  "title" : "disableAutoRenewForTransaction(identifier:)"
}
-->

# disableAutoRenewForTransaction(identifier:)

Disables auto-renewing for an auto-renewable subscription in the test environment.

```
func disableAutoRenewForTransaction(identifier: Int) throws
```

## Parameters

`identifier`

The transaction [`identifier`](/documentation/StoreKitTest/SKTestTransaction/identifier) of the auto-renewable subscription.

## Discussion

Call this method to disable auto-renewing for a subscription. A subscription with auto-renew disabled expires at the end of the billing period and doesn’t renew at the start of the next billing period.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)