Self-service portal for customers to manage their subscriptions.
Self-service page where customers manage their subscription, view usage, change plans, and purchase credits. Automatically created with every subscription.
Purchases are available on active, trialing, and free plan subscriptions. Free plan customers are prompted to add a payment method on their first purchase.
Portal URLs are not single-use — the customer can revisit the link while the session is alive. A session expires after 30 minutes of inactivity, auto-refreshes while the customer is active, and is capped at 2 hours from creation. Generate a fresh URL on each visit.
const portal = await commet.portal.getUrl({ customerId: 'user_123' })
redirect(portal.portalUrl)portal = commet.portal.get_url(customer_id='user_123')
redirect(portal.portal_url)portal, err := client.Portal.GetURL(ctx, &commet.GetPortalURLParams{
CustomerID: "user_123",
})
// redirect(portal.PortalURL)var portal = commet.portal().getUrl(RequestPortalAccessParams.builder().customerId("user_123").build());
// redirect(portal.portalUrl())$portal = $commet->portal->getUrl(customerId: 'user_123');
redirect($portal->portalUrl);curl -X POST https://commet.co/api/v1/portal/request-access \
-H "x-api-key: $COMMET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"customerId": "user_123"}'You can identify customers by customerId (Commet ID or your external ID) or email.
@commet/next (Node.js only) provides a one-line route handler that generates portal URLs and redirects automatically.
import { CustomerPortal } from '@commet/next'
export const GET = CustomerPortal({
apiKey: process.env.COMMET_API_KEY!,
getCustomerId: async (req) => {
return 'user_123'
},
})<a href="/api/commet/portal">Manage Billing</a>Serve the portal from your own domain (e.g., billing.acme.com) instead of commet.co. Go to Settings → Custom Domains, add the domain, and point the DNS records shown — portal links use your domain once it verifies.
Each custom domain serves one surface: portal or checkout. Checkout pages support custom domains the same way.
How is this guide?