# CreatePaymentPlanInput

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

Input for setting up an installment payment plan against an issued invoice's outstanding balance.

## Fields
- `installmentCount` (integer(int32)): Number of equal installments to split the balance into. Ignored when `customAmounts` is supplied. Conditional: When CustomAmounts is null or CustomAmounts.Count == 0. Range: 2 to 60.
- `firstDueDate` (string(date-time)) required: The due date of the first installment. Subsequent due dates are spaced by `frequency`.
- `frequency` ([PaymentPlanFrequency](https://devportal.demo.winkpg.io/docs/api/models/PaymentPlanFrequency.md)): The cadence between installment due dates.
  Values:
  - `Weekly`: Each installment is due 7 days after the previous one.
  - `BiWeekly`: Each installment is due 14 days after the previous one.
  - `Monthly`: Each installment is due one calendar month after the previous one.
- `autoCollect` (boolean): When true, each installment is auto-charged against `paymentTokenId` as it comes due.
- `paymentTokenId` (string(uuid)): The stored payment-method token to auto-charge. Required when `autoCollect` is true. Required: When AutoCollect is true. (nullable)
- `customAmounts` (array<number(double)>): Optional explicit per-installment amounts. When supplied, they must sum to the invoice balance. Conditional: When CustomAmounts is not null and CustomAmounts.Count > 0. (nullable)

## See also

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