Self-Serve Billing Flow
Key Characteristics
Recommended Alguna Setup
1
Create simple, clear plans
In the dashboard, Plans → Create Plan; via the API, Create a plan.
- Free: $0, limited features (optional)
- Starter: $X/month, core features
- Pro: $Y/month or per-seat, full features
2
Put checkout on your pricing page
Create a checkout session per plan with
POST /checkout-sessions, passing the plan_id, a success_url and your own client_reference_id, then redirect to the returned url — or mount it in-page with Embedded Checkout. Payment methods and branding come from your organization settings; see Hosted Checkout.3
Enable in-app upgrades
Open the Customer Portal from a “Manage billing” button with
POST /customer-portal-sessions. With plan_overview_settings.allow_self_serve_change on, customers can:- View current plan and usage
- Upgrade or downgrade plans
- Update payment methods
4
Set up automated billing and collections
Plans define the billing cadence; invoices are issued and charged to the stored payment method on schedule. Configure retries and reminders for failed payments in Collections and Dunning.
5
Trigger upgrade prompts from billing events
Subscribe to webhooks —
account.credits.balance_depleted for trial or usage limits, subscription.canceled for win-back — and read entitlements to gate features. The full trial-to-paid flow is in Launch self-serve.Free Trial vs. Freemium
In Alguna a trial is usually a subscription on a free plan plus a credit grant; when the grant is spent, the
account.credits.balance_depleted webhook is your upgrade prompt.
Conversion Optimization
Reduce Checkout Friction
- Accept all major credit cards
- Offer both monthly and annual options
- Show pricing in customer’s currency
- Minimize form fields
- Display trust badges and security info
Upgrade Triggers
Metrics to Track
Key Features to Configure
Hosted Checkout
Set up self-service checkout pages.
Customer Portal
Let customers manage their own subscriptions.
Automations
Trigger emails and actions based on customer behavior.
Dunning
Recover failed payments automatically.
API Reference
Customer Portal API
Generate portal links for customers.
Subscriptions API
Create subscriptions programmatically.
Checkout Sessions API
Mint a checkout for a plan or one-off purchase.
Plans API
Retrieve plans for your pricing page.
Webhooks
Track checkout, subscription and payment events.
Developer quick start
Auth, SDK, events and sandbox.
Related Quick Starts
B2B SaaS
Per-seat and tiered pricing models.
AI & Infrastructure
Usage-based and credit systems.
Hybrid Motion
Add sales-assist for larger deals.
← Back to Quick Starts
See all quick start guides