> ## 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.

# Get Installment Plan

> An installment plan and its installments.

# Get Installment Plan

## Intro

Returns one installment plan: its status, how much is paid and due, the saved payment method, and every installment with its status and due date.

## Context

Plans are opened by [Installment Checkout](/api-reference/installments/checkout). Each paid installment links to its own transaction (`transaction_id`), which [Get Transaction](/api-reference/payments/get-transaction) returns with an `installment` object.

## Hows

`GET /installment-plans/{plan_id}`

### Response

```json theme={null}
{
  "status": true,
  "message": "Installment plan",
  "data": {
    "id": 812,
    "status": "active",
    "collection_mode": "manual",
    "business_id": 10,
    "customer_id": 7,
    "product_id": 3046,
    "currency": "usd",
    "total_amount": 10000,
    "amount_paid": 4000,
    "amount_due": 6000,
    "payment_method": { "type": "card", "gateway": "stripe", "saved": true },
    "is_live": true,
    "installments": [
      { "position": 1, "label": "Deposit", "amount": 4000, "status": "paid", "due_date": "2026-09-28T10:00:00.000Z", "paid_at": "2026-09-28T10:00:00.000Z", "attempt_count": 1, "next_attempt_at": null, "transaction_id": 5501 },
      { "position": 2, "label": "Second payment", "amount": 3000, "status": "pending", "due_date": "2026-10-28T10:00:00.000Z", "paid_at": null, "attempt_count": 0, "next_attempt_at": null, "transaction_id": null },
      { "position": 3, "label": "Final payment", "amount": 3000, "status": "pending", "due_date": "2026-11-28T10:00:00.000Z", "paid_at": null, "attempt_count": 0, "next_attempt_at": null, "transaction_id": null }
    ],
    "created_at": "2026-09-28T09:58:12.000Z",
    "completed_at": null
  }
}
```

| Field                            | Description                                                                                                                                                                 |
| -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `status`                         | `pending` (first installment not paid yet), `active`, `completed`, `past_due` (automatic collection failed three times), `cancelled`, `defaulted`                           |
| `collection_mode`                | `manual` (you or the customer pay each installment) or `automatic` (Khaime charges on due dates)                                                                            |
| `payment_method`                 | The saved card: `type`, `gateway`, and `last4` / `brand` when the gateway provides them. Never includes gateway IDs or secrets. `null` until the first installment is paid. |
| `installments[].status`          | `pending`, `paid`, `failed` (automatic collection gave up), `cancelled`                                                                                                     |
| `installments[].next_attempt_at` | Automatic collection: when a failed charge is retried                                                                                                                       |

### Errors

| Status | `error_code`                 | Cause                                                                     |
| ------ | ---------------------------- | ------------------------------------------------------------------------- |
| 404    | `INSTALLMENT_PLAN_NOT_FOUND` | No such plan, another business's plan, or a plan in the other environment |

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

## Whys

Another business's plan and a plan in the other environment answer the same 404 as a missing one, so a plan ID never confirms that someone else's plan exists.

## Why nots

* The saved card's gateway identifiers are never returned; you can't charge the card outside Khaime.
