Skip to the documentation
MCP server

Billing

The plan, pay as you go, invoices, and the links to pay.

Billing tools

ToolWhat it does
getBillingThe plan of the workspace and what it includes, as Billing shows it: how it is billed, when it renews or ends and the next charge, the domains, this month’s sends and mailbox checks, today’s AI actions and pay as you go.
listBillingPlansEvery plan, cheapest first, with its price, where it is sold and what it includes, the sends and received emails a month among them, and what pay as you go bills on it.
getBillingUsageSends and AI actions per day, and what pay as you go extras cost per month, as the Usage charts show them. days goes back up to 3,660 days, and all to the day the workspace was made.
listBillingAlertsWhat the billing banner of the app would say now, most urgent first.
listBillingCountriesEvery country code a billing address takes.
getPayAsYouGoPay as you go: whether extras are billed and whether the plan itself bills them, what it covers, the monthly limit and what extras cost so far, the current period, the limits that can be chosen and the rates of the plan of the workspace.
setPayAsYouGoTurn pay as you go on or off. The first time, it returns a link where the person adds a card. In the app’s chat it always asks first.
setPayAsYouGoLimitSet the monthly limit of pay as you go. In the app’s chat it always asks first.
confirmPayAsYouGoAfter the person added the card, check that it was saved and record it. In the app’s chat it always asks first.
startPlanCheckoutThe link to a checkout for a paid plan, for a workspace that pays for no plan yet. In the app’s chat it always asks first.
openBillingPortalThe link to the billing portal, where the plan is changed or cancelled and the card updated. In the app’s chat it always asks first.
listInvoicesEvery charge with the state of its invoice, as History on Billing lists them, a page at a time.
getInvoiceThe link to the invoice of one charge, a PDF, since a tool carries no file.
saveBillingDetailsSave the name and address billed on a charge, keep the address for later charges and start writing its invoice. In the app’s chat it always asks first.
estimateCostEvery plan a workspace can choose for itself priced for a usage at its own rates, as the cost calculator on the website does: sends and received emails a month, domains, people, storage and AI actions a day, with the monthly total, whether the plan fits and the cheapest one that does. It reads nothing in the workspace and needs no permission.
listBillingAddOnsWhat can be bought on top of the plan, today a dedicated sending IP: its price, whether the workspace qualifies and whether it has one.
startAddOnCheckoutThe link to a checkout for a dedicated sending IP. In the app’s chat it always asks first.
cancelAddOnCancel the dedicated IP at the end of the month already paid for. In the app’s chat it always asks first.

Only the owner of the workspace reaches billing, through a client connected with every address. Reading needs billing:read and every change needs billing:write.

Nothing is paid through a tool. A checkout, the billing portal and adding a card for pay as you go each return a link for the person to open, and they pay, change the card or cancel there.

Some tools on this server make a change the REST API guards with a verification code, and ask for the same code. Until the client has verified a code in the last 60 minutes, or the person has chosen Allow changes for 60 minutes on it in Account → Connected apps, such a tool answers with a result that starts Refused (step_up_required): and changes nothing. beginStepUp asks for a code, verifyStepUp checks the one the person gives, and getStepUpStatus says whether the client is verified. emptyAudience never asks for a code. The API Authentication page lists every tool that asks.

Reference

getBilling

Scopesbilling:readThe app's assistant runs it without askingToolkitbilling

The plan of this workspace and what it includes, as Billing shows it: how it is billed, when it renews or ends and the next charge, how many domains it holds, how much of this month's sends and mailbox checks and today's AI actions are used, and pay as you go. Only the owner of the workspace reaches billing, through a client connected with every address.

Inputs

Takes no input.

Also available in

API
GET /billingPOST /tools/addresses
TypeScript
billing.get()tools.checkAddresses()
Python
billing.get()tools.check_addresses()
Ruby
billing.gettools.check_addresses
PHP
billing->gettools->checkAddresses
Go
Billing.GetTools.CheckAddresses
Java
billing().gettools().checkAddresses
C#
Billing.GetAsyncTools.CheckAddressesAsync

listBillingPlans

Scopesbilling:readThe app's assistant runs it without askingToolkitbilling

Every plan, cheapest first, with its price, whether it is sold here and at which intervals, what it includes, and what pay as you go bills past each allowance at the rates of that plan, since sends and received emails cost a different amount on each plan. Prices are in US dollars, and a plan priced in a contract reads custom. The older plans kept only for the workspaces already on them are listed too, as not sold here. Pay as you go also bills the API and MCP requests that keys and connected apps make, per 1,000,000: $0.50 on Starter, $0.30 on Pro and $0.20 on Max. Only the owner of the workspace reaches billing, through a client connected with every address.

Inputs

Takes no input.

Also available in

API
GET /billing/plans
TypeScript
billing.listPlans()
Python
billing.list_plans()
Ruby
billing.list_plans
PHP
billing->listPlans
Go
Billing.ListPlans
Java
billing().listPlans
C#
Billing.ListPlansAsync

getBillingUsage

Scopesbilling:readThe app's assistant runs it without askingToolkitbilling

Sends and AI actions per day, and what pay as you go extras cost per month, as the Usage charts show them. days goes back 1 to 3660 days, 30 by default, and "all" goes back to the day the workspace was made. since and until, ISO 8601 instants, set the window outright instead: since is where it starts and until where it ends, now by default. Usage is kept per UTC day, so the window covers whole days. Days with no use are left out. Only the owner of the workspace reaches billing, through a client connected with every address.

Inputs

daysinteger | string
sincestring

Where the window starts, as an ISO 8601 instant. It wins over days and minutes.

Formatdate-time
untilstring

Where the window ends, as an ISO 8601 instant, not included, now by default. Only with since.

Formatdate-time

Also available in

API
GET /billing/usage
TypeScript
billing.getUsage()
Python
billing.get_usage()
Ruby
billing.get_usage
PHP
billing->getUsage
Go
Billing.GetUsage
Java
billing().getUsage
C#
Billing.GetUsageAsync

listBillingAlerts

Scopesbilling:readThe app's assistant runs it without askingToolkitbilling

What the billing banner of the app would say now, most urgent first: a failed payment, paused pay as you go, sending or AI paused at a limit, a plan about to end, an allowance nearly used and a charge coming soon. Only the owner of the workspace reaches billing, through a client connected with every address.

Inputs

Takes no input.

Also available in

API
GET /billing/alerts
TypeScript
billing.listAlerts()
Python
billing.list_alerts()
Ruby
billing.list_alerts
PHP
billing->listAlerts
Go
Billing.ListAlerts
Java
billing().listAlerts
C#
Billing.ListAlertsAsync

listBillingCountries

Scopesbilling:readThe app's assistant runs it without askingToolkitbilling

Every country a billing address can be in, as the two-letter ISO 3166 codes saveBillingDetails takes as country. Only the owner of the workspace reaches billing, through a client connected with every address.

Inputs

Takes no input.

Also available in

API
GET /billing/countries
TypeScript
billing.listCountries()
Python
billing.list_countries()
Ruby
billing.list_countries
PHP
billing->listCountries
Go
Billing.ListCountries
Java
billing().listCountries
C#
Billing.ListCountriesAsync

getPayAsYouGo

Scopesbilling:readThe app's assistant runs it without askingToolkitbilling

Pay as you go on this workspace: whether usage past the allowances is billed, the monthly limit and what extras cost so far, the current billing period, the limits that can be chosen and the rates of the plan of this workspace. While it is on it also bills every API and MCP request a key or a connected app makes, per 1,000,000 at the rate of its plan ($0.50 on Starter, $0.30 on Pro and $0.20 on Max), apart from requests refused for the rate limit, requests that failed on our side and the ones made before it started. Only the owner of the workspace reaches billing, through a client connected with every address.

Inputs

Takes no input.

Also available in

API
GET /billing/pay-as-you-go
TypeScript
billing.getPayAsYouGo()
Python
billing.get_pay_as_you_go()
Ruby
billing.get_pay_as_you_go
PHP
billing->getPayAsYouGo
Go
Billing.GetPayAsYouGo
Java
billing().getPayAsYouGo
C#
Billing.GetPayAsYouGoAsync

setPayAsYouGo

Scopesbilling:writeThe app's assistant always asks firstToolkitbilling

Turn pay as you go on or off, as the switch on Billing does. Off takes effect at once, and usage stops at the plan's allowances. On takes effect at once when a card is saved. The first time, it returns a link where the person adds a card on the billing provider's page: give them the link, and call confirmPayAsYouGo once they say they are done. Nothing is paid through this tool. It asks for a verification code, and in the app's chat it always asks first. Only the owner of the workspace reaches billing, through a client connected with every address.

Inputs

enabledbooleanRequired
themestring

Light or dark, for the page the link opens. Left out, it follows the browser.

One of"light""dark"

Also available in

API
PATCH /billing/pay-as-you-go
TypeScript
billing.setPayAsYouGo()
Python
billing.set_pay_as_you_go()
Ruby
billing.set_pay_as_you_go
PHP
billing->setPayAsYouGo
Go
Billing.SetPayAsYouGo
Java
billing().setPayAsYouGo
C#
Billing.SetPayAsYouGoAsync

setPayAsYouGoLimit

Scopesbilling:writeThe app's assistant always asks firstToolkitbilling

Set the monthly spending limit of pay as you go, in US cents. Extras stop for the rest of a calendar month once it is reached. Pay as you go has to be set up first. It asks for a verification code, and in the app's chat it always asks first. Only the owner of the workspace reaches billing, through a client connected with every address.

Inputs

limitCentsintegerRequired

One of 1000, 2500, 5000, 10000, 25000, 50000, 100000, 250000, 500000.

Also available in

API
PUT /billing/pay-as-you-go/limit
TypeScript
billing.setPayAsYouGoLimit()
Python
billing.set_pay_as_you_go_limit()
Ruby
billing.set_pay_as_you_go_limit
PHP
billing->setPayAsYouGoLimit
Go
Billing.SetPayAsYouGoLimit
Java
billing().setPayAsYouGoLimit
C#
Billing.SetPayAsYouGoLimitAsync

confirmPayAsYouGo

Scopesbilling:writeThe app's assistant always asks firstToolkitbilling

After the person added a card through the link setPayAsYouGo gave, check with the billing provider that it was saved and record it, as the app does when they come back. It asks for a verification code, and in the app's chat it always asks first. Only the owner of the workspace reaches billing, through a client connected with every address.

Inputs

Takes no input.

Also available in

API
POST /billing/pay-as-you-go/confirm
TypeScript
billing.confirmPayAsYouGo()
Python
billing.confirm_pay_as_you_go()
Ruby
billing.confirm_pay_as_you_go
PHP
billing->confirmPayAsYouGo
Go
Billing.ConfirmPayAsYouGo
Java
billing().confirmPayAsYouGo
C#
Billing.ConfirmPayAsYouGoAsync

startPlanCheckout

Scopesbilling:writeThe app's assistant always asks firstToolkitbilling

Start buying a paid plan for a workspace that pays for no plan yet, as choosing a plan in the app does, and return the link to the checkout on the billing provider's page. Nothing is charged until the person pays there, so give them the link. A workspace that already pays for a plan changes it with openBillingPortal instead. interval has to be one the plan is sold at, as listBillingPlans shows, and is month by default. It asks for a verification code, and in the app's chat it always asks first. Only the owner of the workspace reaches billing, through a client connected with every address.

Inputs

planstringRequired
One of"professional""starter""business""enterprise"
intervalstring
One of"month""year"
themestring

Light or dark, for the page the link opens. Left out, it follows the browser.

One of"light""dark"

Also available in

API
POST /billing/checkout
TypeScript
billing.startCheckout()
Python
billing.start_checkout()
Ruby
billing.start_checkout
PHP
billing->startCheckout
Go
Billing.StartCheckout
Java
billing().startCheckout
C#
Billing.StartCheckoutAsync

openBillingPortal

Scopesbilling:writeThe app's assistant always asks firstToolkitbilling

A link to the billing portal, where the person changes or cancels the plan, updates the card and downloads past invoices, as Manage does in the app. Nothing changes until they act there. It asks for a verification code, and in the app's chat it always asks first. Only the owner of the workspace reaches billing, through a client connected with every address.

Inputs

themestring

Light or dark, for the page the link opens. Left out, it follows the browser.

One of"light""dark"

Also available in

API
POST /billing/portal
TypeScript
billing.openPortal()
Python
billing.open_portal()
Ruby
billing.open_portal
PHP
billing->openPortal
Go
Billing.OpenPortal
Java
billing().openPortal
C#
Billing.OpenPortalAsync

listInvoices

Scopesbilling:readThe app's assistant runs it without askingToolkitbilling

Every charge of the workspace with the state of its invoice, as History on Billing lists them, newest first unless sort is oldest. search matches the plan, the invoice number, the charge id and the name billed. getInvoice returns the link to an invoice. Only the owner of the workspace reaches billing, through a client connected with every address.

Inputs

pageinteger
At least 1
limitinteger
At least 1At most 100
sortstring
One of"newest""oldest"
searchstring
Up to 120 characters

Also available in

API
GET /billing/invoices
TypeScript
billing.listInvoices()
Python
billing.list_invoices()
Ruby
billing.list_invoices
PHP
billing->listInvoices
Go
Billing.ListInvoices
Java
billing().listInvoices
C#
Billing.ListInvoicesAsync

getInvoice

Scopesbilling:readThe app's assistant runs it without askingToolkitbilling

The link to the invoice of one charge, a PDF, since a tool carries no file. An invoice that was not written yet is written first, which takes a few seconds. Take the charge id from listInvoices. Only the owner of the workspace reaches billing, through a client connected with every address.

Inputs

orderIdstringRequired
Not empty

Also available in

API
GET /billing/invoices/{orderId}
TypeScript
billing.getInvoice()
Python
billing.get_invoice()
Ruby
billing.get_invoice
PHP
billing->getInvoice
Go
Billing.GetInvoice
Java
billing().getInvoice
C#
Billing.GetInvoiceAsync

saveBillingDetails

Scopesbilling:writeThe app's assistant always asks firstToolkitbilling

Save the name and address billed on a charge, as the Billing address dialog does, keep the address for later charges, and start writing its invoice. country is a two-letter code from listBillingCountries, and in the US and Canada state is its two-letter code. It asks for a verification code, and in the app's chat it always asks first. Only the owner of the workspace reaches billing, through a client connected with every address.

Inputs

orderIdstringRequired
Not empty
namestringRequired
1 to 200 characters
line1stringRequired
1 to 200 characters
line2string
Up to 200 characters
citystringRequired
1 to 120 characters
postalCodestring
Up to 40 characters
statestring
Up to 60 characters
countrystringRequired
One of"AD""AE""AF""AG""AI""AL""AM""AO""AQ""AR""AS""AT""AU""AW""AX""AZ""BA""BB""BD""BE""BF""BG""BH""BI""BJ""BL""BM""BN""BO""BQ""BR""BS""BT""BV""BW""BY""BZ""CA""CC""CD""CF""CG""CH""CI""CK""CL""CM""CN""CO""CR""CV""CW""CX""CY""CZ""DE""DJ""DK""DM""DO""DZ""EC""EE""EG""EH""ER""ES""ET""FI""FJ""FK""FM""FO""FR""GA""GB""GD""GE""GF""GG""GH""GI""GL""GM""GN""GP""GQ""GR""GS""GT""GU""GW""GY""HK""HM""HN""HR""HT""HU""ID""IE""IL""IM""IN""IO""IQ""IS""IT""JE""JM""JO""JP""KE""KG""KH""KI""KM""KN""KR""KW""KY""KZ""LA""LB""LC""LI""LK""LR""LS""LT""LU""LV""LY""MA""MC""MD""ME""MF""MG""MH""MK""ML""MM""MN""MO""MP""MQ""MR""MS""MT""MU""MV""MW""MX""MY""MZ""NA""NC""NE""NF""NG""NI""NL""NO""NP""NR""NU""NZ""OM""PA""PE""PF""PG""PH""PK""PL""PM""PN""PR""PS""PT""PW""PY""QA""RE""RO""RS""RW""SA""SB""SC""SD""SE""SG""SH""SI""SJ""SK""SL""SM""SN""SO""SR""SS""ST""SV""SX""SZ""TC""TD""TF""TG""TH""TJ""TK""TL""TM""TN""TO""TR""TT""TV""TW""TZ""UA""UG""UM""US""UY""UZ""VA""VC""VE""VG""VI""VN""VU""WF""WS""YE""YT""ZA""ZM""ZW"

Also available in

API
PUT /billing/invoices/{orderId}/details
TypeScript
billing.saveInvoiceDetails()
Python
billing.save_invoice_details()
Ruby
billing.save_invoice_details
PHP
billing->saveInvoiceDetails
Go
Billing.SaveInvoiceDetails
Java
billing().saveInvoiceDetails
C#
Billing.SaveInvoiceDetailsAsync

estimateCost

No scopeThe app's assistant runs it without askingToolkitbilling

For a usage, price every Nextmail plan a workspace can choose for itself, as the cost calculator on the Nextmail website does: the plan, the extra sends, received emails, AI actions, domains and storage it would bill at the rates of that plan, the monthly total in US dollars, whether each plan fits, and the cheapest plan that fits. It leaves out the plans priced in a contract: Enterprise. A plan does not fit when the usage needs more people than its team access allows, or more sends, received emails, domains or storage than it includes on a plan that bills no extra for them.

Inputs

sendsinteger

Emails sent in a month. Defaults to 0.

At least 0At most 1000000000
receivedinteger

Emails received in a month. Defaults to 0.

At least 0At most 1000000000
domainsinteger

Domains sent from. Defaults to 1.

At least 0At most 1000000
peopleinteger

People who use the workspace. Defaults to 1.

At least 1At most 1000000
aiActionsinteger

AI actions in a day, such as drafts, rewrites and summaries. Defaults to 0.

At least 0At most 10000000
storageinteger

Storage the workspace keeps, in GB. Defaults to 0.

At least 0At most 1000000
apiRequestsinteger

API and MCP requests in a month, priced per 1,000,000 at the rate of each plan. Defaults to 0.

At least 0At most 100000000000
intervalstring

How the plan is paid: month or year. Defaults to month.

One of"month""year"

listBillingAddOns

Scopesbilling:readThe app's assistant runs it without askingToolkitbilling

The add-ons this workspace can buy on top of its plan, each with whether it is for sale, its price, whether the workspace has it and when it ends. The dedicated sending IP also says whether the workspace qualifies (at least 100,000 emails sent in a month) and the IPs it holds. White label is the web app on a domain of the workspace, its logo in the app and in the emails sent for it, and no Powered by marks on its forms and booking pages. Only the owner of the workspace reaches billing, through a client connected with every address.

Inputs

Takes no input.

Also available in

API
GET /billing/add-ons
TypeScript
billing.listAddOns()
Python
billing.list_add_ons()
Ruby
billing.list_add_ons
PHP
billing->listAddOns
Go
Billing.ListAddOns
Java
billing().listAddOns
C#
Billing.ListAddOnsAsync

startAddOnCheckout

Scopesbilling:writeThe app's assistant always asks firstToolkitbilling

Start buying an add-on: dedicated-ip, a dedicated sending IP at 40.00 USD per IP a month. It returns a link to the billing provider's page: give it to the person, who pays there. Nothing is paid through this tool. A dedicated IP is set up and warmed up after the payment, which listDedicatedIps shows. It asks for a verification code, and in the app's chat it always asks first. Only the owner of the workspace reaches billing, through a client connected with every address.

Inputs

addOnstringRequired
One of"dedicated-ip"
themestring

Light or dark, for the page the link opens. Left out, it follows the browser.

One of"light""dark"

Also available in

API
POST /billing/add-ons/checkout
TypeScript
billing.startAddOnCheckout()
Python
billing.start_add_on_checkout()
Ruby
billing.start_add_on_checkout
PHP
billing->startAddOnCheckout
Go
Billing.StartAddOnCheckout
Java
billing().startAddOnCheckout
C#
Billing.StartAddOnCheckoutAsync

cancelAddOn

Scopesbilling:writeThe app's assistant always asks firstToolkitbilling

Cancel an add-on. It stays until the end of the month already paid for. Then a dedicated IP is released and mail goes out through the shared IPs again. It asks for a verification code, and in the app's chat it always asks first. Only the owner of the workspace reaches billing, through a client connected with every address.

Inputs

addOnstringRequired
One of"dedicated-ip"

Also available in

API
DELETE /billing/add-ons/{addOn}
TypeScript
billing.cancelAddOn()
Python
billing.cancel_add_on()
Ruby
billing.cancel_add_on
PHP
billing->cancelAddOn
Go
Billing.CancelAddOn
Java
billing().cancelAddOn
C#
Billing.CancelAddOnAsync