Documentation Index
Fetch the complete documentation index at: https://docs.grantex.dev/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Thebilling sub-client provides subscription management through Stripe. You can check the current subscription status, create checkout sessions for upgrades, and generate billing portal URLs for self-service management.
billing.getSubscription()
Get the current subscription status for the authenticated developer organization.Response: SubscriptionStatus
Current plan:
'free', 'pro', or 'enterprise'.Subscription status:
'active', 'past_due', or 'canceled'.ISO 8601 end date of the current billing period, or
null for the free plan.billing.createCheckout()
Create a Stripe Checkout session for upgrading to a paid plan. Redirect the user to the returned URL to complete the purchase.Parameters
The plan to subscribe to.
URL to redirect to after successful payment.
URL to redirect to if the user cancels.
Response: CheckoutResponse
Stripe Checkout session URL. Redirect the user here.
billing.createPortal()
Create a Stripe Billing Portal session for self-service subscription management (update payment method, cancel, view invoices).Parameters
URL to redirect back to after the user finishes in the portal.
Response: PortalResponse
Stripe Billing Portal session URL. Redirect the user here.