Для AI-агентов: markdown этой страницы — /docs/mcp-payments.mdиндекс документации — /llms.txt
MCP: payments
Обновлено
Определения инструментов. Обновляйте tools/list после изменения прав. required_scopes: ALL.
configure_payment_credentials
Configure (upsert) ONE payment provider for the tenant. Provide `credentials` — discriminated by `provider` (e.g. yookassa {shop_id, api_key}; stripe {secret_key, webhook_secret, currency?}; tochka {jwt, tochka_client_id, customer_code?, merchant_id?} — the Tochka webhook is registered by the platform, the owner pastes no address; getcourse {account, api_key} — the platform issues the callback secret and the answer carries the full callback address for the GetCourse «Вызвать URL» process; {rotate_callback_secret: true} alone issues a new address and the old one answers 401 at once) — plus optional `enabled` (default true) and `default_currency`. Credentials are stored server-side and NEVER returned by a read. Idempotent upsert on the tenant. The answer includes webhook_setup: relay its steps to the owner. OWNER-ONLY money-config: call it directly, or prepare_admin_action then execute_admin_write (secrets are passed again at execute, never held).
Scopes (ALL): ["payments:config"]. Risk: "money".
disable_payment_provider
Switch OFF one payment provider by `provider` (keeps the stored credentials — re-enable by reconfiguring). Idempotent — disabling an already-off/absent provider returns disabled:true. OWNER-ONLY money-config: call it directly, or prepare_admin_action then execute_admin_write.
Scopes (ALL): ["payments:config"]. Risk: "money".
enable_payment_provider
Switch ON one payment provider by `provider` WITHOUT sending credentials. This is how Telegram Stars (`stars`) is connected — it has no secrets, so it is not part of configure_payment_credentials. Also re-arms a credentialed provider that was switched off, reusing the secrets already on file. Idempotent — enabling an already-on provider returns enabled:true. The response `has_credentials:false` means the provider still needs configure_payment_credentials before checkout works. OWNER-ONLY money-config: call it directly, or prepare_admin_action then execute_admin_write.
Scopes (ALL): ["payments:config"]. Risk: "money".
get_payment_config
Read the tenant payment-provider config: each of the 11 providers (yookassa / stripe / robokassa / tinkoff / tochka / getcourse / prodamus / paypal / paddle / cryptobot / stars) with `enabled`, `has_credentials` (whether a secret is on file — the secret itself is NEVER returned), and `currency`, plus the tenant `default_currency`. OWNER-ONLY. 0-cost read.
Scopes (ALL): ["payments:config"]. Risk: "read".
issue_provider_credential_link
Issue a one-time link (valid 5 minutes) to the CRM page where the business owner enters the secrets of a payment provider (provider). Returns url, expires_at, status, webhook_setup (what the owner sets in the provider cabinet first, with our webhook address) and say_to_user to relay; never send the secrets through this API. A new link for the same provider revokes the previous one.
Scopes (ALL): ["payments:config"]. Risk: "write".
list_payment_rows
List payment records for the current tenant. Each record is addressed by its tenant-scoped `id` and references its customer and order as `user_id` and `order_id`; pass the last `id` as `after_id` for the next page. Each record is the payment view REST GET /payments serves: amount and amount_net, status, kind, is_paid, paid_at, cancelled_at, and provider_reference — the operation id as the payment provider knows it, to quote to its support (absent for a payment recorded by hand). This reads payments, not payment-provider configuration.
Scopes (ALL): ["payments"]. Risk: "read".
onboarding_check_payment_provider
Verify the current payment configuration and return specific remaining requirements. Optional: payment setup is not part of the mandatory onboarding path and never blocks onboarding_complete.
Scopes (ALL): ["payments:config"]. Risk: "write".
onboarding_confirm_payment_webhook
After the owner reviews the exact provider configuration, record their explicit webhook setup confirmation. This is owner attestation, not verification of a live callback. Optional: payment setup is not part of the mandatory onboarding path and never blocks onboarding_complete.
Scopes (ALL): ["payments:config"]. Risk: "money".
onboarding_connect_payment_provider
Save the selected payment provider configuration and verify readiness without charging the owner. The first accepted payment of at least 10 RUB secures the trial advance. Optional: payment setup is not part of the mandatory onboarding path and never blocks onboarding_complete.
Scopes (ALL): ["payments:config"]. Risk: "money".