<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PassKit",
  "identifier" : "/documentation/PassKit/PKRecurringPaymentSummaryItem/intervalUnit",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "PassKit (Apple Pay and Wallet)"
    ],
    "preciseIdentifier" : "c:objc(cs)PKRecurringPaymentSummaryItem(py)intervalUnit"
  },
  "title" : "intervalUnit"
}
-->

# intervalUnit

The amount of time – in calendar units such as day, month, or year – that represents a fraction of the total payment interval.

```
var intervalUnit: NSCalendar.Unit { get set }
```

## Discussion

The default value for the interval unit is <doc://com.apple.documentation/documentation/Foundation/NSCalendar/Unit/month>.

The supported <doc://com.apple.documentation/documentation/Foundation/NSCalendar/Unit> interval units are:

- <doc://com.apple.documentation/documentation/CoreFoundation/CFCalendarUnit/minute>
- <doc://com.apple.documentation/documentation/CoreFoundation/CFCalendarUnit/hour>
- <doc://com.apple.documentation/documentation/CoreFoundation/CFCalendarUnit/day>
- <doc://com.apple.documentation/documentation/CoreFoundation/CFCalendarUnit/month>
- <doc://com.apple.documentation/documentation/CoreFoundation/CFCalendarUnit/year>

To set an interval unit based on a week, set [`intervalUnit`](/documentation/PassKit/PKRecurringPaymentSummaryItem/intervalUnit) to <doc://com.apple.documentation/documentation/CoreFoundation/CFCalendarUnit/day>, and set [`intervalCount`](/documentation/PassKit/PKRecurringPaymentSummaryItem/intervalCount) to a multiple of the number of days per week. To find the number of days for a week in the current calendar, call `NSCalendar.current.maximumRange(of: .weekday)!.count)`.

For example, the code below sets a payment that occurs every two weeks.

```swift
let daysPerWeek = NSCalendar.current.maximumRange(of: .weekday)!.count)

intervalUnit = .day
intervalCount = daysPerWeek * 2
```

---

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)