Total YooKassa revenue, refunds and receipts right in chat
Connect YooKassa to the AI agent: payments, refunds, receipts and payment methods. The agent totals revenue for a period and sends a daily summary.
How the agent works with ЮKassa
The agent calls the YooKassa API version v3 and reads everything that belongs to accepting payments: the payments themselves and their statuses, refunds, fiscal receipts and payment methods. Its first request goes to /me and confirms whose shop is connected — so the summary does not turn out to be about a neighbouring shopId. After that it totals revenue for a period, cancellations and refunds, breaks down a single payment by date, amount or status and sends a summary on a schedule.
A refund in YooKassa is a separate object linked to a payment, not an edit of the payment itself. So the agent counts revenue as the payments of the period minus the refunds tied to them, and separately flags the refunds that arrived later than the original charge: otherwise the month closes prettier than it really is. And an accepted payment is not yet money on the current account: it reaches the account as a payout, and that is visible in the banking connector.
On this key pair the agent works read-only: it counts, matches and explains — ties refunds back to the original payments, shows which payment methods generate the most of them, and finds the payment the accounting department is asking about. Payouts are out of reach over the API: YooKassa Payouts is a separate product with its own agent_id and key, and the agent does not pretend it can dispose of the shop's money.
Access is a shopId and secret key pair: it is attached to every request and is bound to one shop only, so a summary is always about that shop and never about a neighbouring one. Webhook subscriptions cannot be set with this pair — notifications are configured in the YooKassa account — so the agent fetches data itself, on request and on a schedule, paging through the payment list with a cursor. If there is no data for the period, it says so directly instead of showing an empty table.
Integration scenarios
Revenue totals for a period
The agent totals payments for a period: how much went through, how much was canceled and how much was refunded, with no exports from the merchant account.
Breakdown of a single payment
The agent finds a payment by date, amount or status and shows the payment method, the fiscal receipt and the refunds linked to it.
Daily revenue summary
The agent posts a summary to your work chat on a schedule: revenue for the day, cancellations and refunds for the connected shop.
Refunds and what caused them
The agent collects refunds for a period, ties them back to the original payments and shows which payment methods generate the most.
Receipts behind the payments
The agent walks the payments of a period and names the ones with no fiscal receipt, so the gap surfaces before the accounting department asks about it.
Payments that never landed
The agent collects canceled and unfinished payments for a period and shows which payment methods customers drop off on most often.
ЮKassa examples
Вернули 214 800 ₽ — это 3,1% от выручки магазина.
Всего 37 возвратов, две трети по оплатам картой, остальное — СБП. Против июня доля выросла на 0,8 п.п.: почти весь прирост дал один товар, по нему 11 возвратов подряд.
How to connect
Before you connect
- A shop connected to YooKassa.
- The phone linked to the account: issuing a key is confirmed by SMS.
- 1
Sign in to YooKassa with the right role
API keys are available to the shop owner and to a user with the “Developer” role. Without it the keys section stays closed — ask the owner.
- 2
Copy shopId from Settings — Shop
Pick the shop at the top, then open “Settings — Shop”: the identifier is labelled shopId. Every shop, test ones included, has its own value.
- 3
Issue the key in Integration — API keys
Open “Integration — API keys”, click “Issue key” in the secret key block and confirm the action with the SMS password sent to the phone linked to the account.
- 4
Copy the key from the one-time window
The secret key is shown only once, in that window alone. Once closed you cannot view it again, only reissue it; the previous key works for 48 more hours.
FAQ
With a pair of values: the shopId from Settings and Shop, and the secret key from Integration, API keys, Issue key, confirmed with an SMS password. You need the owner or Developer role, otherwise the section will not open, and the key is shown only once.
Payments and their statuses, refunds, fiscal receipts and payment methods for the shop whose shopId is connected.
YooKassa is about collecting payments from customers: the agent sees payments and refunds, not your current account statement. Money reaches the account as a payout, and that is visible in the banking connector.
The payouts section and webhook subscriptions do not work with a shopId and secret key pair: payouts are a separate product with its own key, and notifications are configured in the YooKassa merchant account.