Feature · Customer lifecycle
Customer portal
Generate a short-lived token, hand its URL to your user, and they land on a branded page showing their subscriptions + platform- specific manage buttons (App Store / Play Store deep-links, Stripe portal). No custom UI work.
How to open a portal session
const session = await fetch('https://api.stubkit.com/v1/admin/portal/sessions', {
method: 'POST',
headers: {
authorization: 'Bearer sk_live_...',
'content-type': 'application/json',
},
body: JSON.stringify({ app_id: 'taskpomo', user_id: 'u_42' }),
}).then(r => r.json());
// { id, token, url, expires_at }
// Hand session.url to the user — via email, in-app link, support chat, etc.Portal URL lifetime
Default 1 hour, configurable via ttl_seconds (60–86400). The URL bearer can view data for that window; no additional auth required. For email sharing we recommend 1–7 days depending on use case.
What the page shows
- App name + logo.
- User id, email (if known), join date.
- All subscriptions: platform, status, product, entitlement, expiry.
- Manage button per subscription — platform-specific deep-link.
REST endpoints
POST /v1/admin/portal/sessions— create session, returns URL.GET /v1/portal/:token— resolve session (no auth — token is the auth).