Add a billing item to a case (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/cases/{caseId}/billing-items

Records a staff add-on on the case: quantity of the SKU at its price or at unitAmountCentsOverride. With comped the item is waived at once; otherwise a SKU billed immediately is charged right away and the rest wait for the daily sweep. Sending the same requestId again returns the existing item instead of charging twice. Returns 404 for an unknown case or when its organization has no billing profile and 400 when the SKU cannot be priced. Super admin only.

Path parameters

  • caseId string Required

    Id of the case

application/json

Body Required

  • skuKey string Required

    Values are collection.phone, collection.social, collection.email, collection.ai-chat, collection.financial, collection.discord, collection.reddit, collection.linkedin, collection.legal, collection.file, collection.other, case.flat, case.pro-upgrade, addon.kit-rental, addon.laptop-rental, addon.laptop-rental-setup, addon.managed-service, addon.shipping, addon.live-bank, plan.base, source.per, ai.tokens-overage, adjustment.manual, or adjustment.discount.

  • quantity number Required

    Minimum value is 1.

  • requestId string Required

    Client-supplied dedup token — repeating the same requestId for the same case+SKU returns the existing row untouched

  • reason string Required

    Required audit reason — persisted on the BillingEvent

  • comped boolean

    Create the row already COMPED (never swept/invoiced) instead of billable

  • unitAmountCentsOverride number

    Per-item price override — only honored for addon.shipping/adjustment.manual (negative allowed on adjustment.manual only)

Responses

  • 201 application/json
    Hide response attributes Show response attributes object
    • data object Required
      Hide data attributes Show data attributes object
      • id string Required
      • caseId string Required
      • skuKey string Required
      • status string Required
      • description string Required
      • quantity number Required
      • unitAmountCents number Required
      • amountCents number Required
      • informational boolean Required
      • listAmountCents number | null Required
      • adminNote string | null Required
    • statusCode number Required
    • timestamp string(date-time) Required
POST /admin/cases/{caseId}/billing-items
curl \
 --request POST 'http://api.example.com/admin/cases/{caseId}/billing-items' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{
  "skuKey": "collection.phone",
  "quantity": 42.0,
  "requestId": "string",
  "reason": "string",
  "comped": true,
  "unitAmountCentsOverride": 42.0
}'
Request examples
{
  "skuKey": "collection.phone",
  "quantity": 42.0,
  "requestId": "string",
  "reason": "string",
  "comped": true,
  "unitAmountCentsOverride": 42.0
}
Response examples (201)
{
  "data": {
    "id": "65a1b2c3d4e5f6a7b8c9d0e9",
    "caseId": "65a1b2c3d4e5f6a7b8c9d0e2",
    "skuKey": "addon.shipping",
    "status": "PENDING",
    "description": "Admin add-on: addon.shipping",
    "quantity": 1,
    "unitAmountCents": 2500,
    "amountCents": 2500,
    "informational": false,
    "listAmountCents": 42.0,
    "adminNote": "string"
  },
  "statusCode": 201,
  "timestamp": "2026-01-15T10:15:00.000Z"
}