Billing
Review billing summaries, invoices, transactions, and plan operations. The examples use A2A code mode. MCP exposes the same code mode through itsexecute tool.
Functions
billing.current_plan.get
| Property | Value | Property | Value |
|---|---|---|---|
| Requires permission | billing.view | Auth required | yes |
| Execution mode | sync | Capability | billing.view |
| Resource type | account | Resource ID field | account_id |
| Public API route | GET /v1/public/accounts/{account_id}/billing/current-plan |
Arguments
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
account_id | str | yes | Account UUID from the route path |
Returns
Returns
| Field | Type | Required | Description |
|---|---|---|---|
billing_period | str | yes | Billing period for the current plan |
currency | str | yes | Billing currency code |
plan_id | str | yes | Current billing plan ID |
plan_name | str | yes | Current billing plan name |
price | str | yes | Current plan price |
status | str | yes | Current plan status |
can_cancel_plan | bool | no | Whether the plan can be cancelled |
can_change_plan | bool | no | Whether the plan can be changed |
A2A example
A2A example
Request:Response:
MCP example
MCP example
Request:Response:
billing.invoices.list
| Property | Value | Property | Value |
|---|---|---|---|
| Requires permission | billing.view | Auth required | yes |
| Execution mode | sync | Capability | billing.view |
| Resource type | account | Resource ID field | account_id |
| Public API route | GET /v1/public/accounts/{account_id}/billing/invoices |
Arguments
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
account_id | str | yes | Account UUID from the route path |
page | int | no | One-based billing page number |
page_size | int | no | Maximum billing records per page |
Returns
Returns
| Field | Type | Required | Description |
|---|---|---|---|
items | [{"amount": str, "currency": str, "date": str, "download_url": str | null, "id": str, "status": str}] | yes | Invoices on this page |
page | int | yes | Current one-based page number |
page_size | int | yes | Maximum items per page |
total | int | yes | Total matching invoices |
A2A example
A2A example
Request:Response:
MCP example
MCP example
Request:Response:
billing.plan.cancel
| Property | Value | Property | Value |
|---|---|---|---|
| Requires permission | billing.manage | Auth required | yes |
| Execution mode | sync | Capability | billing.manage |
| Resource type | account | Resource ID field | account_id |
| Public API route | POST /v1/public/accounts/{account_id}/billing/cancel-plan |
Arguments
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
account_id | str | yes | Account UUID from the route path |
cancel_at_period_end | bool | no | Cancel the plan at the end of the billing period |
cancel_immediately | bool | no | Cancel the plan immediately |
Returns
Returns
| Field | Type | Required | Description |
|---|---|---|---|
status | str | yes | Billing operation status |
account_status | str | null | no | Account status after the operation |
effective_at | str | null | no | When the billing change took effect |
eligible | bool | null | no | Whether the account was eligible for the operation |
previous_plan_id | str | null | no | Previous billing plan ID |
target_plan_id | str | null | no | Target billing plan ID |
A2A example
A2A example
Request:Response:
MCP example
MCP example
Request:Response:
billing.plan.change
| Property | Value | Property | Value |
|---|---|---|---|
| Requires permission | billing.manage | Auth required | yes |
| Execution mode | sync | Capability | billing.manage |
| Resource type | account | Resource ID field | account_id |
| Public API route | POST /v1/public/accounts/{account_id}/billing/change-plan |
Arguments
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
account_id | str | yes | Account UUID from the route path |
plan_id | "smtp_per_mailbox" | "smtp_per_proxy" | yes | Target billing plan ID |
effective_date | str | null | no | Requested effective date for the plan change |
Returns
Returns
| Field | Type | Required | Description |
|---|---|---|---|
status | str | yes | Billing operation status |
account_status | str | null | no | Account status after the operation |
effective_at | str | null | no | When the billing change took effect |
eligible | bool | null | no | Whether the account was eligible for the operation |
previous_plan_id | str | null | no | Previous billing plan ID |
target_plan_id | str | null | no | Target billing plan ID |
A2A example
A2A example
Request:Response:
MCP example
MCP example
Request:Response:
billing.transactions.list
| Property | Value | Property | Value |
|---|---|---|---|
| Requires permission | billing.view | Auth required | yes |
| Execution mode | sync | Capability | billing.view |
| Resource type | account | Resource ID field | account_id |
| Public API route | GET /v1/public/accounts/{account_id}/billing/transactions |
Arguments
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
account_id | str | yes | Account UUID from the route path |
page | int | no | One-based billing page number |
page_size | int | no | Maximum billing records per page |
Returns
Returns
| Field | Type | Required | Description |
|---|---|---|---|
page | int | yes | Current one-based page number |
page_size | int | yes | Maximum items per page |
total | int | yes | Total matching wallet transactions |
items | [{"amount": str, "currency": str, "direction": str, "effective_at": str, "status": str, "transaction_id": str, "type": str, "balance_after"?: str | null, "description"?: str | null, "line_items"?: [{"amount_cents": int, "component_type": str, "currency": str, "description": str, "quantity": str, "source": str, "unit": str, "unit_price_cents": str, "metadata"?: {}, "period_end"?: str | null, "period_start"?: str | null}]}] | no | Wallet transactions on this page |
A2A example
A2A example
Request:Response:
MCP example
MCP example
Request:Response:
billing.wallet_balance.get
| Property | Value | Property | Value |
|---|---|---|---|
| Requires permission | billing.view | Auth required | yes |
| Execution mode | sync | Capability | billing.view |
| Resource type | account | Resource ID field | account_id |
| Public API route | GET /v1/public/accounts/{account_id}/billing/wallet-balance |
Arguments
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
account_id | str | yes | Account UUID from the route path |
Returns
Returns
| Field | Type | Required | Description |
|---|---|---|---|
accrued_charges | str | yes | Unbilled accrued charges |
balance | str | yes | Current wallet balance |
currency | str | yes | Wallet currency code |
net_balance | str | yes | Wallet balance after accrued charges |
A2A example
A2A example
Request:Response:
MCP example
MCP example
Request:Response: