Get an organization's billing statement (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
GET /admin/orgs/{orgId}/billing/statement

Returns the organization's billing items grouped by case, with organization-wide charges in their own group, each group with its rows and the subtotal charged. Page with limit and skip. Super admin only.

Path parameters

  • orgId string Required

    Id of the organization

Query parameters

  • limit number
  • skip number

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • data object Required
      Hide data attribute Show data attribute object
      • groups array[object] Required
        Hide groups attributes Show groups attributes object
        • caseId string Required

          The case id, or the literal 'organization' for the org-wide group. Prefer chargeScope over comparing against that literal.

        • chargeScope string Required

          Scope of every row in this group — the whole group is one or the other, because invoices are grouped the same way.

          Values are case or platform.

        • rows array[object] Required
          Hide rows attributes Show rows attributes object
          • id string Required
          • skuKey string Required
          • description string Required
          • quantity number Required
          • amountCents number Required
          • informational boolean Required
          • listAmountCents number | null Required
          • status string Required

            Values are DRAFT, PENDING, PROCESSING, INVOICED, PAID, FAILED, REFUNDED, COMPED, or VOID.

          • hostedInvoiceUrl string | null Required
          • invoiceId string | null Required
          • chargeScope string Required

            'case' = a charge for work on a specific case; 'platform' = an org-wide charge such as the plan base fee or storage overage. Stripe bills the two on separate invoices.

            Values are case or platform.

          • createdAt string(date-time) Required
        • subtotalChargedCents number Required
    • statusCode number Required
    • timestamp string(date-time) Required
GET /admin/orgs/{orgId}/billing/statement
curl \
 --request GET 'http://api.example.com/admin/orgs/{orgId}/billing/statement' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "data": {
    "groups": [
      {
        "caseId": "65a1b2c3d4e5f6a7b8c9d0e2",
        "chargeScope": "case",
        "rows": [
          {
            "id": "65a1b2c3d4e5f6a7b8c9d0e4",
            "skuKey": "collection.phone",
            "description": "Phone collection",
            "quantity": 1,
            "amountCents": 17900,
            "informational": false,
            "listAmountCents": 17900,
            "status": "INVOICED",
            "hostedInvoiceUrl": "https://invoice.stripe.com/i/acct_Example/test_Example",
            "invoiceId": "in_1PExample",
            "chargeScope": "case",
            "createdAt": "2026-01-15T10:15:00.000Z"
          }
        ],
        "subtotalChargedCents": 17900
      }
    ]
  },
  "statusCode": 200,
  "timestamp": "2026-01-15T10:15:00.000Z"
}