计费
查看计费摘要、发票、交易和套餐操作。 示例使用 A2A 代码模式。MCP 通过execute 工具公开相同的代码模式。
函数
billing.current_plan.get
billing.current_plan.get.
| 属性 | 值 | 属性 | 值 |
|---|---|---|---|
| 所需权限 | billing.view | 需要身份验证 | 是 |
| 执行模式 | sync | 能力 | billing.view |
| 资源类型 | account | 资源 ID 字段 | account_id |
| 公共 API 路由 | GET /v1/public/accounts/{account_id}/billing/current-plan |
参数
参数
| 名称 | 类型 | 必需 |
|---|---|---|
account_id | str | 是 |
返回值
返回值
| 字段 | 类型 | 必需 |
|---|---|---|
billing_period | str | 是 |
currency | str | 是 |
plan_id | str | 是 |
plan_name | str | 是 |
price | str | 是 |
status | str | 是 |
can_cancel_plan | bool | 否 |
can_change_plan | bool | 否 |
A2A 示例
A2A 示例
请求:响应:
MCP 示例
MCP 示例
请求:响应:
billing.invoices.list
billing.invoices.list.
| 属性 | 值 | 属性 | 值 |
|---|---|---|---|
| 所需权限 | billing.view | 需要身份验证 | 是 |
| 执行模式 | sync | 能力 | billing.view |
| 资源类型 | account | 资源 ID 字段 | account_id |
| 公共 API 路由 | GET /v1/public/accounts/{account_id}/billing/invoices |
参数
参数
| 名称 | 类型 | 必需 |
|---|---|---|
account_id | str | 是 |
page | int | 否 |
page_size | int | 否 |
返回值
返回值
| 字段 | 类型 | 必需 |
|---|---|---|
items | [{"amount": str, "currency": str, "date": str, "download_url": str | null, "id": str, "status": str}] | 是 |
page | int | 是 |
page_size | int | 是 |
total | int | 是 |
A2A 示例
A2A 示例
请求:响应:
MCP 示例
MCP 示例
请求:响应:
billing.plan.cancel
billing.plan.cancel.
| 属性 | 值 | 属性 | 值 |
|---|---|---|---|
| 所需权限 | billing.manage | 需要身份验证 | 是 |
| 执行模式 | sync | 能力 | billing.manage |
| 资源类型 | account | 资源 ID 字段 | account_id |
| 公共 API 路由 | POST /v1/public/accounts/{account_id}/billing/cancel-plan |
参数
参数
| 名称 | 类型 | 必需 |
|---|---|---|
account_id | str | 是 |
cancel_at_period_end | bool | 否 |
cancel_immediately | bool | 否 |
返回值
返回值
| 字段 | 类型 | 必需 |
|---|---|---|
status | str | 是 |
account_status | str | null | 否 |
effective_at | str | null | 否 |
eligible | bool | null | 否 |
previous_plan_id | str | null | 否 |
target_plan_id | str | null | 否 |
A2A 示例
A2A 示例
请求:响应:
MCP 示例
MCP 示例
请求:响应:
billing.plan.change
billing.plan.change.
| 属性 | 值 | 属性 | 值 |
|---|---|---|---|
| 所需权限 | billing.manage | 需要身份验证 | 是 |
| 执行模式 | sync | 能力 | billing.manage |
| 资源类型 | account | 资源 ID 字段 | account_id |
| 公共 API 路由 | POST /v1/public/accounts/{account_id}/billing/change-plan |
参数
参数
| 名称 | 类型 | 必需 |
|---|---|---|
account_id | str | 是 |
plan_id | "smtp_per_mailbox" | "smtp_per_proxy" | 是 |
effective_date | str | null | 否 |
返回值
返回值
| 字段 | 类型 | 必需 |
|---|---|---|
status | str | 是 |
account_status | str | null | 否 |
effective_at | str | null | 否 |
eligible | bool | null | 否 |
previous_plan_id | str | null | 否 |
target_plan_id | str | null | 否 |
A2A 示例
A2A 示例
请求:响应:
MCP 示例
MCP 示例
请求:响应:
billing.transactions.list
billing.transactions.list.
| 属性 | 值 | 属性 | 值 |
|---|---|---|---|
| 所需权限 | billing.view | 需要身份验证 | 是 |
| 执行模式 | sync | 能力 | billing.view |
| 资源类型 | account | 资源 ID 字段 | account_id |
| 公共 API 路由 | GET /v1/public/accounts/{account_id}/billing/transactions |
参数
参数
| 名称 | 类型 | 必需 |
|---|---|---|
account_id | str | 是 |
page | int | 否 |
page_size | int | 否 |
返回值
返回值
| 字段 | 类型 | 必需 |
|---|---|---|
page | int | 是 |
page_size | int | 是 |
total | int | 是 |
items | [{"amount": str, "currency": str, "direction": str, "effective_at": str, "status": str, "transaction_id": str, "type": str, "balance_after"?: str | null, "description"?: str | null}] | 否 |
A2A 示例
A2A 示例
请求:响应:
MCP 示例
MCP 示例
请求:响应:
billing.wallet_balance.get
billing.wallet_balance.get.
| 属性 | 值 | 属性 | 值 |
|---|---|---|---|
| 所需权限 | billing.view | 需要身份验证 | 是 |
| 执行模式 | sync | 能力 | billing.view |
| 资源类型 | account | 资源 ID 字段 | account_id |
| 公共 API 路由 | GET /v1/public/accounts/{account_id}/billing/wallet-balance |
参数
参数
| 名称 | 类型 | 必需 |
|---|---|---|
account_id | str | 是 |
返回值
返回值
| 字段 | 类型 | 必需 |
|---|---|---|
accrued_charges | str | 是 |
balance | str | 是 |
currency | str | 是 |
net_balance | str | 是 |
A2A 示例
A2A 示例
请求:响应:
MCP 示例
MCP 示例
请求:响应: