Create Kaspi QR payment
create_qrCreate a Kaspi Pay QR payment for a given amount. Returns an operation with status "pending", qr_token (the link/QR to show the buyer; it lives about 5 minutes) and expires_at. Amounts are whole tenge (KZT) as integers: 5000 means 5,000 tenge, no tiyn/decimals. A payment is confirmed ONLY when the operation status is "paid"; creating a QR or invoice does not mean it was paid. Kaspi may refuse with status "failed" and failure_reason/failure_message. Use when the buyer scans a code on a screen or at the counter; to bill a known phone use create_invoice, for a reusable link use create_payment_link. Returns the operation (id, status, qr_token, expires_at); then follow it with get_operation until it is paid or expired.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"amount": "<amount>"
},
"name": "create_qr"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Amount to charge. Integer, whole tenge (KZT). | |
| comment | No | Optional comment, e.g. "Order #1024". | |
| metadata | No | Optional JSON object stored with the record and returned back (e.g. {"order_id": "1024"}). | |
| connection_id | No | Optional Kaspi connection (cash register) id. Only needed when the account has several connections. | |
| idempotency_key | No | Optional. Your own unique id for this request, e.g. the order number "order-1024". Repeating a call with the same idempotency_key returns the same result instead of creating a duplicate, so pass one whenever you might retry. If omitted, a random key is generated (then a retry WILL create a duplicate). |