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

Billing

Plans, subscription, invoices, usage.

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

GET/v1/billing/plans

Public plan list (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"
quantityintegerلاPlans sold by size (Enterprise): blocks of `sizing.block_products` products, 1 to 40. 1 for every other plan.default 1 · min 1 · max 40

الردود

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"
quantityintegerلاPlans sold by size (Enterprise): blocks of `sizing.block_products` products, 1 to 40. 1 for every other plan.default 1 · min 1 · max 40

الردود

POST/v1/billing/change-plan/preview

What a plan change charges today (nothing changes)

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

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

الاسمالنوعإلزاميالوصف
plan_codestringنعمmax length 32
interval"month" | "year"لاdefault "month"
quantityintegerلاPlans sold by size (Enterprise): blocks of `sizing.block_products` products, 1 to 40. 1 for every other plan.default 1 · min 1 · max 40

الردود

POST/v1/billing/cancel

Billing Cancel

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

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

الاسمالنوعإلزاميالوصف
at_period_endbooleanلاMust be true: a store's plan runs to the end of the paid period (no refunds). false is refused with 403 cancel_now_not_allowed; only the super-admin console can end a plan now.default true
reasonstring | nullلاmax length 500

الردود

POST/v1/billing/resume

Keep my plan: undo a cancel at period end before the period ends

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

الردود

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نعم
sizingPlanSizing | nullلاSet when the plan is bought by catalog size.

PlanSizing

A plan bought by catalog size: price per month = graduated tiers on the number of blocks.

الاسمالنوعإلزاميالوصف
block_productsintegerنعمProducts in one block (the plan's products_limit).
max_blocksintegerنعمMost blocks sold online. Above that: talk to sales.
searches_per_extra_blockintegerنعمSearches per month added by each block after the first.
tiersPriceTier[]نعم

PriceTier

الاسمالنوعإلزاميالوصف
up_tointeger | nullنعمLast block of this tier. null = every block after the tiers before.
month_centsintegerنعمPrice per block per month in this tier. Yearly = 10 x.

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
quantityintegerلاBlocks of a plan sold by size (Enterprise); 1 for other plans.default 1

CheckoutRequest

الاسمالنوعإلزاميالوصف
plan_codestringنعمmax length 32
interval"month" | "year"لاdefault "month"
quantityintegerلاPlans sold by size (Enterprise): blocks of `sizing.block_products` products, 1 to 40. 1 for every other plan.default 1 · min 1 · max 40

RedirectUrl

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

ChangePlanRequest

الاسمالنوعإلزاميالوصف
plan_codestringنعمmax length 32
interval"month" | "year"لاdefault "month"
quantityintegerلاPlans sold by size (Enterprise): blocks of `sizing.block_products` products, 1 to 40. 1 for every other plan.default 1 · min 1 · max 40

ChangePlanPreview

What POST /v1/billing/change-plan with the same body would charge today. Nothing changes.

الاسمالنوعإلزاميالوصف
plan_codestringنعم
interval"month" | "year"نعم
quantityintegerلاdefault 1
proration"prorate_now" | "prorate_next_invoice"نعمprorate_now: an upgrade, the difference is charged now. prorate_next_invoice: a downgrade, the credit goes on the next invoice.
knownbooleanنعمFalse: the amount is not known (see `reason`); confirm without an amount.
amount_minorinteger | nullلاCharged today in minor units (cents): the provider's amount for the plan change (tax included) plus add-on bundles at their list price. 0 = nothing is charged today.
tax_minorinteger | nullلا
currencystring | nullلا
reason"provider_has_no_preview" | "provider_error" | "addon_price_unknown" | nullلاWhy the amount is not known. None when `known` is true.

CancelRequest

الاسمالنوعإلزاميالوصف
at_period_endbooleanلاMust be true: a store's plan runs to the end of the paid period (no refunds). false is refused with 403 cancel_now_not_allowed; only the super-admin console can end a plan now.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 | nullنعمnull = the store has no plan yet (see TenantOut.billing_state).
metricsUsageMetric[]نعم
overage_estimate_centsintegerنعم
dailyUsageDay[]نعم
notices"80_percent" | "100_percent"[]لا

UsageMetric

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

UsageDay

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