Billing
Subscription management, plan details, Stripe checkout, and customer portal
Billing
Billing endpoints manage subscriptions, Stripe checkout sessions, and customer portal access. All payments are processed through Assisters LLC (Delaware, USA) via Stripe.
Billing endpoints use session authentication (dashboard cookie), not API key auth. They are intended for use in the MisarMail dashboard UI.
Plans
| Plan | Price | Description |
|---|---|---|
free | $0 / mo | Getting started — 1,000 emails/mo |
pro | $24.99 / mo | Growing teams — 25,000 emails/mo |
max | $99.99 / mo | High-volume senders — 100,000 emails/mo |
enterprise | Custom | Unlimited — contact sales |
See Plan Limits for the full feature matrix.
Endpoints
| Method | Path | Description |
|---|---|---|
GET | /api/billing/subscription | Current plan, usage, and trial status |
POST | /api/billing/checkout | Create a Stripe checkout session |
POST | /api/billing/portal | Create a Stripe customer portal link |
GET /api/billing/subscription
Returns the current subscription state, plan limits, usage, and trial status.
curl https://mail.misar.io/api/billing/subscription \
-H "Cookie: sb-access-token=YOUR_SESSION"Response
{
"success": true,
"subscription": {
"plan": "pro",
"status": "active",
"trial_ends_at": null,
"current_period": {
"start": "2026-04-01T00:00:00Z",
"end": "2026-04-30T23:59:59Z"
},
"cancel_at_period_end": false,
"overage_enabled": false
},
"limits": {
"emails_per_month": 25000,
"contacts": 10000,
"campaigns_per_month": null,
"templates": null,
"automations": 10,
"lead_searches_per_month":25,
"lead_results_per_month": 500,
"custom_domains": 3,
"dedicated_ips": 0
},
"usage": {
"emails_sent": 4218,
"contacts": 3102,
"campaigns": 7,
"lead_searches": 12,
"lead_results": 340
}
}null in limits means unlimited. trial_ends_at is a UTC timestamp during the 14-day trial; null after trial ends or on paid plans.
Subscription status values
| Status | Meaning |
|---|---|
trialing | Free trial active |
active | Paid subscription current |
past_due | Payment failed — grace period active |
canceled | Subscription ended |
paused | Manually paused via portal |
POST /api/billing/checkout
Create a Stripe Checkout session for upgrading or subscribing to a plan. Returns a redirect URL.
curl -X POST https://mail.misar.io/api/billing/checkout \
-H "Cookie: sb-access-token=YOUR_SESSION" \
-H "Content-Type: application/json" \
-d '{
"plan": "pro",
"success_url": "https://mail.misar.io/settings/billing?upgraded=1",
"cancel_url": "https://mail.misar.io/pricing"
}'Request Fields
| Field | Type | Required | Notes |
|---|---|---|---|
plan | string | ✓ | pro, max, or enterprise |
success_url | string | — | Redirect after successful payment |
cancel_url | string | — | Redirect if user cancels checkout |
Response
{
"success": true,
"checkout_url": "https://checkout.stripe.com/c/pay/cs_live_..."
}Redirect the user to checkout_url. Stripe handles payment collection and returns the user to success_url on completion.
POST /api/billing/portal
Create a Stripe Customer Portal session for managing the subscription (cancel, update card, view invoices).
curl -X POST https://mail.misar.io/api/billing/portal \
-H "Cookie: sb-access-token=YOUR_SESSION" \
-H "Content-Type: application/json" \
-d '{ "return_url": "https://mail.misar.io/settings/billing" }'Request Fields
| Field | Type | Required | Notes |
|---|---|---|---|
return_url | string | — | Where to redirect after leaving the portal |
Response
{
"success": true,
"portal_url": "https://billing.stripe.com/session/..."
}Portal URLs expire after 5 minutes. Generate a fresh URL each time a user navigates to billing settings — do not cache them.