HTTP API: plans, usage and billing
Plans, subscriptions, usage and its history, compute, entitlements, overage switches, invoices and checkout.
Plans, usage, overage, payments and invoices over HTTP. Amounts are in US cents unless a field says otherwise (Razorpay amounts are in paise). Guides: Billing, invoices and overage, Plans, usage and limits.
| Base URL | https://<project-ref>.sovarias.in — your project URL from Connect. |
| Keys | Send the project's key as apikey. Calls made for a signed-in user also send Authorization: Bearer <access token>. |
| Errors | A status code and {"detail": …} — a sentence, or {code, message} for errors your code may branch on (HTTP API). |
#Plans and prices
GET/api/v1/plans
Every plan with prices, limits, features and the full entitlement list.
Prices are in US cents; staff can change them, so read them from here rather than hard-coding them. entitlements is the complete list of limits and switches the API enforces (Plans, usage and limits).
- Who
- Anyone: no key or session is needed.
Returns
entitlementsobject- Every limit key and its value for the plan.
soft_limitsarray<string>- Keys that bill overage instead of stopping (paid plans).
Responses
- 200Success.
curl -s "$URL/api/v1/plans" \
-H "apikey: $ANON_KEY"Response
[
{
"name": "free",
"display_name": "Free",
"monthly_price_cents": 0,
"annual_price_cents": 0,
"description": "Production projects with light scale.",
"limits": {
"max_projects": 3,
"max_team_members": 5,
"max_organizations": 3,
"max_storage_gb": 50,
"max_function_invocations_per_month": 2000000,
"…": "…"
},
"features": {
"cli_access": true,
"sdk_access": true,
"custom_domains": true,
"priority_support": false,
"image_transforms": true,
"…": "…"
},
"entitlements": {
"org.projects": 3,
"db.read_replicas": 0,
"fn.invocations_month": 2000000,
"…": "…"
},
"soft_limits": [
"fn.invocations_month",
"storage.bytes",
"…"
]
},
{
"name": "pro",
"display_name": "Pro",
"monthly_price_cents": 2900,
"annual_price_cents": 27840,
"description": "Production projects with light scale.",
"limits": {
"max_projects": 3,
"max_team_members": 5,
"max_organizations": 3,
"max_storage_gb": 50,
"max_function_invocations_per_month": 2000000,
"…": "…"
},
"features": {
"cli_access": true,
"sdk_access": true,
"custom_domains": true,
"priority_support": false,
"image_transforms": true,
"…": "…"
},
"entitlements": {
"org.projects": 3,
"db.read_replicas": 0,
"fn.invocations_month": 2000000,
"…": "…"
},
"soft_limits": [
"fn.invocations_month",
"storage.bytes",
"…"
]
}
]GET/api/v1/plans/{name}
One plan.
- Who
- Anyone: no key or session is needed.
Path parameters
namestringrequiredfree,pro,ultra,teamorenterprise.
Responses
- 200Success.
- 404Unknown plan.
curl -s "$URL/api/v1/plans/pro" \
-H "apikey: $ANON_KEY"Response
{
"name": "pro",
"display_name": "Pro",
"monthly_price_cents": 2900,
"annual_price_cents": 27840,
"description": "Production projects with light scale.",
"limits": {
"max_projects": 3,
"max_team_members": 5,
"max_organizations": 3,
"max_storage_gb": 50,
"max_function_invocations_per_month": 2000000,
"…": "…"
},
"features": {
"cli_access": true,
"sdk_access": true,
"custom_domains": true,
"priority_support": false,
"image_transforms": true,
"…": "…"
},
"entitlements": {
"org.projects": 3,
"db.read_replicas": 0,
"fn.invocations_month": 2000000,
"…": "…"
},
"soft_limits": [
"fn.invocations_month",
"storage.bytes",
"…"
]
}GET/api/v1/plans/usage-rates
What paid plans pay past their allowance (pay-as-you-go prices).
- Who
- Anyone: no key or session is needed.
Responses
- 200Success.
curl -s "$URL/api/v1/plans/usage-rates" \
-H "apikey: $ANON_KEY"Response
{
"currency": "USD",
"rates": [
{
"metric": "storage_bytes",
"label": "Object storage",
"price": 0.025,
"unit": "per GB"
},
{
"metric": "function_invocations",
"label": "Function invocations",
"price": 2.0,
"unit": "per million"
},
{
"metric": "mau",
"label": "Monthly active users",
"price": 0.00025,
"unit": "per unit"
}
]
}#Plan, limits and usage
GET/api/v1/subscriptions/{org_id}
The organization's plan and billing state.
- Who
- An organization owner, or a member with billing access, signed in.
Path parameters
org_idstringrequired- The organization.
Responses
- 200Success.
- 403Another organization.
- 401No valid session or key.
curl -s "$URL/api/v1/subscriptions/b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"Response
{
"org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
"plan": "pro",
"billing_cycle": "monthly",
"status": "active",
"account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
"autopay_enabled": true,
"renewal_status": "active",
"current_period_end": "2026-11-01T00:00:00+00:00",
"plan_detail": {
"name": "pro",
"display_name": "Pro",
"monthly_price_cents": 2900,
"annual_price_cents": 27840,
"description": "Production projects with light scale.",
"limits": {
"max_projects": 3,
"max_team_members": 5,
"max_organizations": 3,
"max_storage_gb": 50,
"max_function_invocations_per_month": 2000000,
"…": "…"
},
"features": {
"cli_access": true,
"sdk_access": true,
"custom_domains": true,
"priority_support": false,
"image_transforms": true,
"…": "…"
},
"entitlements": {
"org.projects": 3,
"db.read_replicas": 0,
"fn.invocations_month": 2000000,
"…": "…"
},
"soft_limits": [
"fn.invocations_month",
"storage.bytes",
"…"
]
}
}GET/api/v1/billing/orgs/{org_id}/summary
Plan, renewal date and state, how renewals are paid, and the newest invoices, in one read.
What Sovaria Workspace's Billing screen and Sovariq's get_billing_summary read. Never creates anything: an organization that was never on a paid plan reads as its free default, with no renewal date (renewal.date: null) and no payment method. The card or UPI label is returned only to the account that pays (is_payer, payment_method.visible) and to Sovaria staff; other members see whether autopay is on. invoices: null means they couldn't be read right now, not that there are none. Seats are a separate read: GET /api/v1/org/{org_id}/seats (HTTP API: organizations, projects and keys).
- Who
- An organization owner, or a member with billing access, signed in.
Path parameters
org_idstringrequired- The organization.
Query parameters
invoicesintegeroptionaldefault6- 0–36
Returns
renewal.statusstringactive,cancel_scheduled,past_due(pay beforegrace_until) orrestricted.payment_methodobject | null- null on a free plan.
visiblefalse: only whether autopay is on. invoicesarray | null- Newest first,
?invoices=of them (0–36, default 6);total_centsin US cents.
Responses
- 200Success.
- 403Your role doesn't include See plan, usage and invoices (
billing.read), or another organization. - 401No valid session or key.
curl -s "$URL/api/v1/billing/orgs/b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90/summary" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"Response
{
"org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
"plan": "pro",
"plan_name": "Pro",
"billing_cycle": "monthly",
"status": "active",
"renewal": {
"date": "2026-12-01T00:00:00+00:00",
"status": "active",
"cancel_at_period_end": false,
"grace_until": null,
"period_start": "2026-11-01T00:00:00+00:00"
},
"seat_limit": 5,
"payment_method": {
"autopay": true,
"mandate": "active",
"visible": true,
"method": "card",
"label": "Visa •••• 4242",
"set_at": "2026-11-01T09:12:00+00:00",
"max_amount_paise": 1500000
},
"is_payer": true,
"invoices": [
{
"id": 7,
"period": "2026-10",
"plan": "pro",
"total_cents": 2500,
"status": "paid",
"issued_at": "2026-11-01T00:05:00+00:00"
}
]
}GET/api/v1/entitlements/{org_id}
Everything the organization's plan allows, with current usage and the plan needed for more.
What the console's usage page and every plan check read. required_plan names the cheapest plan that raises each limit.
- Who
- An organization owner, or a member with billing access, signed in.
Path parameters
org_idstringrequired- The organization.
Query parameters
project_idstring | nulloptional- The project id.
Responses
- 200Success.
- 401No valid session or key.
curl -s "$URL/api/v1/entitlements/b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"Response
{
"org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
"plan": "pro",
"plan_display_name": "Pro",
"entitlements": {
"org.projects": 3,
"storage.bytes": 53687091200,
"fn.invocations_month": 2000000,
"…": "…"
},
"soft_limits": [
"fn.invocations_month"
],
"labels": {
"org.projects": "Projects",
"storage.bytes": "Storage",
"…": "…"
},
"required_plan": {
"org.projects": "Ultra",
"…": "…"
},
"usage": {
"fn.invocations_month": {
"used": 2206000,
"scope": "org",
"period": "2026-10"
},
"org.projects": {
"used": 2,
"scope": "org"
}
},
"period": "2026-10",
"resets_at": "2026-11-01T00:00:00+00:00"
}GET/api/v1/usage/{org_id}
This month's metered usage against the plan's allowances, plus compute hours.
- Who
- An organization owner, or a member with billing access, signed in.
Path parameters
org_idstringrequired- The organization.
Query parameters
periodstring | nulloptionalYYYY-MM(default this month).
Responses
- 200Success.
- 401No valid session or key.
curl -s "$URL/api/v1/usage/b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90?period=2026-10" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"Response
{
"org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
"period": "2026-10",
"plan": "pro",
"totals": {
"api_calls": 812345,
"function_invocations": 2206000,
"realtime_messages": 41200,
"egress_bytes": 3221225472,
"storage_bytes": 1073741824,
"mau": 1840
},
"limits": {
"api_calls": 10000000,
"function_invocations": 2000000,
"realtime_messages": 5000000,
"egress_bytes": 268435456000,
"storage_bytes": 53687091200,
"mau": 100000
},
"metrics": {
"…": "same as totals"
},
"gauges": {
"mau": 1840
},
"compute": {
"total_hours": 432.0,
"fee_cents": 600,
"projects": [
{
"project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
"compute_size": "micro",
"hours": 432.0,
"billable_hours": 432.0,
"fee_cents": 600
}
]
}
}GET/api/v1/usage/{org_id}/history
Usage totals for past months.
- Who
- An organization owner, or a member with billing access, signed in.
Path parameters
org_idstringrequired- The organization.
Query parameters
monthsintegeroptionaldefault6- How many (1–36).
- 1–36
Responses
- 200Success.
- 401No valid session or key.
curl -s "$URL/api/v1/usage/b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90/history?months=3" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"Response
[
{
"org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
"period": "2026-09",
"totals": {
"api_calls": 1904211,
"function_invocations": 1302000
},
"metrics": {
"…": "same as totals"
}
}
]GET/api/v1/compute/{org_id}
Database compute hours and their cost this month, per project.
- Who
- An organization owner, or a member with billing access, signed in.
Path parameters
org_idstringrequired- The organization.
Query parameters
periodstring | nulloptionalYYYY-MM.
Responses
- 200Success.
- 401No valid session or key.
curl -s "$URL/api/v1/compute/b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"Response
{
"org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
"period": "2026-10",
"total_hours": 432.0,
"fee_cents": 600,
"projects": [
{
"project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
"compute_size": "micro",
"hours": 432.0,
"billable_hours": 432.0,
"fee_cents": 600
}
]
}PUT/api/v1/subscriptions/{org_id}
Move the organization to the Free plan. Paid plans go through checkout.
- Who
- An organization owner or admin.
Path parameters
org_idstringrequired- The organization.
Body
planstringrequiredfree.billing_cyclestringoptionaldefaultmonthlymonthlyorannual.- pattern `^(monthly|annual)$`
stripe_customer_idstring | nulloptional- Staff only.
metadataobjectoptional- Staff only.
Responses
- 200The subscription, as in GET.
- 403A paid plan — use
POST /api/v1/billing/checkout. - 401No valid session or key.
- 422The body is missing a required field or has a field of the wrong type.
curl -s -X PUT "$URL/api/v1/subscriptions/b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"plan": "free"}'DELETE/api/v1/subscriptions/{org_id}
Cancel the subscription (at the end of the period, or now with immediate=true).
- Who
- An organization owner or admin.
Path parameters
org_idstringrequired- The organization.
Query parameters
immediatebooleanoptionaldefaultfalse- End it now instead of at the period end.
Responses
- 200The subscription after the change.
- 401No valid session or key.
curl -s -X DELETE "$URL/api/v1/subscriptions/b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"#Overage and spend cap
GET/api/v1/billing/overage/{org_id}
Overage so far this period (paid plans): what usage past the allowance will cost.
- Who
- An organization owner, or a member with billing access, signed in.
Path parameters
org_idstringrequired- The organization.
Responses
- 200Success.
- 401No valid session or key.
curl -s "$URL/api/v1/billing/overage/b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"Response
{
"org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
"plan": "pro",
"account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
"period_start": "2026-10-01T00:00:00+00:00",
"period_end": "2026-11-01T00:00:00+00:00",
"projected_overage_cents": 412,
"accrued_cents": 412,
"lines": [
{
"kind": "overage",
"metric": "function_invocations",
"label": "Function invocations",
"over_units": 206000,
"amount_cents": 412
}
],
"source": "accrual"
}GET/api/v1/billing/orgs/{org_id}/overage-prefs
Which services may go past the allowance (and bill overage) instead of stopping.
- Who
- An organization owner, or a member with billing access, signed in.
Path parameters
org_idstringrequired- The organization.
Returns
boundboolean- Whether the organization has a billing account (Free organizations don't).
Responses
- 200Success.
- 401No valid session or key.
curl -s "$URL/api/v1/billing/orgs/b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90/overage-prefs" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"Response
{
"account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
"services": [
{
"metric": "function_invocations",
"label": "Function invocations",
"enabled": true,
"billable": true
},
{
"metric": "email_sends",
"label": "Emails (Sovaria sender)",
"enabled": false,
"billable": true
}
],
"enabled_map": {
"function_invocations": true,
"email_sends": false
},
"bound": true
}PUT/api/v1/billing/orgs/{org_id}/overage-prefs
Allow or stop overage per service.
- Who
- An organization owner or admin.
Path parameters
org_idstringrequired- The organization.
Body
servicesobject<string, boolean>required- Metric →
true(bill overage) orfalse(stop at the allowance).
Responses
- 200The same shape as GET.
- 401No valid session or key.
- 422The body is missing a required field or has a field of the wrong type.
curl -s -X PUT "$URL/api/v1/billing/orgs/b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90/overage-prefs" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"services": {"function_invocations": true, "email_sends": false}}'GET/api/v1/billing/orgs/{org_id}/spend-cap
The monthly cap on overage spend, how much is used, and the budget alerts.
Every paid account has a cap on the month's overage: by default a multiple of the plan's monthly price (plan_default: 3× on Pro and Ultra, 2× on Team), or an amount the owner picks (custom), or none (none, owners only). Owners are alerted at each threshold (50/80/100 % by default). At 100 % the account is capped: metered services stop at their limits until the next period or until the cap is raised (Plans, usage and limits).
- Who
- An organization owner, or a member with billing access, signed in.
Path parameters
org_idstringrequired- The organization.
Returns
cap_sourcestringplan_default,owner,noneorstaff(a Sovaria override).cappedboolean- The cap is reached; overage is blocked.
Responses
- 200Success.
- 401No valid session or key.
curl -s "$URL/api/v1/billing/orgs/b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90/spend-cap" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"Response
{
"org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
"bound": true,
"account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
"plan": "pro",
"plan_name": "Pro",
"applies": true,
"period_start": "2026-10-01T00:00:00+00:00",
"period_end": "2026-11-01T00:00:00+00:00",
"spent_cents": 412,
"cap_cents": 8700,
"cap_source": "plan_default",
"default_cap_cents": 8700,
"percent": 4.7,
"capped": false,
"mode": "plan_default",
"owner_cap_cents": null,
"alert_thresholds": [
50,
80,
100
],
"alerts_sent": [],
"staff_override": null,
"updated_by": null,
"updated_at": null,
"lines": [
{
"kind": "overage",
"metric": "function_invocations",
"label": "Function invocations",
"over_units": 206000,
"amount_cents": 412
}
]
}PUT/api/v1/billing/orgs/{org_id}/spend-cap
Set the overage spend cap and alert thresholds.
- Who
- An organization owner or admin (removing the cap: owners only).
Path parameters
org_idstringrequired- The organization.
Body
modestringrequired- One of
plan_default,custom,none cap_centsintegeroptional- For
custom: the cap in US cents. alert_thresholdsarray<integer>optional- Percentages to be alerted at (up to 10).
Responses
- 200Success.
- 403Not allowed, or
PLAN_FEATURE_UNAVAILABLE— the plan always stops at its limits (Free). - 409No billing account yet.
- 400Invalid mode or amount.
- 401No valid session or key.
curl -s -X PUT "$URL/api/v1/billing/orgs/b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90/spend-cap" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"mode": "custom", "cap_cents": 10000, "alert_thresholds": [50, 90, 100]}'Response
{
"org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
"bound": true,
"account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
"plan": "pro",
"plan_name": "Pro",
"applies": true,
"period_start": "2026-10-01T00:00:00+00:00",
"period_end": "2026-11-01T00:00:00+00:00",
"spent_cents": 412,
"cap_cents": 10000,
"cap_source": "owner",
"default_cap_cents": 8700,
"percent": 4.1,
"capped": false,
"mode": "custom",
"owner_cap_cents": 10000,
"alert_thresholds": [
50,
90,
100
],
"alerts_sent": [],
"staff_override": null,
"updated_by": null,
"updated_at": null,
"lines": [
{
"kind": "overage",
"metric": "function_invocations",
"label": "Function invocations",
"over_units": 206000,
"amount_cents": 412
}
]
}#Buying a plan
GET/api/v1/billing/provider
Which payment provider checkout uses (Razorpay or Stripe).
- Who
- Anyone: no key or session is needed.
Responses
- 200Success.
- 401No valid session or key.
curl -s "$URL/api/v1/billing/provider" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"Response
{
"provider": "razorpay",
"configured": true,
"providers": {
"stripe": false,
"razorpay": true
},
"razorpay_key_id": "rzp_live_…",
"checkout_mode": "razorpay_standard"
}GET/api/v1/billing/fx
The exchange rate used to show prices in another currency.
- Who
- Anyone: no key or session is needed.
Query parameters
basestringoptionaldefaultUSD- Default
USD. quotestringoptionaldefaultINR- Default
INR.
Responses
- 200Success.
- 401No valid session or key.
curl -s "$URL/api/v1/billing/fx" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"Response
{
"base": "USD",
"quote": "INR",
"rate": 84.12,
"fetched_at": "2026-10-18T06:00:00+00:00",
"source": "live",
"stale": false
}POST/api/v1/billing/coupons/check
What a coupon takes off a plan.
- Who
- Any signed-in console account.
Body
codestringrequired- The coupon.
- 1–40 characters
planstringrequiredproorultra.billing_cyclestringoptionaldefaultmonthlymonthlyorannual.- pattern `^(monthly|annual)$`
Returns
amount, currencyinteger, string- What the provider will charge, in its smallest unit (paise for INR).
Responses
- 200Success.
- 400Unknown, expired or not for this plan (the message says which).
- 401Sign in first.
- 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/billing/coupons/check" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"code": "LAUNCH20", "plan": "pro", "billing_cycle": "monthly"}'Response
{
"valid": true,
"code": "LAUNCH20",
"description": "20% off the first payment",
"percent_off": 20,
"amount_off_cents": null,
"list_usd_cents": 2900,
"discount_usd_cents": 580,
"final_usd_cents": 2320,
"amount": 195100,
"currency": "INR"
}POST/api/v1/billing/checkout
Start buying a plan for the organization.
Self-serve plans: pro and ultra (enterprise through sales). With Stripe the answer has a hosted checkout url to send the browser to; with Razorpay it has an order_id, amount and key_id to open Razorpay's checkout, then POST /api/v1/billing/razorpay/verify-payment (Billing, invoices and overage).
- Who
- An organization owner or a member with billing access.
Body
planstringrequired- One of
pro,ultra billing_cyclestringoptionaldefaultmonthly- One of
monthly,annual customer_emailstringoptionalproviderstringoptional- One of
stripe,razorpay
Responses
- 200Success.
- 400Not a self-serve plan, or no organization header.
- 501The payment provider isn't configured.
- 401No valid session or key.
curl -s -X POST "$URL/api/v1/billing/checkout" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"plan": "pro", "billing_cycle": "annual"}'Response
{
"checkout_session_id": "order_PbX…",
"url": null,
"provider": "razorpay",
"mode": "razorpay_standard",
"order_id": "order_PbX…",
"amount": 2341900,
"currency": "INR",
"key_id": "rzp_live_…",
"org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
"plan": "pro",
"billing_cycle": "annual"
}POST/api/v1/billing/razorpay/create-order
Create a Razorpay order for a plan (with an optional coupon).
- Who
- An organization owner or a member with billing access.
Body
planstringrequiredproorultra.billing_cyclestringoptionaldefaultmonthlymonthlyorannual.- pattern `^(monthly|annual)$`
customer_emailstring | nulloptional- Receipt email.
account_idstring | nulloptional- Billing account (default: you).
coupon_codestring | nulloptional- A coupon.
- 0–40 characters
countrystring | nulloptional- Billing country (ISO 3166 alpha-2). IN pays the rupee price; saved on the billing account.
- pattern `^[A-Za-z]{2}$`
Responses
- 200Success.
- 400Not self-serve, or the coupon brings it below the ₹1 card minimum.
- 401Sign in first.
- 501Razorpay isn't configured.
- 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/billing/razorpay/create-order" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"plan": "pro", "billing_cycle": "monthly", "coupon_code": "LAUNCH20"}'Response
{
"order_id": "order_PbX…",
"amount": 195100,
"currency": "INR",
"key_id": "rzp_live_…",
"org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
"plan": "pro",
"billing_cycle": "monthly"
}POST/api/v1/billing/razorpay/verify-payment
Confirm a Razorpay payment: checks the signature and the amount, then applies what the order was for (a plan, a renewal, add-on units or an autopay mandate).
Send what Razorpay's checkout returned. Safe to repeat: a payment already applied answers duplicate: true.
- Who
- The person who paid, signed in.
Body
razorpay_order_idstringrequired- From Razorpay.
- at least 1 characters
razorpay_payment_idstringrequired- From Razorpay.
- at least 1 characters
razorpay_signaturestringrequired- From Razorpay.
- at least 1 characters
org_idstring | nulloptional- The organization (must match the order).
account_idstring | nulloptional- The billing account (must match).
customer_emailstring | nulloptional- Receipt email.
Responses
- 200Success.
- 400Signature check failed, underpaid, or a mismatched order.
- 402The order isn't paid yet.
- 403The order belongs to another organization or account.
- 401No valid session or key.
- 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/billing/razorpay/verify-payment" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"razorpay_order_id": "order_PbX…", "razorpay_payment_id": "pay_PbY…", "razorpay_signature": "9c0e…"}'Response
{
"verified": true,
"kind": "checkout",
"duplicate": false,
"org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
"account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
"plan": "pro",
"billing_cycle": "monthly",
"payment_id": "pay_PbY…",
"order_id": "order_PbX…"
}#Invoices
GET/api/v1/invoices/{org_id}
The organization's invoices, newest first.
- Who
- An organization owner, or a member with billing access, signed in.
Path parameters
org_idstringrequired- The organization.
Query parameters
limitintegeroptionaldefault12- How many (1–36).
- 1–36
Returns
statusstringdraft,issuedorpaid.line_items[].kindstringplan_fee,compute,compute_credit,overage…*_centsinteger- US cents.
Responses
- 200Success.
- 401No valid session or key.
curl -s "$URL/api/v1/invoices/b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"Response
[
{
"id": 311,
"org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
"period": "2026-09",
"plan": "pro",
"plan_fee_cents": 2900,
"compute_fee_cents": 1000,
"overage_fee_cents": 412,
"credit_cents": 1000,
"total_cents": 3312,
"line_items": [
{
"kind": "plan_fee",
"description": "Pro plan (monthly)",
"amount_cents": 2900
},
{
"kind": "compute",
"description": "Compute micro × 720 h",
"amount_cents": 1000
},
{
"kind": "compute_credit",
"description": "Included compute credit (Pro)",
"amount_cents": -1000
},
{
"kind": "overage",
"description": "Function invocations: 206,000 over",
"amount_cents": 412
}
],
"status": "issued",
"issued_at": "2026-10-01T00:05:00+00:00",
"created_at": "2026-10-01T00:05:00+00:00",
"stripe_invoice_id": null,
"account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51"
}
]POST/api/v1/invoices/{org_id}/build
Preview the invoice for a period (a draft; nothing is charged).
- Who
- An organization owner, or a member with billing access, signed in.
Path parameters
org_idstringrequired- The organization.
Query parameters
periodstring | nulloptionalYYYY-MM.
Responses
- 200Success.
- 401No valid session or key.
curl -s -X POST "$URL/api/v1/invoices/b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90/build?period=2026-10" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"Response
{
"id": 311,
"org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
"period": "2026-10",
"plan": "pro",
"plan_fee_cents": 2900,
"compute_fee_cents": 1000,
"overage_fee_cents": 412,
"credit_cents": 1000,
"total_cents": 3312,
"line_items": [
{
"kind": "plan_fee",
"description": "Pro plan (monthly)",
"amount_cents": 2900
},
{
"kind": "compute",
"description": "Compute micro × 720 h",
"amount_cents": 1000
},
{
"kind": "compute_credit",
"description": "Included compute credit (Pro)",
"amount_cents": -1000
},
{
"kind": "overage",
"description": "Function invocations: 206,000 over",
"amount_cents": 412
}
],
"status": "draft",
"issued_at": null,
"created_at": "2026-10-01T00:05:00+00:00",
"stripe_invoice_id": null,
"account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51"
}GET/api/v1/billing/invoices/open
The latest issued, unpaid invoice for your account (or organization), if any.
- Who
- An organization owner, or a member with billing access, signed in.
Responses
- 200Success.
- 401No valid session or key.
curl -s "$URL/api/v1/billing/invoices/open" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"Response
{
"invoice": {
"id": 311,
"org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
"period": "2026-09",
"plan": "pro",
"plan_fee_cents": 2900,
"compute_fee_cents": 1000,
"overage_fee_cents": 412,
"credit_cents": 1000,
"total_cents": 3312,
"line_items": [
{
"kind": "plan_fee",
"description": "Pro plan (monthly)",
"amount_cents": 2900
},
{
"kind": "compute",
"description": "Compute micro × 720 h",
"amount_cents": 1000
},
{
"kind": "compute_credit",
"description": "Included compute credit (Pro)",
"amount_cents": -1000
},
{
"kind": "overage",
"description": "Function invocations: 206,000 over",
"amount_cents": 412
}
],
"status": "issued",
"issued_at": "2026-10-01T00:05:00+00:00",
"created_at": "2026-10-01T00:05:00+00:00",
"stripe_invoice_id": null,
"account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51"
}
}POST/api/v1/billing/invoices/{org_id}/{period}/pay
Pay an issued invoice now: returns a Razorpay order or a Stripe checkout link.
- Who
- An organization owner, or a member with billing access, signed in.
Path parameters
org_idstringrequired- The organization.
periodstringrequiredYYYY-MM.
Responses
- 200Success.
- 401No valid session or key.
curl -s -X POST "$URL/api/v1/billing/invoices/b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90/2026-10/pay" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"Response
{
"mode": "razorpay_standard",
"provider": "razorpay",
"order_id": "order_…",
"amount": 278600,
"currency": "INR",
"key_id": "rzp_live_…",
"org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
"period": "2026-10",
"account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
"plan": "pro",
"total_cents": 3312
}#Billing account, add-ons and autopay
GET/api/v1/accounts/{account_id}
The billing account: plan, cycle, autopay and renewal state.
- Who
- The account's owner (the billing account id is their user id).
Path parameters
account_idstringrequired- Its id (the owner's user id).
Returns
renewal_statusstringactive,cancel_scheduledorpast_due(a renewal payment failed).grace_untilstring | null- After a failed renewal, until when the plan is kept.
Responses
- 200Success.
- 401No valid session or key.
curl -s "$URL/api/v1/accounts/6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"Response
{
"account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
"plan": "pro",
"billing_cycle": "monthly",
"status": "active",
"renewal_status": "active",
"autopay_enabled": true,
"grace_until": null,
"current_period_start": "2026-10-01T00:00:00+00:00",
"current_period_end": "2026-11-01T00:00:00+00:00",
"payment_provider": "razorpay",
"provider_customer_id": "cust_…",
"metadata": {},
"created_at": "2026-09-01T10:00:00+00:00",
"plan_detail": {
"name": "pro",
"display_name": "Pro",
"monthly_price_cents": 2900,
"annual_price_cents": 27840,
"description": "Production projects with light scale.",
"limits": {
"max_projects": 3,
"max_team_members": 5,
"max_organizations": 3,
"max_storage_gb": 50,
"max_function_invocations_per_month": 2000000,
"…": "…"
},
"features": {
"cli_access": true,
"sdk_access": true,
"custom_domains": true,
"priority_support": false,
"image_transforms": true,
"…": "…"
},
"entitlements": {
"org.projects": 3,
"db.read_replicas": 0,
"fn.invocations_month": 2000000,
"…": "…"
},
"soft_limits": [
"fn.invocations_month",
"storage.bytes",
"…"
]
}
}PUT/api/v1/accounts/{account_id}/plan
Move the billing account (and its organizations) to Free. Paid plans go through checkout.
- Who
- The account's owner (the billing account id is their user id).
Path parameters
account_idstringrequired- The account.
Body
planstringrequiredfree.billing_cyclestringoptionaldefaultmonthlymonthlyorannual.- pattern `^(monthly|annual)$`
Responses
- 200Success.
- 403A paid plan needs checkout.
- 401No valid session or key.
- 422The body is missing a required field or has a field of the wrong type.
curl -s -X PUT "$URL/api/v1/accounts/6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/plan" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"plan": "free"}'Response
{
"account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
"plan": "free",
"billing_cycle": "monthly",
"status": "active",
"renewal_status": "active",
"autopay_enabled": true,
"grace_until": null,
"current_period_start": "2026-10-01T00:00:00+00:00",
"current_period_end": "2026-11-01T00:00:00+00:00",
"payment_provider": "razorpay",
"provider_customer_id": "cust_…",
"metadata": {},
"created_at": "2026-09-01T10:00:00+00:00"
}POST/api/v1/accounts/{account_id}/autopay
Turn automatic renewal on or off (off = cancel at the period end, keeping the plan until then).
- Who
- The account's owner (the billing account id is their user id).
Path parameters
account_idstringrequired- The account.
Query parameters
enabledbooleanrequiredtrueorfalse.
Responses
- 200Success.
- 401No valid session or key.
curl -s -X POST "$URL/api/v1/accounts/6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/autopay?enabled=false" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"Response
{
"account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
"plan": "pro",
"billing_cycle": "monthly",
"status": "active",
"renewal_status": "cancel_scheduled",
"autopay_enabled": false,
"grace_until": null,
"current_period_start": "2026-10-01T00:00:00+00:00",
"current_period_end": "2026-11-01T00:00:00+00:00",
"payment_provider": "razorpay",
"provider_customer_id": "cust_…",
"metadata": {},
"created_at": "2026-09-01T10:00:00+00:00"
}POST/api/v1/accounts/{account_id}/cancel
Cancel at the end of the period (the same as turning autopay off).
- Who
- The account's owner (the billing account id is their user id).
Path parameters
account_idstringrequired- The account.
Responses
- 200Success.
- 401No valid session or key.
curl -s -X POST "$URL/api/v1/accounts/6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/cancel" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"Response
{
"account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
"plan": "pro",
"billing_cycle": "monthly",
"status": "active",
"renewal_status": "cancel_scheduled",
"autopay_enabled": false,
"grace_until": null,
"current_period_start": "2026-10-01T00:00:00+00:00",
"current_period_end": "2026-11-01T00:00:00+00:00",
"payment_provider": "razorpay",
"provider_customer_id": "cust_…",
"metadata": {},
"created_at": "2026-09-01T10:00:00+00:00"
}POST/api/v1/accounts/{account_id}/resume
Undo a scheduled cancel.
- Who
- The account's owner (the billing account id is their user id).
Path parameters
account_idstringrequired- The account.
Responses
- 200Success.
- 401No valid session or key.
curl -s -X POST "$URL/api/v1/accounts/6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/resume" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"Response
{
"account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
"plan": "pro",
"billing_cycle": "monthly",
"status": "active",
"renewal_status": "active",
"autopay_enabled": true,
"grace_until": null,
"current_period_start": "2026-10-01T00:00:00+00:00",
"current_period_end": "2026-11-01T00:00:00+00:00",
"payment_provider": "razorpay",
"provider_customer_id": "cust_…",
"metadata": {},
"created_at": "2026-09-01T10:00:00+00:00"
}GET/api/v1/accounts/{account_id}/addons
Add-ons for the account's plan: price, units paid for and until when, how many renew, free units, and the autopay mandate.
Add-ons are paid before they count (prorated to the end of the current billing period) and renew with the plan. quantity is what changes the limits now (paid units, plus free units from Sovaria).
- Who
- The account's owner (the billing account id is their user id).
Path parameters
account_idstringrequired- The account.
Returns
price_centsinteger- Per unit per month, US cents (12 × on an annual plan).
availableboolean- Can be bought on this plan (Pro and Ultra; Team and Enterprise include domains).
paid_quantityinteger- Units paid for that are in force now.
renew_quantityinteger- Units billed again on the next renewal (≤ paid_quantity).
comp_quantityinteger- Free units Sovaria granted; never invoiced.
paid_throughstring | null- When the paid units run out unless renewed.
prorated_unit_centsinteger | null- What one more unit costs today, for the rest of this period.
autopay.mandatestringactive,noneorremoved. Token ids are never returned.
Responses
- 200Success.
- 401No valid session or key.
curl -s "$URL/api/v1/accounts/6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/addons" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"Response
{
"account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
"plan": "pro",
"current_period_end": "2026-11-09T00:00:00+00:00",
"billing_cycle": "monthly",
"addons": [
{
"id": "extra_project",
"label": "Extra project",
"scope": "org",
"price_cents": 1000,
"max_quantity": 10,
"available": true,
"included_in_plan": false,
"quantity": 2,
"paid_quantity": 2,
"renew_quantity": 1,
"comp_quantity": 0,
"paid_through": "2026-11-09T00:00:00+00:00",
"prorated_unit_cents": 650,
"enabled": true
},
{
"id": "custom_domains",
"label": "Custom domain",
"scope": "project",
"price_cents": 1000,
"max_quantity": 10,
"available": true,
"included_in_plan": false,
"quantity": 1,
"paid_quantity": 1,
"renew_quantity": 1,
"comp_quantity": 0,
"paid_through": "2026-11-09T00:00:00+00:00",
"prorated_unit_cents": 650,
"enabled": true
},
{
"id": "extra_environment",
"label": "Extra environment per project",
"scope": "project",
"price_cents": 500,
"max_quantity": 10,
"available": true,
"included_in_plan": false,
"quantity": 0,
"paid_quantity": 0,
"renew_quantity": 0,
"comp_quantity": 0,
"paid_through": null,
"prorated_unit_cents": 325,
"enabled": false
}
],
"autopay": {
"mandate": "active",
"method": "card",
"label": "Visa •••• 4242",
"max_amount_paise": 1500000,
"set_at": "2026-10-20T09:12:00+00:00",
"renews_automatically": true,
"last_charge": null
}
}POST/api/v1/accounts/{account_id}/addons/{addon_id}
Older switch. Turning an add-on off (or down) sets what renews at the period end; asking for more units than are paid for answers 402.
- Who
- The account's owner (the billing account id is their user id).
Path parameters
account_idstringrequired- The account.
addon_idstringrequiredcustom_domains,extra_project,extra_environment.
Query parameters
enabledbooleanrequiredtrueorfalse.quantityintegeroptionaldefault1- Units (1–100).
- 1–100
Responses
- 200The add-on list, as in GET.
- 402
PAYMENT_REQUIRED: more units than are paid for. The detail names the checkout route and how many to buy. - 404Unknown add-on.
- 401No valid session or key.
curl -s -X POST "$URL/api/v1/accounts/6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/addons/extra_environment?enabled=false" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"POST/api/v1/accounts/{account_id}/addons/{addon_id}/checkout
Start paying for more units: a Razorpay order for the rest of the current billing period. The units count once the payment is verified.
Open the order in Razorpay Checkout, then send its result to POST /api/v1/billing/razorpay/verify-payment (the webhook applies it too, once). Refused while an invoice is unpaid.
- Who
- The account's owner (the billing account id is their user id). Send
X-Sovaria-Org-IDfor the organization the account pays for.
Path parameters
account_idstringrequired- The account.
addon_idstringrequiredextra_project,custom_domainsorextra_environment.
Body
quantityintegeroptionaldefault1- Units to add (1–100, up to the add-on's maximum per account).
- 1.0–100.0
project_idstring | nulloptional- Optional: the project the units are bought from (shown on the receipt; units belong to the organization).
- 0–64 characters
Returns
amountinteger- What Razorpay charges, in paise (at the day's USD rate).
usd_centsinteger- The prorated price in US cents (at least one day, rounded up).
paid_throughstring- The current period end; the units renew with the plan from then.
Responses
- 200Success.
- 400Not on this plan (needs Pro or Ultra), included in the plan, over the maximum, an unpaid invoice, or the plan renews within the hour.
- 403The organization is billed to another account.
- 503Payments are unavailable.
- 401No valid session or key.
- 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/accounts/6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/addons/custom_domains/checkout" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"quantity": 1, "project_id": "0f3a8c21-6b4d-4e7a-a1c5-9d2e7b6f4a10"}'Response
{
"mode": "razorpay_standard",
"order_id": "order_PcA…",
"amount": 57200,
"currency": "INR",
"key_id": "rzp_live_…",
"addon_id": "custom_domains",
"quantity": 1,
"usd_cents": 650,
"paid_through": "2026-11-09T00:00:00+00:00",
"monthly_price_cents": 1000
}PUT/api/v1/accounts/{account_id}/addons/{addon_id}/renewal
Set how many units renew at the period end (0 cancels). Units already paid for keep working until then; nothing is refunded.
- Who
- The account's owner (the billing account id is their user id).
Path parameters
account_idstringrequired- The account.
addon_idstringrequiredextra_project,custom_domainsorextra_environment.
Body
renew_quantityintegerrequired- 0 up to the units paid for. Buy more with the checkout to go higher.
- 0.0–1000.0
Responses
- 200The add-on list, as in GET.
- 400More than the units paid for, or an unknown add-on.
- 401No valid session or key.
- 422The body is missing a required field or has a field of the wrong type.
curl -s -X PUT "$URL/api/v1/accounts/6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/addons/extra_project/renewal" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"renew_quantity": 1}'POST/api/v1/accounts/{account_id}/autopay/setup
Start a ₹1 authorisation (refunded at once) that saves a card or UPI mandate, so renewals are charged automatically.
Open the order in Razorpay Checkout with recurring: "1" and the returned customer_id, then verify it like any payment. Razorpay notifies the payer before each renewal charge and collects about 36 hours later; up to ₹15,000 per charge (a larger renewal is sent as a payment link).
- Who
- The account's owner (the billing account id is their user id). Paid plans only.
Path parameters
account_idstringrequired- The account.
Body
customer_emailstring | nulloptional- Optional: the email for the mandate (defaults to the account's billing email).
- 0–254 characters
namestring | nulloptional- Optional: the name on it.
- 0–80 characters
Responses
- 200Success.
- 400On the Free plan, or no billing email.
- 503Payments are unavailable.
- 401No valid session or key.
- 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/accounts/6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/autopay/setup" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"customer_email": "owner@example.com"}'Response
{
"mode": "razorpay_recurring",
"order_id": "order_PcM…",
"amount": 100,
"currency": "INR",
"key_id": "rzp_live_…",
"customer_id": "cust_PcK…",
"recurring": "1",
"max_amount_paise": 1500000
}DELETE/api/v1/accounts/{account_id}/autopay/mandate
Remove the saved mandate (also deleted at Razorpay). Renewals become invoices to pay by hand within the plan's grace days.
- Who
- The account's owner (the billing account id is their user id).
Path parameters
account_idstringrequired- The account.
Responses
- 200Success.
- 401No valid session or key.
curl -s -X DELETE "$URL/api/v1/accounts/6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/autopay/mandate" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"Response
{
"account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
"autopay": {
"mandate": "removed",
"method": null,
"label": null,
"max_amount_paise": null,
"set_at": null,
"renews_automatically": false,
"last_charge": null
}
}GET/api/v1/billing/accounts/{account_id}/overage
Overage accrued this period across all the account's organizations.
- Who
- The account's owner (the billing account id is their user id).
Path parameters
account_idstringrequired- The account.
Responses
- 200Success.
- 401No valid session or key.
curl -s "$URL/api/v1/billing/accounts/6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/overage" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"Response
{
"account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
"plan": "pro",
"period_start": "2026-10-01T00:00:00+00:00",
"period_end": "2026-11-01T00:00:00+00:00",
"projected_overage_cents": 412,
"accrued_cents": 412,
"lines": [
{
"kind": "overage",
"metric": "function_invocations",
"label": "Function invocations",
"over_units": 206000,
"amount_cents": 412
}
],
"source": "accrual",
"org_ids": [
"b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90"
]
}GET/api/v1/billing/accounts/{account_id}/overage-prefs
Per-service overage switches for the whole account.
- Who
- The account's owner (the billing account id is their user id).
Path parameters
account_idstringrequired- The account.
Responses
- 200Success.
- 401No valid session or key.
curl -s "$URL/api/v1/billing/accounts/6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/overage-prefs" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"Response
{
"account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
"services": [
{
"metric": "function_invocations",
"label": "Function invocations",
"enabled": true,
"billable": true
}
],
"enabled_map": {
"function_invocations": true
}
}PUT/api/v1/billing/accounts/{account_id}/overage-prefs
Change the account's per-service overage switches.
- Who
- The account's owner (the billing account id is their user id).
Path parameters
account_idstringrequired- The account.
Body
servicesobject<string, boolean>required- Metric → on/off.
Responses
- 200The same shape as GET.
- 401No valid session or key.
- 422The body is missing a required field or has a field of the wrong type.
curl -s -X PUT "$URL/api/v1/billing/accounts/6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/overage-prefs" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"services": {"function_invocations": false}}'POST/api/v1/billing/orgs/{org_id}/bind-account
Bill the organization to your account (it takes the account's plan).
An organization billed to someone else's account can't be moved this way. The account's plan limits how many organizations it covers (org.organizations).
- Who
- An owner of the organization.
Path parameters
org_idstringrequired- The organization.
Responses
- 200Success.
- 403Not an owner, or
PLAN_LIMIT_REACHED. - 409Billed to another account.
- 401No valid session or key.
curl -s -X POST "$URL/api/v1/billing/orgs/b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90/bind-account" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"Response
{
"org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
"account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
"subscription": {
"org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
"plan": "pro",
"billing_cycle": "monthly",
"status": "active",
"account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51"
}
}#More endpoints
GET/api/v1/billing/accounts/{account_id}/country
Get billing country.
- Who
- An organization owner, or a member with billing access, signed in.
Path parameters
account_idstringrequired
Responses
- 200Success.
- 401No valid session or key.
curl -s "$URL/api/v1/billing/accounts/<account_id>/country" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"PUT/api/v1/billing/accounts/{account_id}/country
Put billing country.
- Who
- An organization owner, or a member with billing access, signed in.
Path parameters
account_idstringrequired
Body
countrystringrequired- ISO 3166 alpha-2, e.g. IN
- pattern `^[A-Za-z]{2}$`
Responses
- 200Success.
- 401No valid session or key.
- 422The body is missing a required field or has a field of the wrong type.
curl -s -X PUT "$URL/api/v1/billing/accounts/<account_id>/country" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"GET/api/v1/billing/ai-credits/{org_id}
The org's Sovariq credits this month and today (credits only; one credit is $0.01 of AI use).
- Who
- An organization owner, or a member with billing access, signed in.
Path parameters
org_idstringrequired- The organization id.
Responses
- 200Success.
- 401No valid session or key.
curl -s "$URL/api/v1/billing/ai-credits/<org-id>" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"GET/api/v1/billing/ai-limits/{org_id}
The org's Sovariq limits: who can use Sovariq, the default cap for members, daily/monthly caps per member and per project, and this month's use.
- Who
- An organization owner, or a member with billing access, signed in.
Path parameters
org_idstringrequired- The organization id.
Responses
- 200Success.
- 401No valid session or key.
curl -s "$URL/api/v1/billing/ai-limits/<org-id>" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"PUT/api/v1/billing/ai-limits/{org_id}/access
Who can use Sovariq: everyone, admins (owners and admins only) or selected (owners, admins and allowed_users).
- Who
- An organization owner, or a member with billing access, signed in.
Path parameters
org_idstringrequired- The organization id.
Body
modestringrequired- 0–20 characters
allowed_usersarray<string>optional- 0–1000 items
Responses
- 200Success.
- 401No valid session or key.
- 422The body is missing a required field or has a field of the wrong type.
curl -s -X PUT "$URL/api/v1/billing/ai-limits/<org-id>/access" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"PUT/api/v1/billing/ai-limits/{org_id}/default
The cap for every member without their own, including people who join later (both null removes it).
- Who
- An organization owner, or a member with billing access, signed in.
Path parameters
org_idstringrequired- The organization id.
Body
credits_dayinteger | nulloptional- 0.0–100000000.0
credits_monthinteger | nulloptional- 0.0–100000000.0
Responses
- 200Success.
- 401No valid session or key.
- 422The body is missing a required field or has a field of the wrong type.
curl -s -X PUT "$URL/api/v1/billing/ai-limits/<org-id>/default" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"DELETE/api/v1/billing/ai-limits/{org_id}/members/{user_id}
Remove a member's own cap (the default for members applies again).
- Who
- An organization owner, or a member with billing access, signed in.
Path parameters
org_idstringrequired- The organization id.
user_idstringrequired- The app user's id.
Responses
- 200Success.
- 401No valid session or key.
curl -s -X DELETE "$URL/api/v1/billing/ai-limits/<org-id>/members/<user-id>" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"PUT/api/v1/billing/ai-limits/{org_id}/members/{user_id}
A member's daily and/or monthly Sovariq credit cap (owners and admins; null = no cap of that kind).
- Who
- An organization owner, or a member with billing access, signed in.
Path parameters
org_idstringrequired- The organization id.
user_idstringrequired- The app user's id.
Body
credits_dayinteger | nulloptional- 0.0–100000000.0
credits_monthinteger | nulloptional- 0.0–100000000.0
Responses
- 200Success.
- 401No valid session or key.
- 422The body is missing a required field or has a field of the wrong type.
curl -s -X PUT "$URL/api/v1/billing/ai-limits/<org-id>/members/<user-id>" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"DELETE/api/v1/billing/ai-limits/{org_id}/projects/{project_id}
Remove a project's Sovariq cap.
- Who
- An organization owner, or a member with billing access, signed in.
Path parameters
org_idstringrequired- The organization id.
project_idstringrequired- The project id.
Responses
- 200Success.
- 401No valid session or key.
curl -s -X DELETE "$URL/api/v1/billing/ai-limits/<org-id>/projects/<project-id>" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"PUT/api/v1/billing/ai-limits/{org_id}/projects/{project_id}
A project's daily and/or monthly Sovariq credit cap, whoever asks (project agents included).
- Who
- An organization owner, or a member with billing access, signed in.
Path parameters
org_idstringrequired- The organization id.
project_idstringrequired- The project id.
Body
credits_dayinteger | nulloptional- 0.0–100000000.0
credits_monthinteger | nulloptional- 0.0–100000000.0
Responses
- 200Success.
- 401No valid session or key.
- 422The body is missing a required field or has a field of the wrong type.
curl -s -X PUT "$URL/api/v1/billing/ai-limits/<org-id>/projects/<project-id>" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"GET/api/v1/billing/orgs/{org_id}/ai-credits/packs
Sovariq credit packs for sale (paying currency), the Sovariq wallet cap and the org's packs.
- Who
- An organization owner, or a member with billing access, signed in.
Path parameters
org_idstringrequired- The organization id.
Responses
- 200Success.
- 401No valid session or key.
curl -s "$URL/api/v1/billing/orgs/<org-id>/ai-credits/packs" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"POST/api/v1/billing/orgs/{org_id}/ai-credits/packs/checkout
Buy a credit pack by card / UPI: a Razorpay order; granted once the payment is verified.
- Who
- An organization owner, or a member with billing access, signed in.
Path parameters
org_idstringrequired- The organization id.
Body
pack_idstringrequired- 1–20 characters
Responses
- 200Success.
- 401No valid session or key.
- 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/billing/orgs/<org-id>/ai-credits/packs/checkout" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"POST/api/v1/billing/orgs/{org_id}/ai-credits/packs/from-balance
Buy a credit pack from the wallet (promo first, then cash), within the Sovariq wallet cap.
- Who
- An organization owner, or a member with billing access, signed in.
Path parameters
org_idstringrequired- The organization id.
Body
pack_idstringrequired- 1–20 characters
Responses
- 200Success.
- 401No valid session or key.
- 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/billing/orgs/<org-id>/ai-credits/packs/from-balance" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"GET/api/v1/billing/orgs/{org_id}/auto-recharge
Wallet auto-recharge settings, the pre-debit notice and recent runs.
- Who
- An organization owner, or a member with billing access, signed in.
Path parameters
org_idstringrequired- The organization id.
Responses
- 200Success.
- 401No valid session or key.
curl -s "$URL/api/v1/billing/orgs/<org-id>/auto-recharge" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"PUT/api/v1/billing/orgs/{org_id}/auto-recharge
Turn auto-recharge on or off with its threshold and amount (needs an autopay mandate; at most Rs 15,000 a debit).
- Who
- An organization owner, or a member with billing access, signed in.
Path parameters
org_idstringrequired- The organization id.
Body
enabledbooleanrequiredthreshold_centsintegerrequired- 100.0–10000000.0
amount_centsintegerrequired- 500.0–10000000.0
max_per_monthintegeroptionaldefault4- 1.0–31.0
max_month_centsinteger | nulloptional- 500.0–100000000.0
Responses
- 200Success.
- 401No valid session or key.
- 422The body is missing a required field or has a field of the wrong type.
curl -s -X PUT "$URL/api/v1/billing/orgs/<org-id>/auto-recharge" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"GET/api/v1/billing/orgs/{org_id}/balance
The prepaid balance (cash + promo), the top-up range and recent movements.
- Who
- An organization owner, or a member with billing access, signed in.
Path parameters
org_idstringrequired- The organization id.
Responses
- 200Success.
- 401No valid session or key.
curl -s "$URL/api/v1/billing/orgs/<org-id>/balance" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"POST/api/v1/billing/orgs/{org_id}/balance/checkout
Org balance checkout.
- Who
- An organization owner, or a member with billing access, signed in.
Path parameters
org_idstringrequired- The organization id.
Body
usd_centsinteger | nulloptional- Amount to add, in US cents
- 100.0–10000000.0
inr_paiseinteger | nulloptional- Amount to add in rupees (paise), for accounts billed in India
- 100.0–1000000000.0
Responses
- 200Success.
- 401No valid session or key.
- 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/billing/orgs/<org-id>/balance/checkout" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"POST/api/v1/billing/orgs/{org_id}/balance/refund-request
Ask for unused wallet cash back (promotional credit is never refundable).
- Who
- An organization owner, or a member with billing access, signed in.
Path parameters
org_idstringrequired- The organization id.
Body
amount_centsinteger | nulloptional- 1.0–100000000.0
reasonstringoptional- 0–500 characters
Responses
- 200Success.
- 401No valid session or key.
- 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/billing/orgs/<org-id>/balance/refund-request" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"PUT/api/v1/billing/orgs/{org_id}/gstin
The customer's GSTIN and state of supply for tax invoices.
- Who
- An organization owner, or a member with billing access, signed in.
Path parameters
org_idstringrequired- The organization id.
Body
gstinstringoptional- 0–15 characters
state_of_supplystringoptional- 0–40 characters
Responses
- 200Success.
- 401No valid session or key.
- 422The body is missing a required field or has a field of the wrong type.
curl -s -X PUT "$URL/api/v1/billing/orgs/<org-id>/gstin" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"PUT/api/v1/billing/orgs/{org_id}/sovariq-wallet-cap
The monthly cap on Sovariq credits bought from the wallet (null = the plan default).
- Who
- An organization owner, or a member with billing access, signed in.
Path parameters
org_idstringrequired- The organization id.
Body
cap_centsinteger | nulloptional- 0.0–10000000.0
Responses
- 200Success.
- 401No valid session or key.
- 422The body is missing a required field or has a field of the wrong type.
curl -s -X PUT "$URL/api/v1/billing/orgs/<org-id>/sovariq-wallet-cap" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"GET/api/v1/billing/orgs/{org_id}/statement
The wallet statement for a period: draws, packs, recharges, top-ups, refunds, opening and closing balance.
- Who
- An organization owner, or a member with billing access, signed in.
Path parameters
org_idstringrequired- The organization id.
Query parameters
period_startstringrequired- 0–40 characters
period_endstringrequired- 0–40 characters
Responses
- 200Success.
- 401No valid session or key.
curl -s "$URL/api/v1/billing/orgs/<org-id>/statement" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"GET/api/v1/billing/orgs/{org_id}/usage/forecast
Period-to-date pay-as-you-go spend and where it lands by the period's end.
- Who
- An organization owner, or a member with billing access, signed in.
Path parameters
org_idstringrequired- The organization id.
Responses
- 200Success.
- 401No valid session or key.
curl -s "$URL/api/v1/billing/orgs/<org-id>/usage/forecast" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"GET/api/v1/billing/orgs/{org_id}/wallet
The org's wallet: cash and promotional credit (USD cents, rupees in India), runway, the zero state, auto-recharge and recent entries.
- Who
- An organization owner, or a member with billing access, signed in.
Path parameters
org_idstringrequired- The organization id.
Responses
- 200Success.
- 401No valid session or key.
curl -s "$URL/api/v1/billing/orgs/<org-id>/wallet" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"POST/api/v1/billing/orgs/{org_id}/wallet/checkout
Start a wallet top-up: a Razorpay order (usd_cents, or inr_paise in India). Credited only after the verified payment.
- Who
- An organization owner, or a member with billing access, signed in.
Path parameters
org_idstringrequired- The organization id.
Body
usd_centsinteger | nulloptional- 100.0–10000000.0
inr_paiseinteger | nulloptional- 100.0–1000000000.0
Responses
- 200Success.
- 401No valid session or key.
- 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/billing/orgs/<org-id>/wallet/checkout" \
-H "apikey: $ANON_KEY" \
-H "Authorization: Bearer $ACCESS_TOKEN"GET/api/v1/plans/addons
Add-on prices (USD per month per unit) and the plans each is sold on, as staff set them.
- Who
- An organization owner, or a member with billing access, signed in.
Responses
- 200Success.
curl -s "$URL/api/v1/plans/addons" \
-H "apikey: $ANON_KEY"GET/api/v1/plans/credit-packs
Public: the Sovariq credit pack catalogue (USD and INR).
- Who
- An organization owner, or a member with billing access, signed in.
Responses
- 200Success.
curl -s "$URL/api/v1/plans/credit-packs" \
-H "apikey: $ANON_KEY"