Outvexa

API reference

Billing

6 endpoints. All paths are relative to your installation, for example https://app.example.com.

get/api/v1/w/{workspaceId}/billing

Plan, status, usage and (for owners/billing managers) invoices of this workspace's organization

Workspace member or API keyRole viewer or higherWorks while suspendedSuccess: 200

Path parameters

workspaceIdrequiredstring
Request
curl -X GET "https://app.example.com/api/v1/w/$WORKSPACE_ID/billing" \
  -H "Authorization: Bearer $EMN_API_KEY"

get/api/v1/orgs/{organizationId}/billing

Plan, subscription, usage, invoices and available plans

Organization memberWorks while suspendedSuccess: 200

Path parameters

organizationIdrequiredstring
Request
curl -X GET "https://app.example.com/api/v1/orgs/$ORGANIZATION_ID/billing" \
  -b cookies.txt -H "X-CSRF-Token: $CSRF"

post/api/v1/orgs/{organizationId}/billing/checkout

Start hosted checkout for a plan (Stripe or Razorpay); activation only via verified webhook

Organization memberOrganization permission: billing20 requests / 10 min per userWorks while suspendedSuccess: 200

Path parameters

organizationIdrequiredstring

Request body (JSON)

planCoderequiredstringLength 1–40
intervalenumOne of: month, year · Default "month"
providerrequiredenumOne of: stripe, razorpay
Request
curl -X POST "https://app.example.com/api/v1/orgs/$ORGANIZATION_ID/billing/checkout" \
  -b cookies.txt -H "X-CSRF-Token: $CSRF" \
  -H "Content-Type: application/json" \
  -d '{
    "planCode": "string",
    "interval": "month",
    "provider": "stripe"
  }'

post/api/v1/orgs/{organizationId}/billing/portal

Open the Stripe customer portal (payment method, invoices)

Organization memberOrganization permission: billingWorks while suspendedSuccess: 200

Path parameters

organizationIdrequiredstring
Request
curl -X POST "https://app.example.com/api/v1/orgs/$ORGANIZATION_ID/billing/portal" \
  -b cookies.txt -H "X-CSRF-Token: $CSRF"

post/api/v1/orgs/{organizationId}/billing/cancel

Cancel the subscription (default: at the end of the period)

Organization memberOrganization permission: billingWorks while suspendedSuccess: 200

Path parameters

organizationIdrequiredstring

Request body (JSON)

atPeriodEndbooleanDefault true
Request
curl -X POST "https://app.example.com/api/v1/orgs/$ORGANIZATION_ID/billing/cancel" \
  -b cookies.txt -H "X-CSRF-Token: $CSRF" \
  -H "Content-Type: application/json" \
  -d '{
    "atPeriodEnd": true
  }'

post/api/v1/orgs/{organizationId}/billing/resume

Undo a scheduled cancellation (Stripe)

Organization memberOrganization permission: billingWorks while suspendedSuccess: 200

Path parameters

organizationIdrequiredstring
Request
curl -X POST "https://app.example.com/api/v1/orgs/$ORGANIZATION_ID/billing/resume" \
  -b cookies.txt -H "X-CSRF-Token: $CSRF"