You ask in plain language and the AI app picks SePay MCP tools and parameters to answer. When the AI app says it can't read some data, find the tool for your question in the tables to see which permission group to turn on.
This page is a summary. Developers who need the full schema (types, a description of each parameter) can call tools/list on https://my.sepay.vn/mcp without signing in.
SePay MCP has exactly one write action: resending a webhook, which runs only when you grant the Gửi lại webhook (có xác nhận) (resend webhooks, with approval) group and click Duyệt (Approve) on my.sepay.vn for each send. The other tools never change data. No tool returns an account balance. Configured webhooks come back without their secret key.
Example: revenue this month vs last month
On 31 October you ask: "How does revenue this month compare with last month, counting by payment code?"
The AI app calls get_cashflow_report once for both months, split by month, counting only transactions with a payment code:
Parameters the AI sends:
{"period": "month","basis": "with_code","from_date": "2026-09-01","to_date": "2026-10-31"}
Result (shortened, sample figures):
{"report": {"basis": "with_code","period": "month","from_date": "2026-09-01","to_date": "2026-10-31","total_in": 182500000,"count_in": 412,"by_bank_account": [{"bank_account": { "xid": "ba_7Kq2", "bank_name": "VietinBank", "account_number": "****6789", "label": "Tài khoản bán hàng" },"in": 176300000}],"gateway_in": 6200000,"gateway_count": 9,"timeline": [{ "period": "2026-09", "in": 95000000 },{ "period": "2026-10", "in": 87500000 }],"includes_gateway": true,"notes": ["Tiền cổng thanh toán chuyển về tài khoản đã liên kết khác (nếu có) đã nằm trong số tiền của tài khoản đó, có thể trùng với phần thanh toán qua cổng."]},"hidden_fields": ["bank_account.account_number"]}
From timeline, the AI app answers: September brought in 95,000,000 VND, October 87,500,000 VND, 7,500,000 VND less (about 7.9%). basis is how revenue is counted: with_code adds only transactions with a payment code, including money in through the payment gateway by card and NAPAS (gateway_in); all_in adds all money in and out (cash flow, internal transfers included); via_va adds only money in through virtual accounts. The notes text comes back in Vietnamese.
Permissions needed to use the tools
Docs tools (list_docs, fetch_content) work as soon as you add SePay to the AI app, without signing in to SePay.
The other tools read your company's data. To use one, you grant access when connecting and turn on the tool's permission group. A Người dùng bình thường (regular user) account also needs view permission for the matching SePay feature; without it the tool doesn't appear in the AI app. Permission groups and feature permissions are in SePay MCP permissions and security.
The invoice reconciliation tool get_einvoice_reconciliation needs both the Xem hóa đơn điện tử (view e-invoices) and Xem giao dịch (view transactions) groups.
SePay docs tools
| Tool | Permission group | Sample question |
|---|---|---|
list_docs | Not needed | "What doc groups does SePay have?" |
fetch_content | Not needed | "How do I integrate SePay webhooks in detail?" |
The AI app usually calls list_docs to find a page, then fetch_content to read it on developer.sepay.vn.
Transaction tools
| Tool | Permission group | Sample question |
|---|---|---|
list_transactions | Xem giao dịch (view transactions) | "List 10 incoming transactions today." / "Has order DH00012 been paid?" |
get_transaction_summary | Xem giao dịch | "How many times did customer Nguyen Van A pay this month, and how much in total?" |
get_transaction | Xem giao dịch | "Show the details of the second transaction in that list." |
get_cashflow_report | Xem giao dịch | "How does revenue this month compare with last month?" / "Close yesterday's morning shift for the Quầy 1 point of sale." |
payment_code is the order code the payer writes in the transfer content, for example DH00012. When you ask about an order, the AI app filters transactions by this code. payment_status is paid when the transaction has a payment code and automatic verification succeeded, unpaid when it has a payment code but automatic verification has not succeeded, and no_code when the transfer has no payment code. Content, reference numbers and outgoing transactions are hidden if you turned on hide options when granting access.
One tool per job: list_transactions returns only the list, with no totals. The count and total amount for exactly one filter ("how many times did customer A pay, how much in total") come from get_transaction_summary. Revenue and cash flow by period, point of sale or shift come only from get_cashflow_report; get_transaction_summary is not used to compute revenue.
Bank account and VA tools
| Tool | Permission group | Sample question |
|---|---|---|
list_bank_accounts | Xem tài khoản ngân hàng (view bank accounts) | "Which bank accounts have I connected?" |
get_bank_account | Xem tài khoản ngân hàng | "Is my ACB account still connected?" |
list_virtual_accounts | Xem tài khoản ảo (VA) | "List the virtual accounts of my BIDV account." |
With Ẩn số tài khoản (hide account number) on, account numbers show only the last 4 digits.
Plan quota tool
| Tool | Permission group | Sample question |
|---|---|---|
get_plan_quota | Xem hạn mức gói (view plan quota) | "How much quota does my plan have left?" / "How many e-invoices can I still issue?" |
get_plan_quota returns the quota of the SePay plan (transactions: the current counting cycle, used, limit and remaining) and of e-invoices (invoices issued: invoices issued so far and remaining, no cycle). Only SuperAdmin and Admin accounts can use this tool. For a Người dùng bình thường (regular user) account, the AI app doesn't see the plan quota tool.
Webhook tools
| Tool | Permission group | Sample question |
|---|---|---|
list_webhook_logs | Xem lịch sử webhooks (view webhook history) | "Did any webhook fail this week?" |
get_webhook_report | Xem lịch sử webhooks | "What is my webhook error rate this month?" |
list_webhooks | Xem webhooks đã cấu hình (view configured webhooks) | "Which webhooks have I configured?" |
get_webhook | Xem webhooks đã cấu hình | "Which URL does this webhook send to, and how is it authenticated?" |
list_webhook_logs returns the event, status, HTTP code, time and transaction of each delivery, so it answers "which transactions had webhook errors recently". Logs don't include the receiving URL. To find where a webhook sends, the AI app also calls list_webhooks or get_webhook; the URL there keeps only the domain, for example https://abc.example.com/…, with the path and parameters hidden.
Resend a webhook (write action)
| Tool | Permission group | Sample question |
|---|---|---|
replay_webhook | Gửi lại webhook (có xác nhận) (resend webhooks, with approval) | "Resend the failed webhook for order DH00012." |
replay_webhook resends one failed webhook delivery, only after you click Duyệt (Approve) on my.sepay.vn. Permissions, how to approve and the results it returns are in Resend a webhook through SePay MCP.
Payment gateway tools
| Tool | Permission group | Sample question |
|---|---|---|
list_pg_orders | Xem đơn cổng thanh toán (view payment gateway orders) | "How many orders were paid through the payment gateway this week, and how much in total?" |
get_pg_order | Xem đơn cổng thanh toán | "Has gateway order DH1001 been paid, and was anything refunded?" |
list_pg_orders gives gateway order figures (orders created, paid, cancelled). Company revenue, including money in through the gateway, comes from get_cashflow_report; the AI app never adds the two together. Card numbers show only the last 4 digits, without the cardholder name.
E-invoice tools
| Tool | Permission group | Sample question |
|---|---|---|
list_einvoices | Xem hóa đơn điện tử (view e-invoices) | "How many invoices did I issue this month, and for how much?" |
get_einvoice | Xem hóa đơn điện tử | "Has invoice DH1001 been adjusted or replaced?" |
get_einvoice_reconciliation | Xem hóa đơn điện tử and Xem giao dịch | "Which payments in October have no invoice yet?" |
The total of list_einvoices never counts an original invoice and its replacement twice. get_einvoice also returns the chain of related original, replacement and adjustment invoices. The result of get_einvoice_reconciliation is a suggestion for you to confirm. One sure way to match a payment with an invoice is reference_code, so set it following the reference code convention. Check the remaining invoice quota with get_plan_quota.
Next steps
- See permission groups, feature permissions and hide options in SePay MCP permissions and security.
- Choose an AI app and manage connections in the SePay MCP overview.