Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Manage subscriptions and billing
sub, err := client.Billing.GetSubscription(ctx) fmt.Printf("Plan: %s, Status: %s\n", sub.Plan, sub.Status)
checkout, err := client.Billing.CreateCheckout(ctx, grantex.CreateCheckoutParams{ Plan: "pro", SuccessURL: "https://myapp.com/billing/success", CancelURL: "https://myapp.com/billing/cancel", }) // Redirect user to checkout.CheckoutURL
portal, err := client.Billing.CreatePortal(ctx, grantex.CreatePortalParams{ ReturnURL: "https://myapp.com/dashboard", }) // Redirect user to portal.PortalURL
SubscriptionStatus
Plan
string
"free"
"pro"
"enterprise"
Status
"active"
"past_due"
"canceled"
CurrentPeriodEnd
*string