# ContractPlanDto

A model the API reference uses in a request or a response. The operation pages link every field typed as this model here.

A reusable, merchant-scoped price that recurring contracts can subscribe to.

## Fields
- `id` (string(uuid))
- `creationTime` (string(date-time)): The date and time when this entity was created.
- `creatorId` (string(uuid)): The ID of the user who created this entity. (nullable)
- `lastModificationTime` (string(date-time)): The date and time when this entity was last modified. (nullable)
- `lastModifierId` (string(uuid)): The ID of the user who last modified this entity. (nullable)
- `isDeleted` (boolean): Indicates whether this entity has been deleted.
- `deleterId` (string(uuid)): The ID of the user who deleted this entity, if it is deleted. (nullable)
- `deletionTime` (string(date-time)): The date and time when this entity was deleted, if it is deleted. (nullable)
- `merchantId` (string(uuid)): The merchant that owns the plan.
- `tenantId` (string(uuid)): The tenant that owns the plan. Null for host-level plans. (nullable)
- `name` (string): The plan's operator-facing name, unique within the owning merchant. (nullable)
- `code` (string): The merchant's own short code for the plan, or null. Not resolved by the platform. (nullable)
- `description` (string): What the plan covers, in the operator's own words. (nullable)
- `currencyCode` (string): The ISO 4217 alphabetic currency code the plan's amounts are denominated in. (nullable)
- `isActive` (boolean): Whether the plan may be subscribed to. An inactive plan keeps pricing the contracts already  on it.
- `defaultSchedule` ([ContractSchedule](https://devportal.demo.winkpg.io/docs/api/models/ContractSchedule.md)): The recurrence a new contract on this plan starts from, or null when the plan suggests none.
  Fields:
  - `frequency` ([Frequency](https://devportal.demo.winkpg.io/docs/api/models/Frequency.md)): The type of the recurrence rule.
    Values:
    - `Secondly`
    - `Minutely`
    - `Hourly`
    - `Daily`
    - `Weekly`
    - `Monthly`
    - `Yearly`
  - `count` (integer(int32)): The number of occurrences in a particular recurrence. (nullable)
  - `until` (string(date-time)): The datetime that bounds the current recurrence. (nullable)
  - `interval` (integer(int32)): The recurrence interval.
  - `bySecond` (array<integer(int32)>): BySecond rule modifier. (nullable)
  - `byMinute` (array<integer(int32)>): BySecond rule modifier. (nullable)
  - `byHour` (array<integer(int32)>): BySecond rule modifier. (nullable)
  - `byDay` (array<[ContractScheduleByDayRule](https://devportal.demo.winkpg.io/docs/api/models/ContractScheduleByDayRule.md)>): Week day rule modifier. (nullable)
  - `byMonth` (array<integer(int32)>): Month day rule modifier. (nullable)
  - `byMonthDay` (array<integer(int32)>): Month days rule modifier. (nullable)
  - `byYearDay` (array<integer(int32)>): Year days rule modifier. (nullable)
  - `byWeekNumber` (array<integer(int32)>): Week number rule modifier. (nullable)
  - `bySetPosition` (array<integer(int32)>): BySetPosition rule modifier. (nullable)
  - `firstDayOfWeek` ([DayOfWeek](https://devportal.demo.winkpg.io/docs/api/models/DayOfWeek.md)): The first day of week, used in calculating weekday-based recurrences (nullable)
    Values:
    - `Sunday`
    - `Monday`
    - `Tuesday`
    - `Wednesday`
    - `Thursday`
    - `Friday`
    - `Saturday`
  - `nextScheduledRun` (string(date-time)): The next computed billing date, updated after each billing run. Null for contracts that  have never been scheduled or have ended. (nullable)
  - `startDate` (string(date-time)): The earliest date on which this contract is eligible to bill. Set by the user  when creating the contract (defaults to the creation date) and may be set to a  future date to delay first billing. The recurrence engine anchors expansion to  this date and the daily billing job will not fire a contract whose  `startDate` is in the future.                Null on contracts created before this field existed. When it is null, the server  anchors the schedule on the contract's creation time, or on the current time when  that is also absent; callers that compute a schedule themselves should apply the  same fallback. (nullable)
- `trialDays` (integer(int32)): The trial length a new contract on this plan inherits, in days, or null when the plan offers  no trial. (nullable)
- `currentPrice` ([ContractPlanPriceDto](https://devportal.demo.winkpg.io/docs/api/models/ContractPlanPriceDto.md)): The plan's price today: the revision in force at the moment the plan was read, with no  scheduled run to measure a next-cycle change against.
  Fields:
  - `id` (string(uuid)): Identifies this revision.
  - `billSubtotalAmount` (number(double)): The base amount charged each cycle, before tax.
  - `taxAmount` (number(double)): The tax added to the base amount each cycle, or null when the plan carries no tax line. (nullable)
  - `totalAmount` (number(double)): The total charged to the subscriber's payment method each cycle.
  - `effectiveFrom` (string(date-time)): The moment this revision starts applying, in UTC.
  - `policy` ([ContractPlanPriceChangePolicy](https://devportal.demo.winkpg.io/docs/api/models/ContractPlanPriceChangePolicy.md)): The propagation policy the revision was saved under.
    Values:
    - `Immediate`: The new price applies to every charge executed from the moment the change was saved, including a charge that was already due and has not run yet.
    - `NextCycle`: The new price applies only to charges that fall due after the change was saved. A charge that was already due when the price changed still bills at the old price, so a subscriber is never re-priced part-way through a cycle they have already entered.
    - `Scheduled`: The new price applies to charges executed on or after an operator-chosen effective moment. Until then every subscriber keeps billing at the previous price.
  - `recordedAt` (string(date-time)): When the revision was saved, in UTC.
  - `recordedByUserId` (string(uuid)): The operator who saved the revision, or null when the platform wrote it. (nullable)
  - `note` (string): Why the price changed, in the operator's own words. (nullable)
- `pendingPrice` ([ContractPlanPriceDto](https://devportal.demo.winkpg.io/docs/api/models/ContractPlanPriceDto.md)): The revision that will take over next, when one is scheduled and has not taken effect yet.  Null when the plan has no pending change.
  Fields:
  - `id` (string(uuid)): Identifies this revision.
  - `billSubtotalAmount` (number(double)): The base amount charged each cycle, before tax.
  - `taxAmount` (number(double)): The tax added to the base amount each cycle, or null when the plan carries no tax line. (nullable)
  - `totalAmount` (number(double)): The total charged to the subscriber's payment method each cycle.
  - `effectiveFrom` (string(date-time)): The moment this revision starts applying, in UTC.
  - `policy` ([ContractPlanPriceChangePolicy](https://devportal.demo.winkpg.io/docs/api/models/ContractPlanPriceChangePolicy.md)): The propagation policy the revision was saved under.
    Values:
    - `Immediate`: The new price applies to every charge executed from the moment the change was saved, including a charge that was already due and has not run yet.
    - `NextCycle`: The new price applies only to charges that fall due after the change was saved. A charge that was already due when the price changed still bills at the old price, so a subscriber is never re-priced part-way through a cycle they have already entered.
    - `Scheduled`: The new price applies to charges executed on or after an operator-chosen effective moment. Until then every subscriber keeps billing at the previous price.
  - `recordedAt` (string(date-time)): When the revision was saved, in UTC.
  - `recordedByUserId` (string(uuid)): The operator who saved the revision, or null when the platform wrote it. (nullable)
  - `note` (string): Why the price changed, in the operator's own words. (nullable)
- `prices` (array<[ContractPlanPriceDto](https://devportal.demo.winkpg.io/docs/api/models/ContractPlanPriceDto.md)>): Every price the plan has carried, oldest first. (nullable)
  Fields of each item:
  - `id` (string(uuid)): Identifies this revision.
  - `billSubtotalAmount` (number(double)): The base amount charged each cycle, before tax.
  - `taxAmount` (number(double)): The tax added to the base amount each cycle, or null when the plan carries no tax line. (nullable)
  - `totalAmount` (number(double)): The total charged to the subscriber's payment method each cycle.
  - `effectiveFrom` (string(date-time)): The moment this revision starts applying, in UTC.
  - `policy` ([ContractPlanPriceChangePolicy](https://devportal.demo.winkpg.io/docs/api/models/ContractPlanPriceChangePolicy.md)): The propagation policy the revision was saved under.
    Values:
    - `Immediate`: The new price applies to every charge executed from the moment the change was saved, including a charge that was already due and has not run yet.
    - `NextCycle`: The new price applies only to charges that fall due after the change was saved. A charge that was already due when the price changed still bills at the old price, so a subscriber is never re-priced part-way through a cycle they have already entered.
    - `Scheduled`: The new price applies to charges executed on or after an operator-chosen effective moment. Until then every subscriber keeps billing at the previous price.
  - `recordedAt` (string(date-time)): When the revision was saved, in UTC.
  - `recordedByUserId` (string(uuid)): The operator who saved the revision, or null when the platform wrote it. (nullable)
  - `note` (string): Why the price changed, in the operator's own words. (nullable)
- `concurrencyStamp` (string): The concurrency stamp used for optimistic concurrency control. (nullable)
- `entityVersion` (integer(int32)): The entity version, incremented on each modification.

## See also

- [All documentation](https://devportal.demo.winkpg.io/llms.txt): the machine-readable index of every public page on this site.
