Audit B2B Revenue Leakage & Dispute Readiness
revclamp_audit_revenue_leakageRun a deterministic 90-day B2B revenue leakage and chargeback readiness audit across Stripe subscriptions, AI/API usage telemetry events, and open disputes. Executes as a 100% read-only, stateless diagnostic with zero external Stripe mutations. Returns structuredContent containing ok, mode, statelessEphemeralAudit, tenantId, dunningGracePeriodDays, costPerEventCents, and audit (scannedCustomers, scannedEvents, ghostLeakEventsCount, affectedCustomersCount, estimatedBleedUsd, disputesEligibleForAutoEvidence). Use this tool for portfolio-wide multi-customer audits; use revclamp_evaluate_ghost_usage for single-customer entitlement checks or revclamp_stage_stripe_dispute_ce3 to build a single dispute's Visa CE 3.0 evidence bundle.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| demo | No | Optional simulation flag (boolean) for deterministic sample audit preview. | |
| disputes | No | Optional array of up to 50 Stripe dispute objects (each with id like 'du_123', customer, amount in cents, reason such as 'fraudulent', and status such as 'needs_response'). | |
| customers | No | Optional array of up to 50 Stripe customer snapshots (each with id like 'cus_123', optional email, subscriptions array or list object, and subscriptionsHasMore: false). Omit to run against workspace telemetry or deterministic sandbox fixtures. | |
| usageEvents | No | Optional array of up to 200 product/AI API usage telemetry events (each with stripe_customer_id or email, event_name, and occurredAtSec Unix timestamp in seconds). | |
| costPerEventCents | No | Estimated marginal compute or API cost per leaked usage event in integer USD cents (valid range: 1 to 100000, default: 142 i.e. $1.42/event). | |
| dunningGracePeriodDays | No | Custom dunning grace window in integer days (valid range: 0 to 14, default: 3) allowed after latest_invoice_failed_at before flagging past_due subscriptions as unpaid ghost usage. |