Billing router
An overview of the Billing router
Procedures#
The billing router has the following procedures:
Get available billing plans#
Returns the available billing plans that can be subscribed to.
- Access:
@public
// Client componentsconst { data } = api.billing.plans.useQuery()// Server componentsconst data = await api.billing.plans()
Get the billing account#
Returns the billing account, containing the billing email and current subscription.
- Access:
@admin
// Client componentsconst { data } = api.billing.account.useQuery()// Server componentsconst data = await api.billing.account()
Update the billing account#
Updates the billing email of the account and syncs the data with the billing provider (Stripe).
- Access:
@admin
// Client componentsconst { mutate } = api.billing.updateBillingDetails.useMutation()mutate({input: {email: '',},})// Server componentsconst data = await api.billing.updateBillingDetails({input: {email: '',},})
Was this helpful?