Skip to content
Menu
All API groups

Billing

Plans, subscription, invoices, usage.

9 endpoints.

GET/v1/billing/plans

Public plan list (no auth)

No key needed

Responses

GET/v1/billing/subscription

Billing Subscription

Needs a key or a dashboard session

Responses

POST/v1/billing/checkout

Billing Checkout

Needs a key or a dashboard session

Parameters

NameInTypeRequiredDescription
Idempotency-Keyheaderstring | nullnoUnique per logical write (8-255 chars). Retries with the same key are safe. · pattern ^[A-Za-z0-9_\-:.]{8,255}$

Request body application/json CheckoutRequest

NameTypeRequiredDescription
plan_codestringyesmax length 32
interval"month" | "year"nodefault "month"

Responses

POST/v1/billing/change-plan

Upgrade or downgrade with proration

Needs a key or a dashboard session

Parameters

NameInTypeRequiredDescription
Idempotency-Keyheaderstring | nullnoUnique per logical write (8-255 chars). Retries with the same key are safe. · pattern ^[A-Za-z0-9_\-:.]{8,255}$

Request body application/json ChangePlanRequest

NameTypeRequiredDescription
plan_codestringyesmax length 32
interval"month" | "year"nodefault "month"

Responses

POST/v1/billing/cancel

Billing Cancel

Needs a key or a dashboard session

Request body application/json CancelRequest

NameTypeRequiredDescription
at_period_endbooleannodefault true
reasonstring | nullnomax length 500

Responses

GET/v1/billing/invoices

Billing Invoices

Needs a key or a dashboard session

Responses

GET/v1/billing/portal

Provider portal (card, invoices)

Needs a key or a dashboard session

Responses

POST/v1/billing/webhooks/{provider}

Payment provider webhooks (signature checked, no API key)

No key needed

Parameters

NameInTypeRequiredDescription
providerpath"paddle" | "stripe" | "mock"yes

Responses

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

Usage this period vs the plan

Needs a key or a dashboard session

Responses

Data shapes on this page

PlanOut

NameTypeRequiredDescription
codestringyes
namestringyes
price_month_centsinteger | nullyes
price_year_centsinteger | nullyes
currencystringyes
products_limitinteger | nullyesnull = custom
searches_limitinteger | nullyesSearches per month (Enter). Suggest is never billed.
featuresobjectyes
overageobjectyes
trial_daysintegeryes

SubscriptionOut

NameTypeRequiredDescription
plan_codestringyes
interval"month" | "year"yes
status"trialing" | "active" | "past_due" | "paused" | "canceled" | "incomplete"yes
provider"paddle" | "stripe" | "mock" | "manual"yes
trial_ends_atstring (date-time) | nullno
current_period_startstring (date-time) | nullno
current_period_endstring (date-time) | nullno
cancel_at_period_endbooleannodefault false

CheckoutRequest

NameTypeRequiredDescription
plan_codestringyesmax length 32
interval"month" | "year"nodefault "month"

RedirectUrl

NameTypeRequiredDescription
urlstringyes

ChangePlanRequest

NameTypeRequiredDescription
plan_codestringyesmax length 32
interval"month" | "year"nodefault "month"

CancelRequest

NameTypeRequiredDescription
at_period_endbooleannodefault true
reasonstring | nullnomax length 500

InvoiceOut

NameTypeRequiredDescription
idstringyes
statusstringyes
currencystringyes
total_minorintegeryes
tax_minorintegeryes
hosted_urlstring | nullno
pdf_urlstring | nullno
issued_atstring (date-time)yes
paid_atstring (date-time) | nullno

UsageOut

NameTypeRequiredDescription
period_startstring (date)yes
period_endstring (date)yes
plan_codestringyes
metricsUsageMetric[]yes
overage_estimate_centsintegeryes
dailyUsageDay[]yes
notices"80_percent" | "100_percent"[]no

UsageMetric

NameTypeRequiredDescription
metric"search" | "translated_product" | "products_indexed"yes
usedintegeryes
limitinteger | nullyes
percentnumber | nullyes

UsageDay

NameTypeRequiredDescription
daystring (date)yes
searchesintegeryes
suggests_not_billedintegeryes
translated_productsintegeryes