Run billing reconciliation now (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/billing/cron/reconciliation

Compares Stripe with the billing ledger as of asOf or now, across all organizations, and returns invoice and ledger mismatches, items stuck as invoiced, legacy subscription drift, lost pro grants and migrated organizations that still have a live legacy subscription. It also voids leftover empty draft invoices and lists them. Not available in production (403). Super admin only.

application/json

Body Required

  • asOf string

    ISO date to reconcile as of (default: now)

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • data object Required
      Hide data attributes Show data attributes object
      • invoiceMismatches array[object]
        Hide invoiceMismatches attributes Show invoiceMismatches attributes object
        • kind string

          Values are orphan or amount.

        • invoiceId string
        • stripeTotalCents integer
        • ledgerSumCents integer | null
      • stuckInvoiced array[object]
        Hide stuckInvoiced attributes Show stuckInvoiced attributes object
        • billingItemId string
        • invoiceId string | null
        • ageMs integer
      • subscriptionDrift array[object]
        Hide subscriptionDrift attributes Show subscriptionDrift attributes object
        • kind string

          Values are missing or status.

        • subscriptionId string
        • stripeStatus string
        • localStatus string | null
      • voidedEmptyDrafts array[object]
        Hide voidedEmptyDrafts attributes Show voidedEmptyDrafts attributes object
        • invoiceId string
        • ageMs integer
      • lostProGrants array[object]
        Hide lostProGrants attributes Show lostProGrants attributes object
        • billingItemId string
        • caseId string | null
        • invoiceId string | null
      • migratedOrgsWithLiveLegacySub array[object]
        Hide migratedOrgsWithLiveLegacySub attributes Show migratedOrgsWithLiveLegacySub attributes object
        • organizationId string
        • subscriptionExternalId string | null
        • status string
    • statusCode number Required
    • timestamp string(date-time) Required
POST /admin/billing/cron/reconciliation
curl \
 --request POST 'http://api.example.com/admin/billing/cron/reconciliation' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{
  "asOf": "string"
}'
Request examples
{
  "asOf": "string"
}
Response examples (200)
{
  "data": {
    "invoiceMismatches": [],
    "stuckInvoiced": [],
    "subscriptionDrift": [],
    "voidedEmptyDrafts": [],
    "lostProGrants": [],
    "migratedOrgsWithLiveLegacySub": []
  },
  "statusCode": 200,
  "timestamp": "2026-01-15T10:15:00.000Z"
}