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

# API Overview

> Complete reference for the Khaime Partner API.

# Partner API

The Khaime Partner API lets you create payments, manage subscriptions, and query transaction data from your server.

## Base URL

```
https://api.khaime.com/api/v1/partner
```

## Authentication

All requests require an API key in the `X-API-Key` header:

```bash theme={null}
curl -H "X-API-Key: pk_sandbox_your_key_here" \
     https://api.khaime.com/api/v1/partner/products
```

<Note>
  API keys start with `pk_sandbox_` (test) or `pk_live_` (production).
  Generate keys in your [Khaime Dashboard](https://app.khaime.com).
</Note>

## Rate Limits

| Limit             | Value              |
| ----------------- | ------------------ |
| Requests per hour | 1,000 per API key  |
| Burst             | 50 requests/second |

When rate limited, the API returns `429 Too Many Requests`. Rate limits reset hourly.

## Response Format

All responses follow this structure:

```json Success theme={null}
{
  "success": true,
  "data": { ... }
}
```

```json Error theme={null}
{
  "success": false,
  "error": "Error message",
  "details": { ... }
}
```

## HTTP Status Codes

| Code  | Meaning                        |
| ----- | ------------------------------ |
| `200` | Success                        |
| `201` | Created                        |
| `400` | Bad request — check parameters |
| `401` | Invalid or missing API key     |
| `404` | Resource not found             |
| `422` | Validation error               |
| `429` | Rate limit exceeded            |
| `500` | Server error                   |

## Pagination

List endpoints support pagination via query parameters:

| Parameter    | Default      | Max             |
| ------------ | ------------ | --------------- |
| `limit`      | 20           | 100             |
| `offset`     | 0            | —               |
| `sort_by`    | `created_at` | Varies          |
| `sort_order` | `DESC`       | `ASC` or `DESC` |
