nextmail billing
Every command in this namespace, with its arguments, flags and examples.
Commands
The plan of the workspace and what it costs, as Billing shows them: the plan and its usage, the plans on sale, pay as you go, every charge with its invoice, and the links that start a checkout or open the billing portal. Only the workspace owner reaches it, and nothing is paid through the API.
Every command here also takes the global flags, such as --json, --profile and --dry-run. See the global flags
billing getbilling list-plansbilling get-usagebilling list-alertsbilling list-countriesbilling get-pay-as-you-gobilling set-pay-as-you-gobilling set-pay-as-you-go-limitbilling confirm-pay-as-you-gobilling start-checkoutbilling open-portalbilling list-invoicesbilling get-invoicebilling save-invoice-detailsbilling list-add-onsbilling start-add-on-checkoutbilling cancel-add-on
nextmail billing get
Read the plan
showviewUsage
nextmail billing get [flags]
Resolves the 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, how many domains it holds, how much of this month's sends and today's AI actions are used, and pay as you go. metered is false while billing is switched off, and then nothing is capped.
Billing belongs to the owner of the workspace: an API key acts for the owner, and an OAuth access token reaches billing only when the owner connected the app with every address. A token that acts for a member is 403 owner_only, and a key or token limited to particular addresses or domains is 422 capability_unsupported.
Examples
nextmail billing getnextmail billing get --jsonAlso available in
- API
GET /billing- TypeScript
nextmail.billing.get()- Python
billing.get()- Ruby
billing.get- PHP
billing->get- Go
Billing.Get- Java
billing().get- C#
Billing.GetAsync
nextmail billing list-plans
List the plans
Usage
nextmail billing list-plans [flags]
Resolves every plan, cheapest first, with its price in US cents and what it includes. available says whether it is on sale, and intervals the billing intervals it is sold at.
Billing belongs to the owner of the workspace: an API key acts for the owner, and an OAuth access token reaches billing only when the owner connected the app with every address. A token that acts for a member is 403 owner_only, and a key or token limited to particular addresses or domains is 422 capability_unsupported.
Examples
nextmail billing list-plansnextmail billing list-plans --jsonAlso available in
nextmail billing get-usage
Read the usage history
Usage
nextmail billing get-usage [flags]
Resolves the sends and AI actions of each day, and what pay as you go extras cost each month, as the Usage charts show them.
Billing belongs to the owner of the workspace: an API key acts for the owner, and an OAuth access token reaches billing only when the owner connected the app with every address. A token that acts for a member is 403 owner_only, and a key or token limited to particular addresses or domains is 422 capability_unsupported.
Flags
--days <value>How many days back to go, from 1 to 3,660, or
allfor every day since the workspace was made. The server defaults to 30.
Examples
nextmail billing get-usagenextmail billing get-usage --days 90nextmail billing get-usage --jsonAlso available in
nextmail billing list-alerts
List the billing alerts
Usage
nextmail billing list-alerts [flags]
Resolves 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. An empty list means there is nothing to say.
Billing belongs to the owner of the workspace: an API key acts for the owner, and an OAuth access token reaches billing only when the owner connected the app with every address. A token that acts for a member is 403 owner_only, and a key or token limited to particular addresses or domains is 422 capability_unsupported.
Examples
nextmail billing list-alertsnextmail billing list-alerts --jsonAlso available in
nextmail billing list-countries
List the billing countries
Usage
nextmail billing list-countries [flags]
Resolves every country a billing address can be in, as the two-letter ISO 3166 codes saveInvoiceDetails takes as country.
Billing belongs to the owner of the workspace: an API key acts for the owner, and an OAuth access token reaches billing only when the owner connected the app with every address. A token that acts for a member is 403 owner_only, and a key or token limited to particular addresses or domains is 422 capability_unsupported.
Examples
nextmail billing list-countriesnextmail billing list-countries --jsonAlso available in
nextmail billing get-pay-as-you-go
Read pay as you go
Usage
nextmail billing get-pay-as-you-go [flags]
Resolves pay as you go on the workspace: whether usage past the allowances is billed, the monthly limit and what extras cost so far, the current billing period once it is set up, the limits that can be chosen and the prices.
Billing belongs to the owner of the workspace: an API key acts for the owner, and an OAuth access token reaches billing only when the owner connected the app with every address. A token that acts for a member is 403 owner_only, and a key or token limited to particular addresses or domains is 422 capability_unsupported.
Examples
nextmail billing get-pay-as-you-gonextmail billing get-pay-as-you-go --jsonAlso available in
nextmail billing set-pay-as-you-go
Turn pay as you go on or off
Usage
nextmail billing set-pay-as-you-go --enabled [flags] nextmail billing set-pay-as-you-go --data <json|@file|-> [flags]
Turns pay as you go on or off, as the switch on Billing does. Off takes effect at once, and usage stops at the allowances. On takes effect at once when a card is already saved. The first time, checkoutUrl is a link where the person adds a card, and pay as you go starts once they have: call confirmPayAsYouGo after they return.
Nothing is paid through the API: the person pays, changes the card or cancels on the billing provider's page the link opens, as they do from the app.
Billing belongs to the owner of the workspace: an API key acts for the owner, and an OAuth access token reaches billing only when the owner connected the app with every address. A token that acts for a member is 403 owner_only, and a key or token limited to particular addresses or domains is 422 capability_unsupported.
Flags
--enabledtrueto turn it on,falseto turn it off. Required, here or in--data.--theme <value>lightordark, for the page the link opens.--data <json|@file|->The whole
bodyas JSON, inline, from a file with @path, or - for standard input. Flags override its keys.
Examples
nextmail billing set-pay-as-you-go --enablednextmail billing set-pay-as-you-go --data @billing.jsonAlso available in
nextmail billing set-pay-as-you-go-limit
Set the pay as you go limit
Usage
nextmail billing set-pay-as-you-go-limit --limit-cents <n> [flags] nextmail billing set-pay-as-you-go-limit --data <json|@file|-> [flags]
Sets the monthly spending limit of pay as you go, in US cents, one of the amounts getPayAsYouGo lists in limits. Extras stop for the rest of a calendar month once it is reached.
Billing belongs to the owner of the workspace: an API key acts for the owner, and an OAuth access token reaches billing only when the owner connected the app with every address. A token that acts for a member is 403 owner_only, and a key or token limited to particular addresses or domains is 422 capability_unsupported.
Flags
--limit-cents <n>The limit in US cents: 1,000, 2,500, 5,000, 10,000, 25,000, 50,000, 100,000, 250,000 or 500,000. Required, here or in
--data.--data <json|@file|->The whole
bodyas JSON, inline, from a file with @path, or - for standard input. Flags override its keys.
Examples
nextmail billing set-pay-as-you-go-limit --limit-cents 1nextmail billing set-pay-as-you-go-limit --data @billing.jsonAlso available in
nextmail billing confirm-pay-as-you-go
Confirm pay as you go
Usage
nextmail billing confirm-pay-as-you-go [flags]
Checks with the billing provider whether the card from a pay as you go checkout was saved, and records it, as the app does when the person comes back from the checkout. enabled says whether pay as you go is on now.
Billing belongs to the owner of the workspace: an API key acts for the owner, and an OAuth access token reaches billing only when the owner connected the app with every address. A token that acts for a member is 403 owner_only, and a key or token limited to particular addresses or domains is 422 capability_unsupported.
Examples
nextmail billing confirm-pay-as-you-gonextmail billing confirm-pay-as-you-go --jsonAlso available in
nextmail billing start-checkout
Start a checkout
Usage
nextmail billing start-checkout --plan <value> [flags] nextmail billing start-checkout --data <json|@file|-> [flags]
Starts buying a paid plan for a workspace on Free, as choosing a plan in the app does, and resolves with the link to the checkout. Nothing is charged until the person pays there, and the plan starts once they have. A workspace that already pays for a plan changes it with openPortal instead.
Nothing is paid through the API: the person pays, changes the card or cancels on the billing provider's page the link opens, as they do from the app.
Billing belongs to the owner of the workspace: an API key acts for the owner, and an OAuth access token reaches billing only when the owner connected the app with every address. A token that acts for a member is 403 owner_only, and a key or token limited to particular addresses or domains is 422 capability_unsupported.
Flags
--plan <value>starter,businessorenterprise. Required, here or in--data.--interval <value>monthoryear. Defaults tomonth.--theme <value>lightordark, for the page the link opens.--data <json|@file|->The whole
bodyas JSON, inline, from a file with @path, or - for standard input. Flags override its keys.
Examples
nextmail billing start-checkout --plan businessnextmail billing start-checkout --plan business --interval yearnextmail billing start-checkout --data @billing.jsonAlso available in
nextmail billing open-portal
Open the billing portal
Usage
nextmail billing open-portal [flags]
Resolves with 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 is paid through the API: the person pays, changes the card or cancels on the billing provider's page the link opens, as they do from the app.
Billing belongs to the owner of the workspace: an API key acts for the owner, and an OAuth access token reaches billing only when the owner connected the app with every address. A token that acts for a member is 403 owner_only, and a key or token limited to particular addresses or domains is 422 capability_unsupported.
Flags
--theme <value>lightordark, for the page the link opens.--data <json|@file|->The whole
bodyas JSON, inline, from a file with @path, or - for standard input. Flags override its keys.
Examples
nextmail billing open-portalnextmail billing open-portal --theme darkAlso available in
nextmail billing list-invoices
List the charges
Usage
nextmail billing list-invoices [flags]
Resolves every charge of the workspace with the state of its invoice, a page at a time, as History on Billing lists them. search matches the plan, the invoice number, the charge id and the name billed.
Billing belongs to the owner of the workspace: an API key acts for the owner, and an OAuth access token reaches billing only when the owner connected the app with every address. A token that acts for a member is 403 owner_only, and a key or token limited to particular addresses or domains is 422 capability_unsupported.
Flags
--page <n>Which page, from 1.
Default1--limit <n>Charges per page, from 1 to 100. The server defaults to 25.
Default25--sort <value>newest, the default, oroldest.Default"newest"--search <value>Words to look for, up to 120 characters.
Examples
nextmail billing list-invoicesnextmail billing list-invoices --limit 10nextmail billing list-invoices --jsonAlso available in
nextmail billing get-invoice
Get the invoice of a charge
Usage
nextmail billing get-invoice <order-id> [flags]
Resolves with the link to the invoice of one charge, as a PDF, and its file name. An invoice that was not written yet is written first, which can take a few seconds. The link is signed by the billing provider, downloads the PDF and stops working after a while, so fetch it again rather than keeping it.
Billing belongs to the owner of the workspace: an API key acts for the owner, and an OAuth access token reaches billing only when the owner connected the app with every address. A token that acts for a member is 403 owner_only, and a key or token limited to particular addresses or domains is 422 capability_unsupported.
Arguments
<order-id>RequiredThe charge id, as
listInvoicesreturns it.
Examples
nextmail billing get-invoice order_4c1b257anextmail billing get-invoice order_4c1b257a --jsonAlso available in
nextmail billing save-invoice-details
Save the billing details of a charge
Usage
nextmail billing save-invoice-details <order-id> --name <value> --line1 <value> --city <value> --country <value> [flags] nextmail billing save-invoice-details <order-id> --data <json|@file|-> [flags]
Saves the name and address billed on a charge, as the Billing address dialog does, keeps the address for later charges, and starts writing its invoice. invoice is ready when the charge already had one, started when it is being written, and refused with the reason in message.
Billing belongs to the owner of the workspace: an API key acts for the owner, and an OAuth access token reaches billing only when the owner connected the app with every address. A token that acts for a member is 403 owner_only, and a key or token limited to particular addresses or domains is 422 capability_unsupported.
Arguments
<order-id>RequiredThe charge id, as
listInvoicesreturns it.
Flags
--name <value>Who is billed, up to 200 characters. Required, here or in
--data.--line1 <value>The street address, up to 200 characters. Required, here or in
--data.--line2 <value>A flat, suite or building, up to 200 characters.
--city <value>Up to 120 characters. Required, here or in
--data.--postal-code <value>Up to 40 characters.
--state <value>The state or region, up to 60 characters. In the US and Canada, its two-letter code.
--country <value>A two-letter ISO 3166 code, one of those
listCountriesreturns. Required, here or in--data.--data <json|@file|->The whole
bodyas JSON, inline, from a file with @path, or - for standard input. Flags override its keys.
Examples
nextmail billing save-invoice-details order_4c1b257a --name 'Acme Ltd' --line1 '1 Market Street' --city London --country GBnextmail billing save-invoice-details order_4c1b257a --name 'Acme Ltd' --line1 '1 Market Street' --city London --country GB --postal-code 'EC1A 1AA'nextmail billing save-invoice-details order_4c1b257a --data @billing.jsonAlso available in
nextmail billing list-add-ons
List add-ons
Usage
nextmail billing list-add-ons [flags]
Resolves what can be bought on top of the plan, today the dedicated sending IP: whether it is for sale, its price per IP a month in priceCents, whether the workspace has it and when it ends, the IPs it brought, and eligibility, which says whether the workspace qualifies. A dedicated IP needs the Business or Enterprise plan and at least 100,000 emails sent in a month, because below that volume it delivers worse than the shared IPs.
Billing belongs to the owner of the workspace: an API key acts for the owner, and an OAuth access token reaches billing only when the owner connected the app with every address. A token that acts for a member is 403 owner_only, and a key or token limited to particular addresses or domains is 422 capability_unsupported.
Examples
nextmail billing list-add-onsnextmail billing list-add-ons --jsonAlso available in
nextmail billing start-add-on-checkout
Start a checkout for an add-on
Usage
nextmail billing start-add-on-checkout --add-on <value> [flags] nextmail billing start-add-on-checkout --data <json|@file|-> [flags]
Starts buying an add-on, as the button under Billing does, and resolves with the link to the checkout. Nothing is charged until the person pays there. Once it is paid the dedicated IP is set up and warmed up, which sending.listDedicatedIps shows.
Nothing is paid through the API: the person pays on the billing provider's page the link opens, as they do from the app.
Billing belongs to the owner of the workspace: an API key acts for the owner, and an OAuth access token reaches billing only when the owner connected the app with every address. A token that acts for a member is 403 owner_only, and a key or token limited to particular addresses or domains is 422 capability_unsupported.
Flags
--add-on <value>The add-on to buy:
dedicated-ip. Required, here or in--data.--theme <value>lightordark, for the page the link opens.--data <json|@file|->The whole
bodyas JSON, inline, from a file with @path, or - for standard input. Flags override its keys.
Examples
nextmail billing start-add-on-checkout --add-on dedicated-ipnextmail billing start-add-on-checkout --data @billing.jsonAlso available in
nextmail billing cancel-add-on
Cancel an add-on
Usage
nextmail billing cancel-add-on <add-on> [flags]
Cancels an add-on. It stays until the end of the month already paid for, which endsAt gives. Then the dedicated IP is released and mail leaves through the shared IPs again.
Billing belongs to the owner of the workspace: an API key acts for the owner, and an OAuth access token reaches billing only when the owner connected the app with every address. A token that acts for a member is 403 owner_only, and a key or token limited to particular addresses or domains is 422 capability_unsupported.
Arguments
<add-on>RequiredThe add-on to cancel:
dedicated-ip.
Examples
nextmail billing cancel-add-on dedicated-ipnextmail billing cancel-add-on dedicated-ip --yes
Google Workspace