الفوترة
الخطة والدفع حسب الاستخدام والفواتير وروابط الدفع.
أدوات الفوترة
| الأداة | ما تفعله |
|---|---|
| getBilling | خطة مساحة العمل وما تشمله، كما تعرضها الخطط والفوترة: كيف تُفوتر، ومتى تتجدد أو تنتهي والدفعة التالية، والنطاقات، وإرسالات هذا الشهر، وإجراءات الذكاء الاصطناعي اليوم، والدفع حسب الاستخدام. |
| listBillingPlans | كل خطة، الأرخص أولًا، مع سعرها وأين تُباع وما تشمله. |
| getBillingUsage | الإرسالات وإجراءات الذكاء الاصطناعي يوميًا، وما يكلّفه الاستخدام الإضافي للدفع حسب الاستخدام شهريًا، كما تعرضها مخططات الاستخدام. يعود days حتى 3660 يومًا، ويعود all إلى اليوم الذي أُنشئت فيه مساحة العمل. |
| listBillingAlerts | ما سيقوله شريط الفوترة في التطبيق الآن، الأكثر إلحاحًا أولًا. |
| listBillingCountries | كل رمز بلد يقبله عنوان الفوترة. |
| getPayAsYouGo | الدفع حسب الاستخدام: هل يُفوتر الاستخدام الإضافي، والحد الشهري وما كلّفه حتى الآن، والفترة الحالية، والحدود التي يمكن اختيارها، والأسعار. |
| setPayAsYouGo | تشغيل الدفع حسب الاستخدام أو إيقافه. وفي المرة الأولى يعيد رابطًا يضيف فيه الشخص بطاقة. وفي دردشة التطبيق يسأل دائمًا أولًا. |
| setPayAsYouGoLimit | تعيين الحد الشهري للدفع حسب الاستخدام. وفي دردشة التطبيق يسأل دائمًا أولًا. |
| confirmPayAsYouGo | بعد أن يضيف الشخص البطاقة، يتحقق من حفظها ويسجّل ذلك. وفي دردشة التطبيق يسأل دائمًا أولًا. |
| startPlanCheckout | رابط الدفع لخطة مدفوعة، لمساحة عمل على الخطة المجانية. وفي دردشة التطبيق يسأل دائمًا أولًا. |
| openBillingPortal | رابط بوابة الفوترة، حيث تُغيَّر الخطة أو تُلغى وتُحدَّث البطاقة. وفي دردشة التطبيق يسأل دائمًا أولًا. |
| listInvoices | كل دفعة مع حالة فاتورتها، كما يسردها السجل في الخطط والفوترة، صفحةً بعد صفحة. |
| getInvoice | رابط فاتورة دفعة واحدة، ملف 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.
- يطلب رمز تحقق
POST /billing/pay-as-you-go/confirm
المدخلات
لا يأخذ أي مدخلات.
متاح أيضًا في
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.
- يطلب رمز تحقق
PUT /billing/invoices/{orderId}/details
المدخلات
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"