Каталог инструментов MCP
Всего инструментов: 48. Ключ видит только те, на которые у него есть права.
Сводка#
| Инструмент | Права ключа | Риск | Подтверждение человеком |
|---|---|---|---|
automation_create | write + broadcast | broadcast | всегда |
channel_list | read | read | нет |
channel_plan_deploy | write + publish | publish | да, кроме ключа с auto_publish |
course_create | write | create | нет |
course_page_deploy | write + publish | publish | да, кроме ключа с auto_publish |
course_publish | write + publish | publish | да, кроме ключа с auto_publish |
create_invoice | write | money | нет |
create_payment_link | write | create | нет |
create_plan | write | create | нет |
customers_list | read | read | нет |
delivery_option_put | write | change | нет |
deploy_template | write + publish | publish | да, кроме ключа с auto_publish |
domain_add | write | create | нет |
domain_check | write | change | нет |
domain_list | read | read | нет |
get_payment | read | read | нет |
get_session_status | read | read | нет |
get_stats | read | read | нет |
lesson_create | write | create | нет |
lesson_replace | write | change | нет |
list_events | read | read | нет |
list_payments | read | read | нет |
list_subscribers | read | read | нет |
list_templates | read | read | нет |
module_create | write | create | нет |
offers_list | read | read | нет |
orders_list | read | read | нет |
payment_page_deploy | write + publish | publish | да, кроме ключа с auto_publish |
product_archive | write | change | нет |
product_create | write | create | нет |
product_image_attach | write | change | нет |
product_update | write | change | нет |
products_publish | write + publish | publish | да, кроме ключа с auto_publish |
request_refund | money | money | нет |
sales_summary | read | read | нет |
set_post_payment_action | write | change | нет |
site_build | write | create | нет |
site_check | read | read | нет |
site_publish | write + publish | publish | да, кроме ключа с auto_publish |
site_rollback | write + publish | publish | да, кроме ключа с auto_publish |
site_upload | write | create | нет |
site_versions | read | read | нет |
start_link_create | write | change | нет |
stats_show | read | read | нет |
stock_adjust | write | change | нет |
telegram_status | read | read | нет |
variant_add | write | change | нет |
variant_update | write | change | нет |
Риск: read читает, create создаёт черновик, change меняет, publish делает публичным, broadcast пишет клиентам, money двигает деньги. Правила подтверждений: MCP.
Инструменты#
automation_create#
Set up an automation
Set up an automatic reaction to an event, like a bot funnel step: when a payment arrives, an order is paid, a subscription starts, is about to end or ends, or a site visitor leaves a request, send the customer a Telegram message, tell the owner, or enrol the buyer in a course. It talks to customers, so the owner approves it with one click. Each call creates a new automation.
права: write, broadcast; риск: broadcast; подтверждение: всегда.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
bot_id | string | нет | The bot that sends the message (bot_... from telegram_status); required with message (pattern ^bot_[0-9a-fA-F]{32}$) |
course_id | string | нет | Enrol the buyer in this course (crs_...) when it happens |
message | string | нет | A plain text sent to the customer in Telegram (up to 1000 characters; {plan} and {period_end} work for subscriptions) (maxLength 1000) |
name | string | да | A short name for the automation, in the owner's language (minLength 1; maxLength 100) |
notify_me | string | нет | A plain text sent to the owner's own Telegram when it happens (up to 500 characters) (maxLength 500) |
when | string | да | payment_received, order_paid, subscription_started, subscription_ending, subscription_ended or lead_left (one of: payment_received, order_paid, subscription_started, subscription_ending, subscription_ended, lead_left) |
channel_list#
List channels
List the Telegram channels a paid subscription can be sold for (bot_id and channel_id for channel_plan_deploy).
права: read; риск: read; подтверждение: нет; только чтение.
Параметров нет.
channel_plan_deploy#
Sell access to a channel
Create or update the paid subscription to a Telegram channel: the bot sells periods of access at a price in whole tenge. The plan gets a public page (address paybot.kz/p/<subdomain>-<slug_word>: a path, not a subdomain of its own) that the business site sells it through. The bot and the channel must be connected in the cabinet (see channel_list).
права: write, publish; риск: publish; подтверждение: да, кроме ключа с auto_publish.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
bot_id | string | да | bot_... from channel_list (pattern ^bot_[0-9a-fA-F]{32}$) |
channel_id | string | да | chn_... from channel_list (pattern ^chn_[0-9a-fA-F]{32}$) |
grace_days | integer | нет | (minimum 0; maximum 30) |
period | string | да | (one of: day, week, month, quarter, half_year, year) |
plan_name | string | да | Tariff name shown to subscribers (minLength 1; maxLength 100) |
price_kzt | integer | да | Price of one period in whole tenge (minimum 100; maximum 10000000) |
slug_word | string | нет | One latin word for the plan's page address (default channel); the site subdomain is put in front. A site lists the plan through this page. (pattern ^[a-z0-9][a-z0-9-]{0,39}$) |
trial_days | integer | нет | (minimum 0; maximum 90) |
course_create#
Create a course
Create an online course (a draft: nothing is sold until course_page_deploy and course_publish).
права: write; риск: create; подтверждение: нет.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
description | string | нет | (maxLength 5000) |
title | string | да | (minLength 1; maxLength 200) |
course_page_deploy#
Put a course on sale
Create or update the public page that sells a course at a price in whole tenge (address paybot.kz/p/<subdomain>-<slug_word>: a path, not a subdomain of its own). Prices are set only here. A draft course is published with it (it needs at least one lesson), so course_publish is not needed before it.
права: write, publish; риск: publish; подтверждение: да, кроме ключа с auto_publish.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
course_id | string | да | (minLength 1; maxLength 64) |
lessons_fingerprint | string | нет | Set by PayBot; leave out (pattern ^[0-9a-f]{16}$) |
price_kzt | integer | да | Course price in whole tenge (minimum 100; maximum 10000000) |
slug_word | string | да | One latin word for the page address, e.g. course or yoga; the site subdomain is put in front (pattern ^[a-z0-9][a-z0-9-]{0,39}$) |
course_publish#
Publish a course
Publish a course so its page can sell it.
права: write, publish; риск: publish; подтверждение: да, кроме ключа с auto_publish.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
course_id | string | да | (minLength 1; maxLength 64) |
create_invoice#
Send a Kaspi invoice
Send a Kaspi Pay invoice to a payer's phone; the payer confirms it in the Kaspi app. Returns the payment: status pending while Kaspi waits for the payer, failed if Kaspi refused it, creating if Kaspi has not answered yet (then poll get_payment). A test-mode key creates a sandbox payment that no one pays. Idempotent by client_ref.
права: write; риск: money; подтверждение: нет; повтор безопасен.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
account_id | string | нет | Kaspi account (kac_...); the default account when absent; ignored in test mode (pattern ^kac_[0-9a-fA-F]{32}$) |
amount | integer | да | Amount in tiyn (1 KZT = 100 tiyn), a multiple of 100 (minimum 100; maximum 100000000) |
client_ref | string | да | Your unique reference, e.g. an order number. Calling again with the same client_ref returns the same payment instead of creating a second one (minLength 1; maxLength 200) |
description | string | нет | Shown to the payer; Kaspi displays about the first 60 characters (maxLength 2000) |
phone | string | да | The payer's Kaspi phone, e.g. +77001234567 (minLength 10; maxLength 20) |
create_payment_link#
Create a payment link
Create a link a buyer opens to pay with Kaspi. Either a one-off payment (amount, client_ref, optional description): a Kaspi QR payment whose pay_url opens the Kaspi app and expires after a few minutes; or a subscription (plan_id, subscriber_id): the payment for the subscription's next period (no payment when the plan starts with a trial). For a permanent page, deploy the payment_link template instead. Idempotent: the same client_ref, or the same plan and subscriber while the period is unpaid, returns the same payment.
права: write; риск: create; подтверждение: нет; повтор безопасен.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
account_id | string | нет | One-off payment: Kaspi account (kac_...); the default account when absent (pattern ^kac_[0-9a-fA-F]{32}$) |
amount | integer | нет | One-off payment: amount in tiyn (1 KZT = 100 tiyn), a multiple of 100 (minimum 100; maximum 100000000) |
client_ref | string | нет | One-off payment, required: your unique reference; calling again with it returns the same payment (minLength 1; maxLength 200) |
description | string | нет | One-off payment: what is paid for (maxLength 2000) |
plan_id | string | нет | Subscription: the plan (pln_...) to sell. Give plan_id and subscriber_id instead of amount (pattern ^pln_[0-9a-fA-F]{32}$) |
subscriber_id | string | нет | Subscription, required: your id for the buyer; the same plan and subscriber always name the same subscription (minLength 1; maxLength 100) |
create_plan#
Create a subscription plan
Create a subscription plan (a tariff): name, price per period, period, optional trial, grace and reminders. Plans are shared by live and test mode, so only a live key may create one (a test key gets live_key_required). Sell it with create_payment_link (plan_id) or the access_channel template. Each call creates a new plan.
права: write; риск: create; подтверждение: нет.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
active | boolean | нет | Whether the plan takes purchases now, default true |
grace_days | integer | нет | Days of access kept after a period ends unpaid, default 0 (minimum 0; maximum 30) |
name | string | да | Plan name shown to buyers (minLength 1; maxLength 200) |
period_count | integer | да | Length of a period: 1..365 days or 1..12 months (minimum 1; maximum 365) |
period_unit | string | да | day: count x 24 h; month: calendar months (one of: day, month) |
price | integer | да | Price of one period in tiyn (1 KZT = 100 tiyn), a multiple of 100 (minimum 100; maximum 100000000) |
reminder_offsets | array of integer | нет | Days before the end of a period to remind the subscriber; default [3, 1]; [] for none (maxItems 5) |
trial_days | integer | нет | Free trial days for a new subscriber, default 0 (minimum 0; maximum 90) |
customers_list#
Show customers
List the business's customers and contacts (leads from the site, bot users, buyers, students), newest first, with how much each has paid. Phones are masked. Use it for «покажи клиентов», «кто оставил заявку».
права: read; риск: read; подтверждение: нет; только чтение.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
limit | integer | нет | How many, newest first (1..50); default 20 (minimum 1; maximum 50) |
query | string | нет | Part of a name or Telegram username (maxLength 100) |
delivery_option_put#
Set a delivery option
Create or replace a delivery option of the store by its code (pickup, courier, ...).
права: write; риск: change; подтверждение: нет.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
code | string | да | Latin code of the option, e.g. pickup or courier (pattern ^[a-z0-9][a-z0-9_-]{0,63}$) |
details | string | нет | Address, hours, zone (maxLength 1000) |
free_over_kzt | integer | нет | courier_free_over: order total in tenge from which delivery is free (minimum 1; maximum 10000000) |
kind | string | да | pickup, courier, courier_free_over (free above an order total) or arrangement (agreed with the buyer) (one of: pickup, courier, courier_free_over, arrangement) |
price_kzt | integer | нет | Delivery price in whole tenge, 0 for free (minimum 0; maximum 10000000) |
title | string | да | Shown to buyers (minLength 1; maxLength 200) |
deploy_template#
Deploy a template
Deploy a template with a configuration valid against its JSON Schema (paybot://templates/{id}/schema; examples under paybot://examples/). Without deployment_id it creates a deployment; with it, it deploys a new version of that one (the same configuration again changes nothing). Only a live key may deploy (a test key gets live_only). The output can carry a show-once preview token for testing the page in the sandbox.
права: write, publish; риск: publish; подтверждение: да, кроме ключа с auto_publish.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
config | object | да | The configuration, a JSON object valid against the template's config schema |
deployment_id | string | нет | Update this deployment (its subject_id) instead of creating one (minLength 1; maxLength 100) |
template | string | да | Template id from list_templates, e.g. payment_link (maxLength 50; pattern ^[a-z][a-z0-9_]*$) |
domain_add#
Connect a domain
Connect the business's own domain to its site (or to one public page). Returns the exact DNS records the owner must create at their registrar: a TXT record that proves ownership, and a CNAME to the platform host (for a subdomain such as shop.example.kz) or A/AAAA records (for an apex such as example.kz). Cloudflare users must set the record to DNS only (grey cloud). Then call domain_check. A live key is required; the plan's limit is refused with plan_limit_reached.
права: write; риск: create; подтверждение: нет.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
hostname | string | да | The name to connect, e.g. shop.example.kz or example.kz (no https://, no path, no wildcard, no IP address) (maxLength 253) |
page_slug | string | нет | Open one of the business's public pages (its address) instead of the site (maxLength 48) |
redirect_www | boolean | нет | Redirect the www/apex partner name here; works once the partner is connected and verified as a domain of its own |
domain_check#
Check a domain's DNS now
Look the domain's DNS records up now instead of waiting for the scheduled check (once every 30 seconds at most). It is checked by itself every minute for 30 minutes after it is added, then every 15 minutes for up to 72 hours. The answer says which record is missing or wrong.
права: write; риск: change; подтверждение: нет.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
id | string | да | The domain id (dom_...) from domain_list or domain_add (maxLength 64) |
domain_list#
List the business's own domains
List the custom domains of the business with their state (pending_dns, active, error, disabled), what each opens, the DNS records still to create (TXT proof and CNAME or A/AAAA) and the plan's allowance. Custom domains are in the Профессиональный and Бизнес plans.
права: read; риск: read; подтверждение: нет; только чтение.
Параметров нет.
get_payment#
Get a payment
Get one payment by id: status, amount, pay links, failure reason. A key sees only payments of its own mode.
права: read; риск: read; подтверждение: нет; только чтение.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
payment_id | string | да | Payment id (pay_...) (pattern ^pay_[0-9a-fA-F]{32}$) |
get_session_status#
Kaspi connection status
Say whether the key works in test mode (sandbox) or live, and the state of the merchant's Kaspi cashier accounts (active, degraded, expired, reauth_required, ...). Live payments need an active account; logging in again happens in the cabinet.
права: read; риск: read; подтверждение: нет; только чтение.
Параметров нет.
get_stats#
Payment statistics
Count the key's mode's payments by status, with their total amounts in tiyn, optionally since a time. paid_amount is what buyers paid (refunded payments are counted apart).
права: read; риск: read; подтверждение: нет; только чтение.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
since | string | нет | Count payments created at or after this time (RFC 3339); all of them when absent (maxLength 64; format date-time) |
lesson_create#
Add a lesson
Add a lesson at the end of a module: text, or a link to a video.
права: write; риск: create; подтверждение: нет.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
course_id | string | да | (minLength 1; maxLength 64) |
drip_days | integer | нет | Open the lesson this many days after purchase; absent opens it at once (minimum 0; maximum 365) |
kind | string | да | text: the lesson is text; video_url: a link to a video (YouTube, Kinescope, ...) (one of: text, video_url) |
module_id | string | да | The module (from module_create) (minLength 1; maxLength 64) |
text | string | нет | Lesson text (kind text) (maxLength 100000) |
title | string | да | (minLength 1; maxLength 200) |
video_url | string | нет | https link (kind video_url) (maxLength 2000; pattern ^https://) |
lesson_replace#
Rewrite a lesson
Replace a lesson's title and content (and move it to module_id).
права: write; риск: change; подтверждение: нет.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
course_id | string | да | (minLength 1; maxLength 64) |
drip_days | integer | нет | (minimum 0; maximum 365) |
kind | string | да | text or video_url (one of: text, video_url) |
lesson_id | string | да | (minLength 1; maxLength 64) |
module_id | string | нет | Move the lesson to this module; absent keeps it (minLength 1; maxLength 64) |
text | string | нет | (maxLength 100000) |
title | string | да | (minLength 1; maxLength 200) |
video_url | string | нет | (maxLength 2000; pattern ^https://) |
list_events#
List events
List what happened, newest first: the events of the key's mode that webhooks deliver (payment.success, payment.failed, subscription.activated, approval.requested, ...), with their data.
права: read; риск: read; подтверждение: нет; только чтение.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
cursor | string | нет | next_cursor of the previous page (maxLength 64) |
limit | integer | нет | Page size, 1..100, default 25 (minimum 1; maximum 100) |
type | string | нет | Only events of this type, e.g. payment.success (maxLength 100; pattern ^[a-z_]+(\.[a-z_]+)+$) |
list_payments#
List payments
List the merchant's payments of the key's mode, newest first, optionally by status or kind. Page with next_cursor.
права: read; риск: read; подтверждение: нет; только чтение.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
cursor | string | нет | next_cursor of the previous page (maxLength 64) |
kind | string | нет | Only invoices or only QR payments (one of: invoice, qr) |
limit | integer | нет | Page size, 1..100, default 25 (minimum 1; maximum 100) |
status | array of string | нет | Only payments in these statuses (maxItems 6) |
list_subscribers#
List subscribers
List subscriptions of the key's mode, newest first: who is subscribed to which plan, their status (pending, trial, active, grace, cancelled, ended) and current period.
права: read; риск: read; подтверждение: нет; только чтение.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
cursor | string | нет | next_cursor of the previous page (maxLength 64) |
limit | integer | нет | Page size, 1..100, default 25 (minimum 1; maximum 100) |
plan_id | string | нет | Only this plan's subscribers (pln_...) (pattern ^pln_[0-9a-fA-F]{32}$) |
status | string | нет | Only subscriptions in this status (one of: pending, trial, active, grace, cancelled, ended) |
subscriber_id | string | нет | Only this subscriber (minLength 1; maxLength 100) |
list_templates#
List templates
List the templates that can be deployed (payment pages, course pages, paid channels) with the resource holding each one's configuration JSON Schema.
права: read; риск: read; подтверждение: нет; только чтение.
Параметров нет.
module_create#
Add a module
Add a module (a chapter) at the end of a course.
права: write; риск: create; подтверждение: нет.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
course_id | string | да | The course (from course_create) (minLength 1; maxLength 64) |
title | string | да | (minLength 1; maxLength 200) |
offers_list#
List what is sold
List everything the business sells: store products (with the lowest variant price; status hidden = off sale, put on sale with products_publish; each product lists its variants with variant_id, which is what variant_update and stock_adjust take: a product's own id is not a variant id), course pages, paid channels and payment pages.
права: read; риск: read; подтверждение: нет; только чтение.
Параметров нет.
orders_list#
Show orders
List the business's orders, newest first: status, buyer name, total in whole tenge and what was bought. Phone numbers are not included. Use it for «покажи заказы» and to find an order by its buyer or status.
права: read; риск: read; подтверждение: нет; только чтение.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
days | integer | нет | Only orders of the last N days (1..365); default 30 (minimum 1; maximum 365) |
limit | integer | нет | How many, newest first (1..50); default 20 (minimum 1; maximum 50) |
status | string | нет | Only orders in this status (new, paid, packed, shipped, done, cancelled); empty: all (one of: new, paid, packed, shipped, done, cancelled) |
payment_page_deploy#
Publish a payment page
Publish a page where a buyer pays a fixed amount in whole tenge with Kaspi (address paybot.kz/p/<subdomain>-<slug_word>: a path, not a subdomain of its own).
права: write, publish; риск: publish; подтверждение: да, кроме ключа с auto_publish.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
amount_kzt | integer | да | Fixed amount in whole tenge (minimum 100; maximum 10000000) |
collect_phone | boolean | нет | The payer enters a phone and gets a Kaspi invoice instead of a QR |
description | string | нет | (maxLength 2000) |
slug_word | string | да | One latin word for the page address; the site subdomain is put in front (pattern ^[a-z0-9][a-z0-9-]{0,39}$) |
success_message | string | нет | (maxLength 500) |
title | string | да | (minLength 1; maxLength 200) |
product_archive#
Archive a product
Take a product off sale (archive it).
права: write; риск: change; подтверждение: нет.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
product_id | string | да | prd_... (pattern ^prd_[0-9a-fA-F]{32}$) |
product_create#
Create a product
Create a product in the store with its variants (each with a price in whole tenge). Returns its id (prd_...). The product is created hidden (off sale): after creating all the products, call products_publish once with all their ids so the merchant approves them and their prices with one click.
права: write; риск: create; подтверждение: нет.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
description | string | нет | Plain-text description (maxLength 5000) |
handle | string | да | Latin address of the product: lowercase letters, digits, - and _, e.g. green-tea (pattern ^[a-z0-9][a-z0-9_-]{0,63}$) |
image_upload_ids | array of string | нет | Images the merchant uploaded (upl_...) (maxItems 8) |
title | string | да | Product name (minLength 1; maxLength 200) |
variants | array of object | да | At least one variant; a product with one price has one variant (minItems 1; maxItems 50) |
product_image_attach#
Attach an image
Add an image the merchant uploaded to a product (at the end of its images).
права: write; риск: change; подтверждение: нет.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
product_id | string | да | prd_... (pattern ^prd_[0-9a-fA-F]{32}$) |
upload_id | string | да | An image the merchant uploaded (upl_...) (pattern ^upl_[0-9a-fA-F]{32}$) |
product_update#
Edit a product
Change a product's title or description.
права: write; риск: change; подтверждение: нет.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
description | string | нет | (maxLength 5000) |
product_id | string | да | prd_... (pattern ^prd_[0-9a-fA-F]{32}$) |
title | string | нет | (minLength 1; maxLength 200) |
products_publish#
Put products on sale
Put hidden products on sale, in one approval card that lists each product with its prices. Call it once for a batch of products, after product_create and variant_add.
права: write, publish; риск: publish; подтверждение: да, кроме ключа с auto_publish.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
product_ids | array of string | да | The products to put on sale (prd_...), usually every product created in this conversation (minItems 1; maxItems 50) |
request_refund#
Ask for a refund
Ask for a full refund of a paid payment. This NEVER refunds by itself: it creates an approval that a person must approve in the PayBot cabinet (approve_url); only then does Kaspi refund. Returns the pending approval. One open refund request per payment.
права: money; риск: money; подтверждение: нет.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
payment_id | string | да | The paid payment to refund (pay_...) (pattern ^pay_[0-9a-fA-F]{32}$) |
reason | string | нет | Why, shown to the person who decides (maxLength 500) |
sales_summary#
Sales summary
Sales of a period: how many orders by status, paid revenue in whole tenge and the best-selling items. Use it for «как идут продажи», «сколько заработал».
права: read; риск: read; подтверждение: нет; только чтение.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
days | integer | нет | Period in days (1..365); default 30 (minimum 1; maximum 365) |
mode | string | нет | live, test or all; default live (or the key's own mode) (one of: live, test, all) |
set_post_payment_action#
Add an automation rule
Create a rule that runs actions when an event happens, by default when a payment is paid (trigger payment.success): call a webhook, grant or revoke channel access, send a Telegram message. Triggers, condition fields and action objects are described in paybot://rules/catalog. Each call creates a new rule.
права: write; риск: change; подтверждение: нет.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
actions | array of object | да | Action objects with a type, e.g. {"type":"call_webhook","url":"https://...","secret_ref":"whk_..."} (minItems 1; maxItems 10) |
conditions | array of object | нет | All must hold (AND); none means always (maxItems 10) |
enabled | boolean | нет | Default true |
name | string | да | A name for the rule (minLength 1; maxLength 200) |
stop_on_failure | boolean | нет | When an action fails for good, skip the rest |
trigger | string | нет | The event that fires the rule; default payment.success (one of: payment.success, payment.failed, payment.expired, payment.refunded, session.expired, approval.requested, approval.decided, subscription.activated, subscription.renewed, subscription.expiring, subscription.ended, order.created, order.paid, order.shipped, order.refunded, order.paid_after_cancel, order.status_changed, bitrix.deal_stage_changed, lead.created) |
site_build#
Build the site
Ask the site builder to create or change the business's site from a brief. The result is a preview, not public; the site shows the store's products, courses and channels with their real prices by itself. Takes a few minutes.
права: write; риск: create; подтверждение: нет.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
brief | string | да | What the site should be: the business, its offers (by name, never prices), sections, style, in the merchant's words (minLength 10; maxLength 4000) |
site_check#
Check the published site
Open the published site the way a visitor does and report what works: the page is served, its files exist, every pay button points at something on sale, the lead form's endpoint answers. Run it after every site_publish.
права: read; риск: read; подтверждение: нет; только чтение.
Параметров нет.
site_publish#
Publish the site
Publish one version of the site at <subdomain>.paybot.kz. The publish is refused if the site changed after the merchant approved it.
права: write, publish; риск: publish; подтверждение: да, кроме ключа с auto_publish.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
version_id | string | нет | The version to publish (version_id from site_build's result); left out, PayBot pins the version the preview shows now (pattern ^[0-9a-fA-F-]{36}$) |
site_rollback#
Roll the site back to a version
Put an earlier uploaded version live again (the previous one is kept). Same approval rules as site_publish.
права: write, publish; риск: publish; подтверждение: да, кроме ключа с auto_publish.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
version_id | string | да | The version (site_upload or site_versions result) to put live (pattern ^[0-9a-fA-F-]{36}$) |
site_upload#
Upload your own site
Upload a finished STATIC site (html, css, js, images, fonts; no server code, at most 20 MiB and 2000 files) as an archive or as files. It is stored as a new version and is NOT public yet: put it live with site_publish. Read paybot://docs/site-sdk first: pay buttons, the lead form and UTM capture come from <script src="/__pb/paybot.js"> and data-paybot-* attributes.
права: write; риск: create; подтверждение: нет.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
archive_base64 | string | нет | A .zip, .tar or .tar.gz of the finished static site, base64-encoded (index.html at the top, or inside one folder) (maxLength 10485760) |
files | array of object | нет | Alternatively the files themselves; give either files or archive_base64 (maxItems 300) |
note | string | нет | A short label for this version, e.g. first draft (maxLength 200) |
site_versions#
List uploaded site versions
List the uploaded versions of the site, newest first, and which one is live.
права: read; риск: read; подтверждение: нет; только чтение.
Параметров нет.
start_link_create#
Make a Telegram start link
Make the public t.me link that opens the bot on a paid channel's offer. It replaces the previous public link of that channel. product_id is the plan's id from channel_plan_deploy's executed result or offers_list; a plan still waiting for approval has none yet. Not needed for selling: the plan's page and the site already sell it.
права: write; риск: change; подтверждение: нет.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
product_id | string | да | The paid channel (prd_..., the deployment id from channel_plan_deploy) (pattern ^prd_[0-9a-fA-F]{32}$) |
stats_show#
Show statistics
Show how a store, course, channel or bot is doing over today, 7 or 30 days: visits, what people did next (opened a product, started paying, paid), where they came from and, for a course, how far students got. Visits are anonymous counts of the business's own pages and are not people with names. Numbers come from the business's own records; report them as given and say plainly when nothing happened yet. Never guess a figure that is not in the result.
права: read; риск: read; подтверждение: нет; только чтение.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
id | string | нет | The object's id from a previous stats_show or offers_list; left out and the business has one object of that kind, that one is shown (maxLength 64) |
object | string | нет | What to show: store (the shop and the site), course, channel or bot; left out, every object is listed with its main numbers (one of: store, course, channel, bot) |
period | string | нет | today, 7d or 30d; default 7d (one of: today, 7d, 30d) |
stock_adjust#
Adjust stock
Add or remove units of a variant's stock.
права: write; риск: change; подтверждение: нет.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
delta | integer | да | Units to add (positive) or remove (negative) (minimum -100000; maximum 100000) |
note | string | нет | (maxLength 200) |
variant_id | string | да | The variant id (prd_...) (pattern ^prd_[0-9a-fA-F]{32}$) |
telegram_status#
Telegram status
List the business's connected Telegram bots and the channels each one manages, with what rights the bot still lacks.
права: read; риск: read; подтверждение: нет; только чтение.
Параметров нет.
variant_add#
Add a variant
Add a variant (a size, a pack, a tariff) with its own price to an existing product. On a product already on sale this changes what buyers see.
права: write; риск: change; подтверждение: нет.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
price_kzt | integer | да | Price in whole tenge (minimum 1; maximum 10000000) |
product_id | string | да | prd_... (pattern ^prd_[0-9a-fA-F]{32}$) |
sku | string | нет | Stock-keeping code; made from the product handle when absent (pattern ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$) |
stock | integer | нет | Units on hand; ignore for made-to-order items (minimum 0; maximum 1000000) |
title | string | да | Variant name shown to buyers, e.g. 100 g or Size M (minLength 1; maxLength 200) |
untracked | boolean | нет | Stock is not counted (made on demand, digital, a service) |
variant_update#
Edit a variant
Change a variant's title, price (whole tenge) or whether its stock is counted.
права: write; риск: change; подтверждение: нет.
| Параметр | Тип | Обязателен | Описание |
|---|---|---|---|
price_kzt | integer | нет | New price in whole tenge (minimum 1; maximum 10000000) |
title | string | нет | (minLength 1; maxLength 200) |
track_stock | boolean | нет | |
variant_id | string | да | The variant id (prd_...) from the product (pattern ^prd_[0-9a-fA-F]{32}$) |