Move an organization to case billing (internal)

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://docs.usehearsay.com/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "integrations MCP server": {
    "url": "https://docs.usehearsay.com/mcp"
  }
}

Close
POST /admin/orgs/{orgId}/migrate-billing

Creates the organization's billing profile with the given tier, billing mode and cadence, moves its legacy subscription's card onto the customer when it can, then cancels the legacy subscription. Returns whether a card is on file and whether a legacy subscription was cancelled. Returns 404 for an unknown organization, 409 when it is already on case billing and 400 for an invalid tier, mode and cadence combination. Super admin only.

Path parameters

  • orgId string Required

    Id of the organization

application/json

Body Required

  • tier string Required

    Values are public, solo, firm, or firm-plus.

  • billingMode string Required

    Values are payg, per-source, or flat-case.

  • cadence string Required

    Values are monthly or annual.

  • overrides object
    Hide overrides attributes Show overrides attributes object
    • storageIncludedGB number
    • skuUnitAmountCents object

      SKU key -> cents. 0 = free for this org; null = remove the override and fall back to the catalog/tier price.

    • perCaseSourceCap number

      Provisioned only — NOT enforced in v1 (spec locked decision); enforcement is a later phase

  • billingEmail string

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • data object Required
      Hide data attributes Show data attributes object
      • profileCreated boolean Required

        Always true — the org is now on case billing

      • paymentMethodOnFile boolean Required

        Whether the org had a Stripe default payment method

      • legacySubscriptionCanceled boolean Required

        Whether a live legacy Stripe subscription was canceled by this migration

    • statusCode number Required
    • timestamp string(date-time) Required
POST /admin/orgs/{orgId}/migrate-billing
curl \
 --request POST 'http://api.example.com/admin/orgs/{orgId}/migrate-billing' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{
  "tier": "public",
  "billingMode": "payg",
  "cadence": "monthly",
  "overrides": {
    "storageIncludedGB": 42.0,
    "skuUnitAmountCents": {},
    "perCaseSourceCap": 42.0
  },
  "billingEmail": "string"
}'
Request examples
{
  "tier": "public",
  "billingMode": "payg",
  "cadence": "monthly",
  "overrides": {
    "storageIncludedGB": 42.0,
    "skuUnitAmountCents": {},
    "perCaseSourceCap": 42.0
  },
  "billingEmail": "string"
}
Response examples (200)
{
  "data": {
    "profileCreated": true,
    "paymentMethodOnFile": true,
    "legacySubscriptionCanceled": true
  },
  "statusCode": 200,
  "timestamp": "2026-01-15T10:15:00.000Z"
}