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 Grantex platform subscriptions and billing sessions with the Go SDK. Platform billing remains separate from an agent’s payment authority.
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