# What is K-LINK Pay

K-LINK Pay is a payments API for Southeast Asia, built for AI agents and messaging channels. Send a payment QR code or a payment link in the chat, and a signed webhook tells you when it is paid.

## What you can build

- **Payments in a chat.** An AI agent on Messenger, WhatsApp, LINE, Viber, Instagram, Telegram or your web chat creates a payment with one tool call and sends the QR code or the checkout link in the conversation. See [AI agents](/guides/ai-agents.md).
- **Payments in your own product.** Your server creates a payment for an order and shows the QR code, or sends the customer to the hosted checkout. See the [Quick start](/quickstart.md).
- **Payment links.** A fixed-amount link you create in the dashboard or by API and paste anywhere. See [Payment links](/api/payment-links.md).

## How a payment works

1. Your server (or your agent's tool handler) calls `POST /v1/payments` with an amount, a currency and your own reference.
2. K-LINK Pay answers with a `qr_payload` to draw as a QR code and a `checkout_url` for the hosted checkout.
3. The customer pays from their banking or wallet app.
4. K-LINK Pay sends a signed `payment.succeeded` webhook to your server. Check the amount and reference against your order, then confirm it to the customer.

```bash
curl https://api.klinkpay.net/v1/payments \
  -H "Authorization: Bearer $KLINK_PAY_API_KEY" \
  -H "Idempotency-Key: order-1001" \
  -H "Content-Type: application/json" \
  -d '{"amount": 15200, "currency": "MMK", "reference": "order-1001"}'
```

Amounts are integers in the currency's smallest unit, and each payment is in the currency of one of your currency accounts. See [Amounts and currencies](/concepts/currencies.md).

## Addresses you will use

| What | Address | Used by |
|---|---|---|
| REST API | `https://api.klinkpay.net/v1` | Your server only. Never call it from a browser or a mobile app. |
| Dashboard | `https://app.klinkpay.net` | You: API keys, payments, payouts, currencies and webhooks. |
| Hosted checkout | `https://checkout.klinkpay.net` | Your customers, through the `checkout_url` of a payment. |
| Docs | `https://docs.klinkpay.net` | You and your coding agent. |

## Start here

| If you want to | Read |
|---|---|
| Take a first test payment in about ten minutes | [Quick start](/quickstart.md) |
| Create and store API keys | [Authentication and keys](/authentication.md) |
| Test without moving real money | [Test mode](/testing.md) |
| Let an AI agent take payments in a conversation | [AI agents](/guides/ai-agents.md) |
| Know when a payment is paid | [Webhooks](/guides/webhooks.md) |
| Look up an endpoint | [API reference](/api.md) |

## For coding agents

These docs are written to be read by coding agents such as Claude Code and Cursor as well as by people.

- [llms.txt](/llms.txt) is the index of every page, with short rules for integrating.
- [llms-full.txt](/llms-full.txt) is all the docs in one Markdown file.
- Every page is also Markdown: add `.md` to its URL, for example `https://docs.klinkpay.net/quickstart.md`.
- **Copy page** at the top of each page copies it as Markdown, ready to paste into a chat.

A prompt you can give your agent:

```text
Read https://docs.klinkpay.net/llms.txt, then add K-LINK Pay payments to this project:
create a payment for an order, show the QR code or redirect to checkout_url,
and mark the order paid from the payment.succeeded webhook after verifying its signature.
Use test keys (kp_test_...) from the environment variable KLINK_PAY_API_KEY.
```

## Related

- [Quick start](/quickstart.md)
- [API reference](/api.md)
- [Errors](/concepts/errors.md)
