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

# API reference

> A small REST API for hosted payments, checkout status, key management and the agent.

The Pesarc API is a small set of JSON-over-HTTPS endpoints. If you can make an
HTTP request, you can integrate Pesarc.

## Base URL

```
https://pesarc.xyz/api
```

## Conventions

* **JSON** — request and response bodies are JSON. Send
  `Content-Type: application/json` on writes.
* **Auth** — pass `Authorization: Bearer sk_live_…` on every developer endpoint.
  See [Authentication](/api-reference/authentication).
* **Money amounts** — `amount` is a positive number in the given `currency`
  (e.g. `50000` with `"currency": "NGN"`), and `currency` is a short code like
  `NGN`, `GHS` or `KES`.
* **Idempotency** — pass your own `reference` on a payment to tie it to your
  records and recognise duplicates.
* **Rate limits** — endpoints are rate-limited per key; a limited request returns
  `429`. Back off and retry.

## Endpoints at a glance

| Method & path              | What it does                            |
| -------------------------- | --------------------------------------- |
| `GET /v1/ping`             | Confirm a key works and see its account |
| `POST /v1/payments`        | Create a hosted checkout session        |
| `GET /checkout/:id`        | Read a payment's public status          |
| `POST /agent/settle`       | Drive the agent in plain language       |
| `GET /keys` · `POST /keys` | List and create API keys                |

<Card title="Start with the quickstart" icon="rocket" href="/quickstart">
  The fastest way to see the API end to end.
</Card>
