# InvoicePaymentPlanDto

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

Read DTO for an invoice payment plan and its installments.

## Fields
- `status` ([PaymentPlanStatus](https://devportal.demo.winkpg.io/docs/api/models/PaymentPlanStatus.md)): Current lifecycle of the plan.
  Values:
  - `Active`: Installments remain outstanding; the plan is collecting (manually or automatically).
  - `Completed`: Every installment was paid (or cancelled); the plan is complete.
  - `Cancelled`: The plan was cancelled; remaining installments no longer apply. The invoice balance is unchanged and remains payable normally.
- `createdUtc` (string(date-time)): UTC the plan was created.
- `autoCollect` (boolean): Whether installments are auto-charged against the stored token as they come due.
- `paymentTokenId` (string(uuid)): The stored payment-method token used for automatic collection (when `autoCollect`). (nullable)
- `installments` (array<[PaymentPlanInstallmentDto](https://devportal.demo.winkpg.io/docs/api/models/PaymentPlanInstallmentDto.md)>): The scheduled installments, in sequence order. (nullable)
  Fields of each item:
  - `id` (string(uuid))
  - `sequenceNumber` (integer(int32))
  - `amount` (number(double))
  - `dueDate` (string(date-time))
  - `status` ([InstallmentStatus](https://devportal.demo.winkpg.io/docs/api/models/InstallmentStatus.md)): Status of a single installment within an invoice payment plan.
    Values:
    - `Pending`: Outstanding: not yet collected. The due date (and any scheduled retry) governs auto-collection.
    - `Paid`: Collected in full; the matching payment reduced the invoice balance.
    - `Failed`: Automatic collection exhausted its attempts (or hard-declined); the amount is still owed and needs manual intervention.
    - `Cancelled`: Voided because the plan was cancelled before this installment was collected.
  - `paidAmount` (number(double)): (nullable)
  - `paidAt` (string(date-time)): (nullable)
  - `transactionId` (string(uuid)): (nullable)
  - `attemptCount` (integer(int32))
  - `lastAttemptUtc` (string(date-time)): (nullable)
  - `nextAttemptUtc` (string(date-time)): (nullable)
  - `lastDeclineReasonCode` (string): (nullable)

## See also

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