Billing API
The Billing API provides access to your workspace's plan, usage limits, subscription management, and invoices. Synapse uses Lemon Squeezy as its Merchant of Record -- your workspace never touches credit card data directly.
For a user guide on managing billing in the dashboard, see Billing Settings.
All billing management endpoints (checkout, portal, subscription, invoices) are restricted to the workspace owner. Other roles can view billing status if they have settings:read permission.
Endpoints
| Method | Path | Description |
|---|---|---|
GET | /v1/workspace/billing | Get billing status, usage, and limits |
GET | /v1/workspace/billing/pricing | Get all plans with geo-based pricing |
POST | /v1/workspace/billing/checkout | Create a checkout session |
GET | /v1/workspace/billing/portal-url | Get Lemon Squeezy customer portal URL |
GET | /v1/workspace/billing/subscription | Get subscription details |
POST | /v1/workspace/billing/subscription/pause | Pause the subscription |
POST | /v1/workspace/billing/subscription/resume | Resume a paused subscription |
GET | /v1/workspace/billing/invoices | Get invoice history |
Get Billing Status
Returns the current plan, usage counters, and limits for the workspace.
Auth: JWT (dashboard). Requires settings:read permission.
Response
Get Pricing Plans
Returns all available plans with geo-based pricing. No authentication required -- this endpoint is used on the public pricing page.
Auth: None (public endpoint).
Pricing is geo-aware. Synapse reads the CF-IPCountry header set by Cloudflare to determine the visitor's country. Requests from Vietnam (VN) receive VND pricing; all other countries receive USD pricing. Yearly pricing is 10x monthly (2 months free).
Response
VND Pricing Example
When the request originates from Vietnam:
Create Checkout
Creates a Lemon Squeezy checkout session for upgrading to a paid plan.
Auth: JWT (dashboard). Owner only (billing:read permission).
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
plan_id | string | Yes | Plan to purchase: starter, pro, growth, or enterprise |
billing_interval | string | No | monthly (default) or yearly |
Response (200)
Redirect the user to checkout_url to complete payment on the Lemon Squeezy hosted checkout page. After payment, the user is redirected back to /settings/billing?upgraded=true.
Error Responses
400 -- Invalid plan:
403 -- Not the workspace owner:
502 -- Payment service unavailable:
Get Customer Portal URL
Returns a Lemon Squeezy customer portal URL where the owner can manage their subscription, update payment methods, and download invoices.
Auth: JWT (dashboard). Owner only (billing:read permission).
Response
If the workspace has no Lemon Squeezy customer (never subscribed), portal_url is null.
Get Subscription Details
Returns detailed subscription information including card on file, pause state, and self-service URLs.
Auth: JWT (dashboard). Owner only (billing:read permission).
Response
Error Response (404)
Pause Subscription
Pauses the current subscription. Billing stops at the end of the current period, but the workspace retains access until the period ends.
Auth: JWT (dashboard). Owner only (billing:read permission).
Response
Resume Subscription
Resumes a previously paused subscription. Billing resumes at the next renewal date.
Auth: JWT (dashboard). Owner only (billing:read permission).
Response
Get Invoices
Returns the invoice history for the workspace's subscription.
Auth: JWT (dashboard). Owner only (billing:read permission).
Response
If the workspace has no subscription, returns an empty invoices array.
Plan Limits Reference
| Plan | Emails/mo | Contacts | Members | Flows | Events/mo | Retention | Custom Domain | Priority Support |
|---|---|---|---|---|---|---|---|---|
| Free | 1,000 | 1,000 | 2 | 5 | 10,000 | 60 days | No | No |
| Starter | 10,000 | 10,000 | 3 | 25 | 100,000 | 90 days | Yes | No |
| Pro | 50,000 | 50,000 | 5 | Unlimited | 500,000 | 1 year | Yes | No |
| Growth | 100,000 | 100,000 | 15 | Unlimited | 1,000,000 | 1 year | Yes | Yes |
| Enterprise | Unlimited | Unlimited | Unlimited | Unlimited | Unlimited | Unlimited | Yes | Yes |
Exceeding a plan limit returns 403: