انتقل إلى المحتوى
القائمة
كل مجموعات الواجهة

Billing

Plans, subscription, invoices, usage.

11 نقطة وصول. أسماء نقاط الوصول وأوصافها مأخوذة من ملف OpenAPI، لذلك تظهر بالإنجليزية.

GET/v1/billing/plans

Public plan list (no auth)

لا يحتاج إلى مفتاح

الردود

GET/v1/billing/addons

Public add-on list (assistant conversation bundles; no auth)

لا يحتاج إلى مفتاح

الردود

GET/v1/billing/subscription

Billing Subscription

يحتاج إلى مفتاح أو جلسة في لوحة التحكم

الردود

POST/v1/billing/checkout

Billing Checkout

يحتاج إلى مفتاح أو جلسة في لوحة التحكم

المعاملات

الاسمالموضعالنوعإلزاميالوصف
Idempotency-Keyheaderstring | nullلاUnique per logical write (8-255 chars). Retries with the same key are safe. · pattern ^[A-Za-z0-9_\-:.]{8,255}$

جسم الطلب application/json CheckoutRequest

الاسمالنوعإلزاميالوصف
plan_codestringنعمmax length 32
interval"month" | "year"لاdefault "month"
addonsAddonQuantity[]لا

الردود

POST/v1/billing/change-plan

Upgrade or downgrade with proration

يحتاج إلى مفتاح أو جلسة في لوحة التحكم

المعاملات

الاسمالموضعالنوعإلزاميالوصف
Idempotency-Keyheaderstring | nullلاUnique per logical write (8-255 chars). Retries with the same key are safe. · pattern ^[A-Za-z0-9_\-:.]{8,255}$

جسم الطلب application/json ChangePlanRequest

الاسمالنوعإلزاميالوصف
plan_codestringنعمmax length 32
interval"month" | "year"لاdefault "month"
addonsAddonQuantity[]لاExtra bundles to buy now with the change.

الردود

POST/v1/billing/addons/purchase

Buy add-on bundles now (one-time charge)

يحتاج إلى مفتاح أو جلسة في لوحة التحكم

المعاملات

الاسمالموضعالنوعإلزاميالوصف
Idempotency-Keyheaderstring | nullلاUnique per logical write (8-255 chars). Retries with the same key are safe. · pattern ^[A-Za-z0-9_\-:.]{8,255}$

جسم الطلب application/json AddonPurchaseRequest

الاسمالنوعإلزاميالوصف
codestringنعمmax length 48
quantityintegerلاdefault 1 · min 1 · max 100

الردود

POST/v1/billing/cancel

Billing Cancel

يحتاج إلى مفتاح أو جلسة في لوحة التحكم

جسم الطلب application/json CancelRequest

الاسمالنوعإلزاميالوصف
at_period_endbooleanلاdefault true
reasonstring | nullلاmax length 500

الردود

GET/v1/billing/invoices

Billing Invoices

يحتاج إلى مفتاح أو جلسة في لوحة التحكم

الردود

GET/v1/billing/portal

Provider portal (card, invoices)

يحتاج إلى مفتاح أو جلسة في لوحة التحكم

الردود

POST/v1/billing/webhooks/{provider}

Payment provider webhooks (signature checked, no API key)

لا يحتاج إلى مفتاح

المعاملات

الاسمالموضعالنوعإلزاميالوصف
providerpath"paddle" | "stripe" | "mock"نعم

الردود

  • 200Successful Responsemap<string, boolean>
GET/v1/usage

Usage this period vs the plan

يحتاج إلى مفتاح أو جلسة في لوحة التحكم

الردود

أشكال البيانات في هذه الصفحة

PlanOut

الاسمالنوعإلزاميالوصف
codestringنعم
namestringنعم
price_month_centsinteger | nullنعم
price_year_centsinteger | nullنعم
currencystringنعم
products_limitinteger | nullنعمnull = custom
searches_limitinteger | nullنعمSearches per month (Enter). Suggest is never billed.
featuresobjectنعم
overageobjectنعم
trial_daysintegerنعم

AddonOut

An add-on from the catalog (table `addons`). price_month_cents null = price not set yet.

الاسمالنوعإلزاميالوصف
codestringنعم
namestringنعم
kind"assistant_conversations"نعم
bundle_sizeintegerنعم
price_centsinteger | nullنعم
currencystringنعم
plansstring[]نعمPlans that may buy it.
expires"period_end" | "never"نعم

SubscriptionOut

الاسمالنوعإلزاميالوصف
plan_codestringنعم
interval"month" | "year"نعم
status"trialing" | "active" | "past_due" | "paused" | "canceled" | "incomplete"نعم
provider"paddle" | "stripe" | "mock" | "manual"نعم
trial_ends_atstring (date-time) | nullلا
current_period_startstring (date-time) | nullلا
current_period_endstring (date-time) | nullلا
cancel_at_period_endbooleanلاdefault false
addonsmap<string, AddonBalance>لاAdd-on code -> balance.

AddonBalance

What the store has of one add-on in the current period.

الاسمالنوعإلزاميالوصف
unitsintegerنعمBought this period (bundles x bundle size).
usedintegerنعمCounted from usage (metric assistant_conversation).
remainingintegerنعم
period_endstring (date-time) | nullلا

CheckoutRequest

الاسمالنوعإلزاميالوصف
plan_codestringنعمmax length 32
interval"month" | "year"لاdefault "month"
addonsAddonQuantity[]لا

AddonQuantity

الاسمالنوعإلزاميالوصف
codestringنعمmax length 48
quantityintegerنعمNumber of bundles.min 1 · max 100

RedirectUrl

الاسمالنوعإلزاميالوصف
urlstringنعم

ChangePlanRequest

الاسمالنوعإلزاميالوصف
plan_codestringنعمmax length 32
interval"month" | "year"لاdefault "month"
addonsAddonQuantity[]لاExtra bundles to buy now with the change.

AddonPurchaseRequest

Buy more bundles now (one-time charge). Needs a live subscription on a plan that allows it.

الاسمالنوعإلزاميالوصف
codestringنعمmax length 48
quantityintegerلاdefault 1 · min 1 · max 100

CancelRequest

الاسمالنوعإلزاميالوصف
at_period_endbooleanلاdefault true
reasonstring | nullلاmax length 500

InvoiceOut

الاسمالنوعإلزاميالوصف
idstringنعم
statusstringنعم
currencystringنعم
total_minorintegerنعم
tax_minorintegerنعم
hosted_urlstring | nullلا
pdf_urlstring | nullلا
issued_atstring (date-time)نعم
paid_atstring (date-time) | nullلا

UsageOut

الاسمالنوعإلزاميالوصف
period_startstring (date)نعم
period_endstring (date)نعم
plan_codestringنعم
metricsUsageMetric[]نعم
overage_estimate_centsintegerنعم
dailyUsageDay[]نعم
notices"80_percent" | "100_percent"[]لا

UsageMetric

الاسمالنوعإلزاميالوصف
metric"search" | "assistant_message" | "assistant_conversation" | "translated_product" | "ai_cost_micros_usd" | "products_indexed"نعم
usedintegerنعم
limitinteger | nullنعم
percentnumber | nullنعم

UsageDay

الاسمالنوعإلزاميالوصف
daystring (date)نعم
searchesintegerنعم
suggests_not_billedintegerنعم
assistant_messagesintegerنعم
assistant_conversationsintegerنعم
translated_productsintegerنعم