請求
プラン、従量課金、請求書、支払いのリンク。
請求のツール
| ツール | 機能 |
|---|---|
| getBilling | ワークスペースのプランと含まれる内容。プランと請求の表示と同じく、請求方法、更新日または終了日と次回の請求、ドメイン、今月の送信数、今日の AI アクション、従量課金。 |
| listBillingPlans | すべてのプランを安い順に、価格、販売場所、含まれる内容とともに。 |
| getBillingUsage | 1 日ごとの送信数と AI アクション、月ごとの従量課金の超過分の料金を、使用量のグラフと同じように。days は 3,660 日前まで、all はワークスペースが作られた日までさかのぼる。 |
| listBillingAlerts | アプリの請求バナーがいま表示する内容を、緊急度の高い順に。 |
| listBillingCountries | 請求先住所が受け付けるすべての国コード。 |
| getPayAsYouGo | 従量課金: 超過分が請求されるか、月間上限とこれまでの金額、現在の期間、選べる上限、価格。 |
| setPayAsYouGo | 従量課金をオンまたはオフにする。初回は本人がカードを追加するリンクを返す。アプリのチャットでは必ず先に確認する。 |
| setPayAsYouGoLimit | 従量課金の月間上限を設定する。アプリのチャットでは必ず先に確認する。 |
| confirmPayAsYouGo | 本人がカードを追加した後、保存されたことを確認して記録する。アプリのチャットでは必ず先に確認する。 |
| startPlanCheckout | 無料プランのワークスペース向けの、有料プランのチェックアウトのリンク。アプリのチャットでは必ず先に確認する。 |
| openBillingPortal | プランの変更や解約、カードの更新を行う請求ポータルのリンク。アプリのチャットでは必ず先に確認する。 |
| listInvoices | すべての請求と請求書の状態。プランと請求の履歴と同じ一覧を 1 ページずつ。 |
| getInvoice | ツールはファイルを運べないため、1 件の請求の請求書のリンク(PDF)。 |
| saveBillingDetails | 請求の請求先の名前と住所を保存し、住所を以降の請求のために残して、請求書の作成を始める。アプリのチャットでは必ず先に確認する。 |
請求に届くのはワークスペースのオーナーだけで、すべてのアドレスで接続したクライアントを使う。読み取りには billing:read、すべての変更には billing:write が必要。
ツールを通じて支払うことはない。チェックアウト、請求ポータル、従量課金のカード追加は、どれも本人が開くリンクを返し、支払い、カードの変更、解約はそこで行う。
このサーバーの一部のツールは、REST API が確認コードで保護している変更を行うため、同じコードを求めます。クライアントが直近 60 分以内にコードを確認しておらず、本人がアカウント → 接続済みアプリでそのクライアントに「60分間、変更を許可」を選んでもいない間、これらのツールは Refused (step_up_required): で始まる結果を返し、何も変更しません。emptyAudience がコードを求めることはありません。コードを求めるツールの一覧と、コードの要求と確認の方法は API の認証ページにあります。
リファレンス
getBilling
The plan of this workspace and what it includes, as Plans & 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. Only the owner of the workspace reaches billing, through a client connected with every address.
入力
入力はありません。
ほかの提供先
listBillingPlans
Every plan, cheapest first, with its price, whether it is sold here and at which intervals, and what it includes. Prices are in US dollars. Only the owner of the workspace reaches billing, through a client connected with every address.
入力
入力はありません。
ほかの提供先
getBillingUsage
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. Days with no use are left out. Only the owner of the workspace reaches billing, through a client connected with every address.
入力
daysinteger | string
ほかの提供先
listBillingAlerts
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.
入力
入力はありません。
ほかの提供先
listBillingCountries
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.
入力
入力はありません。
ほかの提供先
getPayAsYouGo
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 prices. Only the owner of the workspace reaches billing, through a client connected with every address.
入力
入力はありません。
ほかの提供先
setPayAsYouGo
Turn pay as you go on or off, as the switch on Plans & 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.
- 確認コードが必要
PATCH /billing/pay-as-you-go
入力
enabledboolean必須themestringLight or dark, for the page the link opens. Left out, it follows the browser.
次のいずれか"light""dark"localestringA language tag such as de or pt-PT, for the page the link opens.
35文字まで
ほかの提供先
setPayAsYouGoLimit
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.
- 確認コードが必要
PUT /billing/pay-as-you-go/limit
入力
limitCentsinteger必須One of 1000, 2500, 5000, 10000, 25000, 50000, 100000, 250000, 500000.
ほかの提供先
confirmPayAsYouGo
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.
入力
入力はありません。
ほかの提供先
startPlanCheckout
Start buying a paid plan for a workspace on Free, 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 is month or year, 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.
- 確認コードが必要
POST /billing/checkout
入力
planstring必須- 次のいずれか
"starter""business""enterprise" intervalstring- 次のいずれか
"month""year" themestringLight or dark, for the page the link opens. Left out, it follows the browser.
次のいずれか"light""dark"localestringA language tag such as de or pt-PT, for the page the link opens.
35文字まで
ほかの提供先
openBillingPortal
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.
- 確認コードが必要
POST /billing/portal
入力
themestringLight or dark, for the page the link opens. Left out, it follows the browser.
次のいずれか"light""dark"localestringA language tag such as de or pt-PT, for the page the link opens.
35文字まで
ほかの提供先
listInvoices
Every charge of the workspace with the state of its invoice, as History on Plans & 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.
入力
pageinteger- 1以上
limitinteger- 1以上100以下
sortstring- 次のいずれか
"newest""oldest" searchstring- 120文字まで
ほかの提供先
getInvoice
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.
入力
orderIdstring必須- 空でないこと
ほかの提供先
saveBillingDetails
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.
入力
orderIdstring必須- 空でないこと
namestring必須- 1〜200文字
line1string必須- 1〜200文字
line2string- 200文字まで
citystring必須- 1〜120文字
postalCodestring- 40文字まで
statestring- 60文字まで
countrystring必須- 次のいずれか
"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"