Send Kaspi invoice to a phone
create_invoiceSend a Kaspi Pay invoice to the customer's phone number; the customer pays it in the Kaspi app. Amounts are whole tenge (KZT) as integers: 5000 means 5,000 tenge, no tiyn/decimals. Phone in E.164 (+77001234567). 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" (e.g. the number is not a Kaspi client). Use when you know the customer's Kaspi phone; for a scan-to-pay code use create_qr, for repeating charges use create_subscription. Returns the operation (id, status); follow it with get_operation until it is paid, cancelled 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>",
"phone": "<phone>"
},
"name": "create_invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| phone | Yes | Customer phone in E.164 format, e.g. +77001234567. Must be a Kaspi client. | |
| amount | Yes | Amount to charge. Integer, whole tenge (KZT). | |
| comment | No | Optional comment shown with the invoice, e.g. "Order #1025". | |
| 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). |