Resources
Billing
Manage subscriptions and billing
Last modified on August 29, 2026
Documentation Index
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| Field | Type | Description |
|---|---|---|
Plan | string | "free", "pro", "enterprise" |
Status | string | "active", "past_due", "canceled" |
CurrentPeriodEnd | *string | ISO 8601 period end |