<!--
{
  "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/SKTestTransaction/cancelDate",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "StoreKit Test"
    ],
    "preciseIdentifier" : "c:objc(cs)SKTestTransaction(py)cancelDate"
  },
  "title" : "cancelDate"
}
-->

# cancelDate

The date when the system refunded the transaction.

```
var cancelDate: Date? { get }
```

## Discussion

The [`cancelDate`](/documentation/StoreKitTest/SKTestTransaction/cancelDate) is equivalent to the <doc://com.apple.documentation/documentation/StoreKit/Transaction/revocationDate> in <doc://com.apple.documentation/documentation/StoreKit/Transaction>. The system sets the [`cancelDate`](/documentation/StoreKitTest/SKTestTransaction/cancelDate) if it refunds or revokes the in-app purchase. Otherwise, the value is `nil`.

A subscription can have a `nil` [`cancelDate`](/documentation/StoreKitTest/SKTestTransaction/cancelDate) and be inactive if its expiration date passed.

The system doesn’t set [`cancelDate`](/documentation/StoreKitTest/SKTestTransaction/cancelDate) if the user turns off auto-renewing for the subscription. If the user upgrades the subscription, the system sets <doc://com.apple.documentation/documentation/StoreKit/Transaction/isUpgraded> in <doc://com.apple.documentation/documentation/StoreKit/Transaction> to `true` and sends a new transaction for the upgraded subscription. The system doesn’t set [`cancelDate`](/documentation/StoreKitTest/SKTestTransaction/cancelDate) in this case.

---

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)