# Payment schedules

> For the complete machine-readable documentation index, see [llms.txt](https://apidocs.chargebee.com/llms.txt).


Payment schedules for an invoice refer to a payment structure where the `amount_due` on an invoice is divided into smaller, more manageable parts, each of which is paid over a specified period.

## Sample Payment schedule

```json
{
  "entity_type": "invoice",
  "scheme_id": "__dev__3Nl7O2OURL9Ph52C",
  "created_at": 1713242812,
  "id": "__dev__3Nl7O2OURL9Suc2r",
  "entity_id": "1",
  "schedule_entries": [
    {
      "date": 1713242812,
      "amount": 150000,
      "id": "__dev__3Nl7O2OURL9Sui2s",
      "status": "paid",
      "object": "schedule_entry"
    },
    {
      "date": 1713502012,
      "amount": 150000,
      "id": "__dev__3Nl7O2OURL9Suk2t",
      "status": "posted",
      "object": "schedule_entry"
    },
    {
      "date": 1713761212,
      "amount": 150000,
      "id": "__dev__3Nl7O2OURL9Suk2u",
      "status": "posted",
      "object": "schedule_entry"
    }
  ],
  "object": "payment_schedule"
}
```

## Payment schedules attributes

## Input Parameters

- `id` (required, string, max chars=40)
  An auto-generated unique identifier for the payment schedule.

- `scheme_id` (required, string, max chars=40)
  The identifier of the `payment_schedule_scheme` , used to create the payment schedules.

- `entity_type` (required, enumerated string)
  Specifies the types of entity this payment schedule is based on.
  Possible enum values:
    - `invoice`
      Indicates the invoice entity type

- `entity_id` (required, string, max chars=50)
  The identifier of the entity this payment schedule is based on.

- `amount` (optional, in cents, min=0)
  The part of the `invoice.amount_due` to be distributed across the payment schedules. If not specified, the entire `invoice.amount_due` is considered by default.

- `created_at` (required, timestamp(UTC) in seconds)
  The timestamp at which the `payment_schedule` was created.

- `resource_version` (optional, long)
  Version number of this resource. The `resource_version` is updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.

- `updated_at` (optional, timestamp(UTC) in seconds)
  Specifies when these payment schedules are updated recently.

- `currency_code` (optional, string, max chars=3)
  The currency code (ISO 4217 format) of the transaction amount.

- `schedule_entries` (optional, list of schedule_entry)
  List of schedule entries
  - `id` (required, string, max chars=40)
    An auto-generated unique identifier for the payment schedules.
  - `date` (required, timestamp(UTC) in seconds)
    Date at which this payment schedule is scheduled.
  - `amount` (required, in cents, min=0)
    Maximum amount that this payment schedule is allowed to collect.
  - `status` (required, enumerated string)
    Defines the status for each payment schedule.
    Possible enum values:
      - `posted`
        The installment is unpaid or partially paid and the due date (`date`) has not passed.
      - `payment_due`
        The installment is unpaid or partially paid and the due date (`date`) has passed.
      - `paid`
        The installment has been paid.

