Payments, as a tool call.
In-App Payment for your Messaging Channels, built for AI Agents
Southeast Asia QR payments inside the conversation. Your AI agent sends a payment QR code or a payment link on Messenger, WhatsApp, LINE, Viber, Instagram, Telegram or web chat. The customer scans or taps and pays without leaving the chat, and a signed webhook tells your agent when it's paid.
Test mode the minute you sign up
Works in any channel where your agent can send an image or a link
- Messenger
- LINE
- Viber
- Telegram
- TikTok
- Website live chat
No native integration needed: the payment is a QR image or a link in the chat, so it works wherever your conversation happens.
How it works
From “I'll take it” to paid, in one conversation
The QR goes straight into the chat as an image, or the agent sends a link. Everything below works today, with the same API in test and live mode.
1. Your agent creates the payment
When the customer is ready to pay, your AI agent (or bot, or backend) calls the API as a tool call. The payment comes back with a qr_payload and a checkout_url.
POST /v1/payments2. It sends a QR or a link in the chat
The agent renders qr_payload into a PNG and sends it as an image message, or sends the checkout_url or a payment link, on whatever channel the customer is using.
qr_payload → PNG3. The customer scans or taps, and pays
They scan the QR with their banking or wallet app, or tap the link to open the mobile-first checkout in the channel's in-app browser, without leaving the conversation.
checkout_url4. Your agent confirms the order
K-LINK Pay sends a signed webhook. Only then does your agent confirm the order, in the same conversation.
payment.succeededBuilt for AI agents
Give your agent a create_payment tool
Agent builders such as klink.cloud let AI agents sell inside chat. K-LINK Pay is the payment step: a small, predictable API designed to be called by software that retries, runs unattended and must never double-charge.
A payment is one tool call
Expose create_payment to your LLM as a function. Your handler calls the K-LINK Pay API and gets back a QR payload and a checkout link for the agent to send.
A QR image or a link
Render qr_payload into a PNG and send it as an image message, or send checkout_url. Where the agent can only send a URL, a payment link works too.
Retries are safe
Send an Idempotency-Key of conversation + order id. If the agent or the network retries, it gets the same payment back, never a second charge.
Keys with only what the agent needs
A restricted key with payments:write and payments:read can't refund, read payouts or change your webhooks.
Build safely in test mode
Test keys work the minute you sign up. Simulate success or failure on the checkout and watch your agent react, without real money.
create_payment.json
{
"name": "create_payment",
"description": "Create a K-LINK Pay payment for the customer's confirmed order and return a checkout_url to send in this conversation. Call it only after the customer has confirmed the order and the total.",
"parameters": {
"type": "object",
"properties": {
"reference": {
"type": "string",
"description": "The id of the order being paid, e.g. order-1001."
},
"amount": {
"type": "integer",
"description": "The total you quoted to the customer, in the smallest currency unit (MMK has no decimals: 15200 = 15,200 MMK). Checked against the order on the server."
},
"description": {
"type": "string",
"description": "Short text shown on the checkout, e.g. 2 x Large milk tea."
}
},
"required": ["reference", "amount"]
}
}create_payment.js
// Your agent's tool handler (Node 18+). The model only picks the order;
// the amount always comes from your own order data.
async function create_payment({ reference, amount, description }, convo) {
const order = await orders.get(reference, { conversation: convo.id });
if (!order) return { error: "unknown_order" };
if (amount !== order.total) return { error: "amount_mismatch", total: order.total };
const res = await fetch("https://api.klinkpay.net/v1/payments", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.KLINK_PAY_AGENT_KEY}`, // rk_… payments:write
"Content-Type": "application/json",
// Same conversation + order = same payment, however often the agent retries.
"Idempotency-Key": `${convo.id}:${order.id}`,
},
body: JSON.stringify({
amount: order.total,
currency: "MMK",
reference: order.id,
description,
metadata: { conversation_id: convo.id, channel: convo.channel },
}),
});
const payment = await res.json();
if (!res.ok) return { error: payment.error.code };
// Send payment.qr_payload as a QR image in the chat, or the checkout_url as a link.
return { checkout_url: payment.checkout_url, expires_at: payment.expires_at };
}create-payment.sh
curl https://api.klinkpay.net/v1/payments \
-H "Authorization: Bearer kp_test_…" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-1001" \
-d '{
"amount": 15200,
"currency": "MMK",
"reference": "order-1001",
"description": "Table 4",
"return_url": "https://shop.example.com/orders/1001"
}'send-payment-qr.js
import QRCode from "qrcode";
// After POST /v1/payments: `payment` is the created payment.
async function sendPaymentInChat(convo, payment) {
// A PNG Buffer, large enough to scan from a phone screen.
const png = await QRCode.toBuffer(payment.qr_payload, { type: "png", width: 600, margin: 2 });
// Your channel client's image-message call (Messenger, WhatsApp, LINE, Viber, Telegram, web chat, …).
await channels.sendImage(convo.id, png, {
filename: `pay-${payment.id}.png`,
caption: `Scan to pay with your banking or wallet app, or tap: ${payment.checkout_url}`,
});
}
// Some channels only take an image URL, not a file: upload the PNG to your own storage
// first, or send the checkout_url / a payment link instead.payment.succeeded
POST /webhooks/klink-pay
Klink-Signature: t=1795773672,v1=5f2c…
{
"id": "evt_2Bc4De6Fg8Hi0Jk2Lm4No6",
"type": "payment.succeeded",
"livemode": true,
"data": {
"object": {
"id": "pay_4Nq7xY2mKc8vTz1aB3dE9f",
"status": "succeeded",
"amount": 15200,
"currency": "MMK",
"reference": "order-1001",
"metadata": { "conversation_id": "conv_8812" }
}
}
}Product
Everything around the payment, handled
Start with a payment link, grow into the API. The same account serves your agents, your website and your team.
Southeast Asia QR
QR payments built for Southeast Asia's national QR standards. Customers pay from the banking or wallet app they already use.
POST /v1/paymentsHosted checkout
A mobile-first payment page with your name, logo and colour, a live status, and a way to save the QR to pay on the same phone.
checkout_urlPayment links
Fixed-amount links you create in the dashboard or by API, ready to paste into any chat.
POST /v1/payment_linksSigned webhooks
HMAC-signed events, retried for 24 hours, with a delivery log you can replay from the dashboard.
Klink-SignaturePayouts to your bank
Successful payments are paid out to your own bank account, with a statement for every payout.
GET /v1/payoutsBuilt for safety
Two-factor sign-in for every user, roles for your team, restricted API keys and an audit trail.
payments:writePayment methods
Available payment methods
Every method runs on the same payments API and webhooks, so your agent's integration stays the same.
- Thailand

- Myanmar

- Indonesia

- Singapore

- Malaysia

- Vietnam

- Philippines

- Cambodia
- Laos

- Visa
- Mastercard

- One integration
- QR payments and cards all arrive as payments on the same API, with the same webhooks.
- Apps customers already have
- Customers pay from the banking or wallet app on their phone. There is nothing new to install.
- Set up with you
- Tell us which methods your customers use. Our team onboards your business for each one, and they all run on the same integration.
Need a method for your market? Contact sales and we will set it up for your business. You can also connect your own payment gateway, such as Stripe, and use it as AI agent tool calls across your messaging channels.
Pricing
Talk to us about pricing
Tell us about your agents, your channels and your volume, and we'll put together pricing for your business.
- Pricing built around your payment methods and volume
- Help choosing the payment methods for your market
- A reply by email from the K-LINK team
Want to try it first? Sign up: test mode is open straight away.
Questions
Something else? Send us a message.
Send your first payment QR in a chat today
Create an account, give your agent a test key and run a full chat-to-paid conversation in test mode: QR or link in the chat, simulated payment, webhook, confirmation.