> ## Documentation Index
> Fetch the complete documentation index at: https://docs.khaime.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Installment Plans

> List installment plans, newest first.

# List Installment Plans

## Intro

Lists the installment plans your API key can see, newest first, with each plan's installments.

## Context

A key sees plans of its business and, for a marketplace operator, its active sub-merchants — only in its own environment. Each item has the same shape as [Get Installment Plan](/api-reference/installments/get).

## Hows

`GET /installment-plans`

### Query parameters

| Parameter     | Type    | Description                                                               |
| ------------- | ------- | ------------------------------------------------------------------------- |
| `customer_id` | integer | Only this customer's plans.                                               |
| `status`      | string  | `pending`, `active`, `completed`, `past_due`, `cancelled` or `defaulted`. |
| `page`        | integer | Default `1`.                                                              |
| `limit`       | integer | `1`–`100`, default `20`.                                                  |

### Response

```json theme={null}
{
  "status": true,
  "message": "Installment plans",
  "data": [
    { "id": 812, "status": "active", "collection_mode": "manual", "total_amount": 10000, "amount_paid": 4000, "amount_due": 6000, "installments": ["..."] }
  ],
  "pagination": { "currentPage": 1, "totalPages": 1, "totalItems": 1, "limit": 20 }
}
```

### Errors

| Status | `error_code`        | Cause                                                 |
| ------ | ------------------- | ----------------------------------------------------- |
| 422    | `VALIDATION_FAILED` | An unknown `status`, or `page` / `limit` out of range |

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.khaime.com/api/v1/installment-plans?status=past_due&limit=50" \
    -H "X-API-Key: pk_sandbox_your_key"
  ```
</RequestExample>

## Whys

`status=past_due` is the list to watch if a business uses automatic collection: those plans have failed three times and the customer probably needs a nudge or a [pay link](/api-reference/installments/pay-link).

## Why nots

* There's no filter by product or due date yet; filter the page on your side.
