Zero-take-rate Stripe 2025-03-31.basil, Visa CE 3.0 & EU/XI VIES VAT guardrails MCP server.
Maintain this server? Claim it
Call this server's tools from your browser. Nothing to install.
Requests go through mcptry because browsers can't call most MCP servers directly. Header values are sent to the server for that request only and are never stored or logged.
Tool list from our last check. Connect live to refresh it.
Run 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.
Optional simulation flag (boolean) for deterministic sample audit preview.
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').
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.
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).
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).
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.
Run 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.
| Argument | Type | Description |
|---|---|---|
| demo | boolean | Optional simulation flag (boolean) for deterministic sample audit preview. |
| disputes | array | 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 | array | 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 | array | 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 | integer | 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 | integer | 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. |
{
"type": "object",
"properties": {
"demo": {
"type": "boolean",
"description": "Optional simulation flag (boolean) for deterministic sample audit preview."
},
"disputes": {
"type": "array",
"description": "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": {
"type": "array",
"description": "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": {
"type": "array",
"description": "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": {
"type": "integer",
"maximum": 100000,
"minimum": 1,
"description": "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": {
"type": "integer",
"maximum": 14,
"minimum": 0,
"description": "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."
}
},
"additionalProperties": false
}Deterministically calculate monthly and annual B2B margin savings using exact integer USD cents when replacing a 25%-30% contingency chargeback agency with RevClamp flat-rate 0% commission plans ($19 Starter, $59 Growth, $199 Scale). Evaluates monthlyWonDisputeUsd, monthlyGhostBleedUsd, contingencyTakeRatePercent, and monthlyUsageEvents to recommend the optimal tier. Returns structuredContent containing ok, mode, statelessEphemeralAudit, tenantId, recommendedTier, annualNetMarginSavedUsd, roiMultiple, and calculation.
| Argument | Type | Description |
|---|---|---|
| monthlyUsageEvents | integer | Monthly verified usage events across your workspace (integer 0 to 50000000, default: 250000) used to recommend Starter (<=100k), Growth (<=1M), or Scale (<=5M). |
| monthlyGhostBleedUsd | number | Monthly unpaid AI/API or SaaS usage bleed stopped by RevClamp basil entitlement guards in USD (valid range: 0 to 10000000, default: 600). |
| monthlyWonDisputeUsd | number | Monthly won Stripe chargeback volume in USD (valid range: 0 to 10000000, default: 10000) subject to legacy agency take-rate fees. |
| contingencyTakeRatePercent | number | Competitor chargeback agency contingency commission percentage (valid range: 1 to 50, default: 25 for 25% take-rate tools). |
{
"type": "object",
"properties": {
"monthlyUsageEvents": {
"type": "integer",
"maximum": 50000000,
"minimum": 0,
"description": "Monthly verified usage events across your workspace (integer 0 to 50000000, default: 250000) used to recommend Starter (<=100k), Growth (<=1M), or Scale (<=5M)."
},
"monthlyGhostBleedUsd": {
"type": "number",
"maximum": 10000000,
"minimum": 0,
"description": "Monthly unpaid AI/API or SaaS usage bleed stopped by RevClamp basil entitlement guards in USD (valid range: 0 to 10000000, default: 600)."
},
"monthlyWonDisputeUsd": {
"type": "number",
"maximum": 10000000,
"minimum": 0,
"description": "Monthly won Stripe chargeback volume in USD (valid range: 0 to 10000000, default: 10000) subject to legacy agency take-rate fees."
},
"contingencyTakeRatePercent": {
"type": "number",
"maximum": 50,
"minimum": 1,
"description": "Competitor chargeback agency contingency commission percentage (valid range: 1 to 50, default: 25 for 25% take-rate tools)."
}
},
"additionalProperties": false
}Evaluate whether a specific customer's AI or API usage event constitutes unpaid ghost usage across multi-subscription Stripe 2025-03-31.basil state, enforcing fail-closed pagination (has_more must be explicitly false) and configurable 0-14 day dunning grace windows. Executes as a stateless, read-only entitlement evaluator with zero side effects. Returns structuredContent containing ok, mode, statelessEphemeralAudit, tenantId, and evaluation (isGhostLeak, isGhostUsage, reason). Use this tool for real-time per-customer entitlement gating; use revclamp_audit_revenue_leakage for batch multi-customer portfolio audits.
| Argument | Type | Description |
|---|---|---|
| demo | boolean | Optional simulation flag (boolean) for deterministic ghost-usage preview. |
| customerId | string | Stripe customer identifier to evaluate (format example: 'cus_9s6XKzkNRiz8i3', max 64 chars). |
| usageEvent | object | Optional metered usage event object containing customer_id (or stripe_customer_id), event_name, and occurred_at (or occurred_at_sec). |
| occurredAtSec | integer | Optional alias for usageTimestampSec: Unix epoch timestamp in integer seconds (e.g. 1761264000) when the usage event occurred (used when usageTimestampSec is omitted). |
| subscriptions* | any | Required Stripe customer subscriptions payload: either a Stripe list object ({ data: [...], has_more: false }) or a raw array of up to 50 subscription objects containing id, status ('active', 'trialing', 'past_due', 'canceled', 'unpaid'), current_period_end, or items.data[].current_period_end in Unix seconds. |
Deterministically lint a Stripe dispute evidence[access_activity_log] payload against Stripe's 18,000 UTF-16 code unit (String.prototype.length) ceiling, UTF-8 byte length, non-destructive --- BEGIN REVCLAMP CE3 EVIDENCE --- / --- END REVCLAMP CE3 EVIDENCE --- (or [RevClamp Verified Product Usage Log] / [/RevClamp Verified Product Usage Log]) delimiter markers, existing merchant note preservation, 17,922/17,920-char fixed wrapper capacity threshold (SKIP_POST_PRESERVE_DRAFT), and Visa Compelling Evidence 3.0 (CE 3.0) prior-charge (>= 2) + IP/device overlap qualification. Returns structuredContent containing ok, mode, statelessEphemeralAudit, tenantId, lint, utf16CodeUnits, maxUtf16Ceiling, remainingUtf16Units, withinCeiling, utf8Bytes, nonDestructiveMarkersPresent, merchantNotesPreserved, merchantNotesUtf16CodeUnits, fixedWrapperUtf16CodeUnits, merchantLogAtCapacity, stagingActionWhenAtCapacity, priorMatchedCount, hasIpMatch, hasDeviceMatch, ce3RubricPassed, and overallVerdict.
| Argument | Type | Description |
|---|---|---|
| demo | boolean | Set true to lint a sample preset fixture when evidenceLogText / accessActivityLog is omitted. |
| preset | string | Scenario preset to evaluate when custom evidenceLogText / accessActivityLog is omitted (default: 'valid_ce3_non_destructive'). |
| hasIpMatch | boolean | Whether the disputed charge IPv4/IPv6 address matches the historical undisputed charges. |
| hasDeviceMatch | boolean | Whether the disputed charge device_id fingerprint matches the historical undisputed charges. |
Reconcile B2B wholesale Net-15, Net-30, and Net-60 invoice deposits, partial payments, and credit notes using exact integer minor-unit (EUR/USD cent) arithmetic with zero IEEE-754 floating-point drift. Executes as a pure, stateless, read-only financial reconciliation function. Returns structuredContent containing ok, mode, statelessEphemeralAudit, tenantId, and reconciliation (state, status, fulfillmentHold, releaseHoldAction, requiredDepositCents, remainingBalanceCents, creditDueCents, overpaidWarning, orderTag). Use this tool for B2B wholesale order deposit gating and Net-terms balance calculation; use revclamp_validate_eu_vat_vies for cross-border EU VAT number validation.
| Argument | Type | Description |
|---|---|---|
| demo | boolean | Optional sandbox flag (boolean). |
| orderId | string | B2B wholesale order or invoice identifier (e.g. 'gid://shopify/Order/908812' or 'ORD-2026-9088', default: 'ord_local_b2b_01', max 64 chars). |
| toleranceCents | integer | Optional rounding/FX reconciliation tolerance in integer cents (valid range: 0 to min(500, 1% of totalOrderCents), default: 0). |
| creditNoteCents | integer | Optional post-invoice credit notes or return adjustments in integer cents (valid range: 0 to totalOrderCents, default: 0; singular alias for creditNotesCents). |
| orderTotalCents | integer | Alias for totalOrderCents: gross invoice total in positive integer minor currency units / cents (must be > 0). |
Deterministically evaluate an ordered or out-of-order sequence of 1-10 Stripe/Shopify/RevClamp subscription lifecycle webhooks against a 72-hour idempotency deduplication Set (eventId), a configurable idempotencyWindowSec (60s-2592000s, default: 259200s / 72h), and a monotonic transition timestamp guard (event.createdSec >= lastAppliedCreatedSec). Compares RevClamp's monotonic FSM against a naive overwrite-on-arrival handler to detect resurrected canceled subscriptions, stale tier downgrades, and duplicate retry side-effects. Returns structuredContent containing ok, mode, statelessEphemeralAudit, tenantId, simulation, steps, finalStatus, finalTier, finalEntitlementDecision, naiveFinalStatus, and naiveHandlerBug.
| Argument | Type | Description |
|---|---|---|
| demo | boolean | Optional sandbox flag to run the preset replay simulation. |
| events | array | Optional custom array of 1 to 10 webhook events ({ eventId, eventType, createdSec, subscriptionStatus, tier, currentPeriodEndSec }) in arrival order. |
| nowSec | integer | Reference evaluation timestamp in Unix seconds used to check the 72-hour idempotency window. |
| scenarioPreset | string | Scenario preset to evaluate when custom events are omitted (default: 'out_of_order_stale_update_after_cancel'). |
| idempotencyWindowSec | integer | Deduplication and replay-acceptance window in seconds (valid range: 60 to 2592000, default: 259200 for 72 hours). |
Evaluate Visa Compelling Evidence 3.0 (CE 3.0) qualification across 120-to-365-day historical charges (requiring at least 2 settled, non-refunded, non-disputed prior transactions sharing IP address, device fingerprint, or billing email) and assemble a non-destructive Stripe dispute evidence draft with submit hardcoded to false. Executes as a pure read-only staging computation that never auto-submits to card networks. Returns structuredContent containing ok, mode, statelessEphemeralAudit, tenantId, submitForcedFalse, ce3Qualification, and drawer (including stripeUpdateParams with submit: false and merged access_activity_log). Use this tool for single-dispute CE 3.0 qualification and evidence staging; use revclamp_audit_revenue_leakage for portfolio-wide dispute readiness counts.
| Argument | Type | Description |
|---|---|---|
| demo | boolean | Optional simulation flag (boolean) to stage a labeled sample dispute preview. |
| disputeId | string | Stripe dispute identifier being staged (format example: 'du_1QxyzEnterpriseDispute01', default: 'du_mcp_staged_01', max 64 chars). |
| customerId | string | Stripe customer identifier associated with the disputed charge (format example: 'cus_enterprise_88', default: 'cus_mcp_enterprise_01', max 64 chars). |
| usageEvents | array | Optional array of up to 200 customer product/API usage telemetry events (each with occurredAtSec Unix seconds, stripe_customer_id, and event_name) for append-only access_activity_log staging. |
| disputeReason |
Normalize EU-27 and Northern Ireland (XI) B2B VAT identifiers (including mandatory Greece ISO-3166 GR to EL prefix normalization) and evaluate cross-border 0% VAT reverse-charge eligibility, VIES consultation evidence, or MS_UNAVAILABLE circuit-breaker fulfillment hold actions. Read-only and non-destructive; supports deterministic simulation modes ('VALID', 'INVALID', 'MS_UNAVAILABLE') or real-time European Commission VIES SOAP/REST lookup ('LIVE'). Returns structuredContent containing ok, mode, statelessEphemeralAudit, simulatedViesLookup, tenantId, normalizedVat, reverseChargeEligible, and viesDecision (status, action, zeroRateAllowed, consultationId). Use this tool for EU/XI VAT tax compliance; use revclamp_reconcile_b2b_net_terms for wholesale Net-15/30/60 deposit and credit-note accounting.
| Argument | Type | Description |
|---|---|---|
| demo | boolean | Optional simulation flag (boolean) for deterministic VIES gateway preset evaluation. |
| viesMode | string | VIES evaluation mode: 'FORMAT_ONLY' (deterministic EU/XI syntax validation without consultation), 'VALID' (deterministic active VAT simulation, default), 'INVALID' (deterministic rejected VAT simulation), 'MS_UNAVAILABLE' or 'GLOBAL_MAX_CONCURRENT_REQ' (deterministic member-state outage circuit-breaker simulation), or 'LIVE' (real-time European Commission VIES lookup). |
| buyerVatId* | string | Required buyer EU or Northern Ireland VAT registration number to normalize and validate (e.g. 'DE123456789', 'GR123456789', 'NL123456789B01', 'XI123456789', max 40 chars). |
| sellerCountry | string |
Generate and verify canonical Stripe-Signature (t=<unix>,v1=<hex_sha256>), X-Shopify-Hmac-Sha256 (<base64_sha256>), and X-RevClamp-Signature (t=<unix>,v1=<hex_sha256>) headers over exact UTF-8 webhook payload bytes using crypto.timingSafeEqual and a 300-second replay window guard. Enforces a Zero-Trust guard that blocks known live/production credential patterns (sk_live_, rk_live_, non-test whsec_..., shpss_..., shpat_..., rg_live_, rc_live_, AKIA..., and PEM private keys) with -32602 LIVE_SECRET_FORBIDDEN_IN_SANDBOX. Returns structuredContent containing ok, mode, statelessEphemeralAudit, tenantId, and verification (provider, verificationMode, headerName, generatedHeader, expectedSignature, signatureValid, verificationReason, timingSafeCompared, replayWindowApplicable, timestampSec, timestampSkewSeconds, toleranceSeconds, withinReplayWindow, payloadByteLength, payloadSha256, commonIntegrationTrap). Use this tool to debug webhook signature mismatches and replay skew.
| Argument | Type | Description |
|---|---|---|
| demo | boolean | Optional sandbox flag; uses synthetic defaults when provider, secret, or rawPayload are omitted. |
| secret | string | Synthetic or test webhook signing secret (default: 'whsec_test_revclamp_sandbox_secret_2026', max 256 chars, or comma-separated rotation secrets). Live production secrets (sk_live_, rk_live_, non-test whsec_..., shpss_..., shpat_..., rg_live_, rc_live_, AKIA..., and PEM private keys) are rejected. |
| secrets | array | Optional array of 1 to 5 synthetic/test webhook signing secrets (each <= 256 chars) to evaluate during rolling webhook secret rotation. |
| provider | string |
| usageTimestampSec | integer | Optional Unix epoch timestamp in integer seconds (e.g. 1761264000) when the AI/API usage event occurred (defaults to current server Unix timestamp if omitted). |
| subscriptionsHasMore | boolean | Pagination completeness flag (boolean). Must be explicitly set to false when passing a raw subscriptions array so RevClamp can verify no active subscription was truncated on a later page. |
| dunningGracePeriodDays | integer | Dunning grace window in integer days (valid range: 0 to 14, default: 3) after latest_invoice_failed_at during which past_due subscriptions remain entitled. |
{
"type": "object",
"required": [
"subscriptions"
],
"properties": {
"demo": {
"type": "boolean",
"description": "Optional simulation flag (boolean) for deterministic ghost-usage preview."
},
"customerId": {
"type": "string",
"description": "Stripe customer identifier to evaluate (format example: 'cus_9s6XKzkNRiz8i3', max 64 chars)."
},
"usageEvent": {
"type": "object",
"description": "Optional metered usage event object containing customer_id (or stripe_customer_id), event_name, and occurred_at (or occurred_at_sec)."
},
"occurredAtSec": {
"type": "integer",
"description": "Optional alias for usageTimestampSec: Unix epoch timestamp in integer seconds (e.g. 1761264000) when the usage event occurred (used when usageTimestampSec is omitted)."
},
"subscriptions": {
"description": "Required Stripe customer subscriptions payload: either a Stripe list object ({ data: [...], has_more: false }) or a raw array of up to 50 subscription objects containing id, status ('active', 'trialing', 'past_due', 'canceled', 'unpaid'), current_period_end, or items.data[].current_period_end in Unix seconds."
},
"usageTimestampSec": {
"type": "integer",
"description": "Optional Unix epoch timestamp in integer seconds (e.g. 1761264000) when the AI/API usage event occurred (defaults to current server Unix timestamp if omitted)."
},
"subscriptionsHasMore": {
"type": "boolean",
"description": "Pagination completeness flag (boolean). Must be explicitly set to false when passing a raw subscriptions array so RevClamp can verify no active subscription was truncated on a later page."
},
"dunningGracePeriodDays": {
"type": "integer",
"maximum": 14,
"minimum": 0,
"description": "Dunning grace window in integer days (valid range: 0 to 14, default: 3) after latest_invoice_failed_at during which past_due subscriptions remain entitled."
}
},
"additionalProperties": false
}| evidenceLogText |
| string |
| Merged or candidate Stripe dispute evidence[access_activity_log] payload evaluated against the 18,000 UTF-16 code unit ceiling and non-destructive delimiter markers. |
| accessActivityLog | string | Alias for evidenceLogText representing Stripe dispute evidence[access_activity_log] payload. |
| priorMatchedCount | integer | Number of prior undisputed Stripe charges (120d-365d old) with matching customer_id and IP/device fingerprint (Visa CE 3.0 requires >= 2). |
| priorTransactions | array | Optional historical undisputed Stripe charges (120d-365d prior) evaluated for Visa CE 3.0 two-identifier overlap. |
| disputedTransaction | object | Optional disputed Stripe charge/transaction metadata evaluated against priorTransactions for Visa CE 3.0 qualification. |
| existingMerchantNotes | string | Existing human AE/support notes inside evidence[access_activity_log] that must be preserved. |
{
"type": "object",
"properties": {
"demo": {
"type": "boolean",
"default": false,
"description": "Set true to lint a sample preset fixture when evidenceLogText / accessActivityLog is omitted."
},
"preset": {
"enum": [
"valid_ce3_non_destructive",
"utf16_overflow_19k",
"missing_device_and_overwrite_risk",
"custom",
"ce3_24k_truncation_trap",
"ce3_clean_compacted_14k",
"ce3_missing_device_binding_19k"
],
"type": "string",
"default": "valid_ce3_non_destructive",
"description": "Scenario preset to evaluate when custom evidenceLogText / accessActivityLog is omitted (default: 'valid_ce3_non_destructive')."
},
"hasIpMatch": {
"type": "boolean",
"description": "Whether the disputed charge IPv4/IPv6 address matches the historical undisputed charges."
},
"hasDeviceMatch": {
"type": "boolean",
"description": "Whether the disputed charge device_id fingerprint matches the historical undisputed charges."
},
"evidenceLogText": {
"type": "string",
"maxLength": 30000,
"description": "Merged or candidate Stripe dispute evidence[access_activity_log] payload evaluated against the 18,000 UTF-16 code unit ceiling and non-destructive delimiter markers."
},
"accessActivityLog": {
"type": "string",
"maxLength": 30000,
"description": "Alias for evidenceLogText representing Stripe dispute evidence[access_activity_log] payload."
},
"priorMatchedCount": {
"type": "integer",
"maximum": 100,
"minimum": 0,
"description": "Number of prior undisputed Stripe charges (120d-365d old) with matching customer_id and IP/device fingerprint (Visa CE 3.0 requires >= 2)."
},
"priorTransactions": {
"type": "array",
"description": "Optional historical undisputed Stripe charges (120d-365d prior) evaluated for Visa CE 3.0 two-identifier overlap."
},
"disputedTransaction": {
"type": "object",
"description": "Optional disputed Stripe charge/transaction metadata evaluated against priorTransactions for Visa CE 3.0 qualification."
},
"existingMerchantNotes": {
"type": "string",
"maxLength": 30000,
"description": "Existing human AE/support notes inside evidence[access_activity_log] that must be preserved."
}
},
"additionalProperties": false
}| paidAmountCents* | integer | Required cumulative amount collected from the buyer in non-negative integer cents (e.g. 75000 for 750.00 EUR; must be >= 0). |
| totalOrderCents | integer | Gross invoice total in positive integer minor currency units / cents (e.g. 250000 for 2,500.00 EUR; must be > 0). |
| creditNotesCents | integer | Optional post-invoice credit notes or return adjustments in integer cents (valid range: 0 to totalOrderCents, default: 0; plural alias for creditNoteCents). |
| paymentTermsDays | integer | Optional B2B net payment terms maturity window in integer days (allowed values: 15, 30, or 60 for Net-15, Net-30, or Net-60; default: 30). |
| requiredDepositCents | integer | Optional explicit upfront deposit threshold in integer cents (valid range: 0 to effectiveTotalCents). Overrides requiredDepositPercent when provided. |
| requiredDepositPercent | integer | Optional upfront deposit percentage required before releasing warehouse fulfillment hold (valid range: 0 to 100, default: 30 i.e. 30% upfront deposit). |
| daysElapsedSinceInvoice | integer | Optional elapsed integer days since invoice issuance (valid range: 0 to 3650, default: 5). |
{
"type": "object",
"required": [
"paidAmountCents"
],
"properties": {
"demo": {
"type": "boolean",
"description": "Optional sandbox flag (boolean)."
},
"orderId": {
"type": "string",
"description": "B2B wholesale order or invoice identifier (e.g. 'gid://shopify/Order/908812' or 'ORD-2026-9088', default: 'ord_local_b2b_01', max 64 chars)."
},
"toleranceCents": {
"type": "integer",
"maximum": 500,
"minimum": 0,
"description": "Optional rounding/FX reconciliation tolerance in integer cents (valid range: 0 to min(500, 1% of totalOrderCents), default: 0)."
},
"creditNoteCents": {
"type": "integer",
"minimum": 0,
"description": "Optional post-invoice credit notes or return adjustments in integer cents (valid range: 0 to totalOrderCents, default: 0; singular alias for creditNotesCents)."
},
"orderTotalCents": {
"type": "integer",
"minimum": 1,
"description": "Alias for totalOrderCents: gross invoice total in positive integer minor currency units / cents (must be > 0)."
},
"paidAmountCents": {
"type": "integer",
"minimum": 0,
"description": "Required cumulative amount collected from the buyer in non-negative integer cents (e.g. 75000 for 750.00 EUR; must be >= 0)."
},
"totalOrderCents": {
"type": "integer",
"minimum": 1,
"description": "Gross invoice total in positive integer minor currency units / cents (e.g. 250000 for 2,500.00 EUR; must be > 0)."
},
"creditNotesCents": {
"type": "integer",
"minimum": 0,
"description": "Optional post-invoice credit notes or return adjustments in integer cents (valid range: 0 to totalOrderCents, default: 0; plural alias for creditNoteCents)."
},
"paymentTermsDays": {
"enum": [
15,
30,
60
],
"type": "integer",
"description": "Optional B2B net payment terms maturity window in integer days (allowed values: 15, 30, or 60 for Net-15, Net-30, or Net-60; default: 30)."
},
"requiredDepositCents": {
"type": "integer",
"minimum": 0,
"description": "Optional explicit upfront deposit threshold in integer cents (valid range: 0 to effectiveTotalCents). Overrides requiredDepositPercent when provided."
},
"requiredDepositPercent": {
"type": "integer",
"maximum": 100,
"minimum": 0,
"description": "Optional upfront deposit percentage required before releasing warehouse fulfillment hold (valid range: 0 to 100, default: 30 i.e. 30% upfront deposit)."
},
"daysElapsedSinceInvoice": {
"type": "integer",
"maximum": 3650,
"minimum": 0,
"description": "Optional elapsed integer days since invoice issuance (valid range: 0 to 3650, default: 5)."
}
},
"additionalProperties": false
}{
"type": "object",
"properties": {
"demo": {
"type": "boolean",
"description": "Optional sandbox flag to run the preset replay simulation."
},
"events": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[A-Za-z0-9_.:-]{1,96}$",
"maxLength": 96,
"minLength": 1,
"description": "Alias for eventId when passing raw Stripe/Shopify event objects."
},
"tier": {
"enum": [
"free",
"starter_19",
"growth_59",
"scale_199"
],
"type": "string",
"description": "Optional RevClamp plan tier associated with the subscription state (default: 'growth_59')."
},
"type": {
"type": "string",
"pattern": "^[A-Za-z0-9_.-]{1,96}$",
"maxLength": 96,
"minLength": 1,
"description": "Alias for eventType (defaults to 'customer.subscription.updated' when omitted)."
},
"status": {
"enum": [
"active",
"trialing",
"past_due",
"paused",
"canceled",
"cancelled",
"unpaid",
"cancel_at_period_end",
"expired"
],
"type": "string",
"description": "Alias for subscriptionStatus."
},
"created": {
"type": "integer",
"maximum": 4102444800,
"minimum": 946684800,
"description": "Alias for createdSec when passing Stripe Unix created timestamps."
},
"eventId": {
"type": "string",
"pattern": "^[A-Za-z0-9_.:-]{1,96}$",
"maxLength": 96,
"minLength": 1,
"description": "Unique provider webhook event ID (e.g. evt_cancel_final_1050) checked against the 72-hour deduplication Set."
},
"eventType": {
"type": "string",
"pattern": "^[A-Za-z0-9_.-]{1,96}$",
"maxLength": 96,
"minLength": 1,
"description": "Webhook event type string (e.g. customer.subscription.deleted, customer.subscription.updated, invoice.payment_failed)."
},
"createdSec": {
"type": "integer",
"maximum": 4102444800,
"minimum": 946684800,
"description": "Provider event creation timestamp in Unix seconds (must be <= nowSec + 34560000 / 400 days) compared monotonically against lastAppliedCreatedSec."
},
"arrivedAtSec": {
"type": "integer",
"maximum": 4102444800,
"minimum": 946684800,
"description": "Optional arrival timestamp in Unix seconds for per-event deduplication window evaluation."
},
"target_status": {
"enum": [
"active",
"trialing",
"past_due",
"paused",
"canceled",
"cancelled",
"unpaid",
"cancel_at_period_end",
"expired"
],
"type": "string",
"description": "Snake_case alias for subscriptionStatus."
},
"arrived_at_sec": {
"type": "integer",
"maximum": 4102444800,
"minimum": 946684800,
"description": "Snake_case alias for arrivedAtSec in Unix seconds."
},
"subscriptionStatus": {
"enum": [
"active",
"trialing",
"past_due",
"paused",
"canceled",
"cancelled",
"unpaid",
"cancel_at_period_end",
"expired"
],
"type": "string",
"description": "Subscription lifecycle status carried by this webhook event."
},
"currentPeriodEndSec": {
"type": "integer",
"maximum": 4102444800,
"minimum": 946684800,
"description": "Optional subscription current_period_end timestamp in Unix seconds."
}
},
"additionalProperties": false
},
"maxItems": 10,
"minItems": 1,
"description": "Optional custom array of 1 to 10 webhook events ({ eventId, eventType, createdSec, subscriptionStatus, tier, currentPeriodEndSec }) in arrival order."
},
"nowSec": {
"type": "integer",
"maximum": 4102444800,
"minimum": 946684800,
"description": "Reference evaluation timestamp in Unix seconds used to check the 72-hour idempotency window."
},
"scenarioPreset": {
"enum": [
"out_of_order_stale_update_after_cancel",
"duplicate_event_id_replay_72h",
"valid_monotonic_upgrade_sequence",
"expired_72h_window_stale_event",
"custom"
],
"type": "string",
"description": "Scenario preset to evaluate when custom events are omitted (default: 'out_of_order_stale_update_after_cancel')."
},
"idempotencyWindowSec": {
"type": "integer",
"maximum": 2592000,
"minimum": 60,
"description": "Deduplication and replay-acceptance window in seconds (valid range: 60 to 2592000, default: 259200 for 72 hours)."
}
},
"additionalProperties": false
}| string |
| Stripe dispute reason code (e.g. 'fraudulent', 'unrecognized', 'subscription_canceled', 'product_unacceptable', 'general'; default: 'fraudulent'; Visa CE 3.0 applies to 'fraudulent' disputes). |
| priorTransactions | array | Optional array of up to 1000 historical Stripe charge objects (each with id, status: 'succeeded', disputed: false, refunded: false, occurredAtSec 120-365 days prior to disputedTransaction, email, ip_address, and device_id). |
| disputedTransaction | object | Optional disputed charge snapshot object containing id (e.g. 'ch_disputed_01'), occurredAtSec (Unix seconds), customer_id, email, ip_address, and device_id. |
| existingAccessActivityLog | string | Optional alias for existingUncategorizedText: existing merchant evidence notes in Stripe evidence.access_activity_log (up to 18,000 chars) to preserve via append-only merge. |
| existingUncategorizedText | string | Optional existing merchant evidence notes in Stripe evidence.uncategorized_text or access_activity_log (up to 18,000 chars) to preserve via append-only merge without overwriting. |
{
"type": "object",
"properties": {
"demo": {
"type": "boolean",
"description": "Optional simulation flag (boolean) to stage a labeled sample dispute preview."
},
"disputeId": {
"type": "string",
"description": "Stripe dispute identifier being staged (format example: 'du_1QxyzEnterpriseDispute01', default: 'du_mcp_staged_01', max 64 chars)."
},
"customerId": {
"type": "string",
"description": "Stripe customer identifier associated with the disputed charge (format example: 'cus_enterprise_88', default: 'cus_mcp_enterprise_01', max 64 chars)."
},
"usageEvents": {
"type": "array",
"description": "Optional array of up to 200 customer product/API usage telemetry events (each with occurredAtSec Unix seconds, stripe_customer_id, and event_name) for append-only access_activity_log staging."
},
"disputeReason": {
"type": "string",
"description": "Stripe dispute reason code (e.g. 'fraudulent', 'unrecognized', 'subscription_canceled', 'product_unacceptable', 'general'; default: 'fraudulent'; Visa CE 3.0 applies to 'fraudulent' disputes)."
},
"priorTransactions": {
"type": "array",
"description": "Optional array of up to 1000 historical Stripe charge objects (each with id, status: 'succeeded', disputed: false, refunded: false, occurredAtSec 120-365 days prior to disputedTransaction, email, ip_address, and device_id)."
},
"disputedTransaction": {
"type": "object",
"description": "Optional disputed charge snapshot object containing id (e.g. 'ch_disputed_01'), occurredAtSec (Unix seconds), customer_id, email, ip_address, and device_id."
},
"existingAccessActivityLog": {
"type": "string",
"description": "Optional alias for existingUncategorizedText: existing merchant evidence notes in Stripe evidence.access_activity_log (up to 18,000 chars) to preserve via append-only merge."
},
"existingUncategorizedText": {
"type": "string",
"description": "Optional existing merchant evidence notes in Stripe evidence.uncategorized_text or access_activity_log (up to 18,000 chars) to preserve via append-only merge without overwriting."
}
},
"additionalProperties": false
}| Two-letter EU-27 or XI member state prefix of the merchant's dispatch warehouse (e.g. 'DE', 'NL', 'FR', 'EL', 'XI'; 'GR' is automatically normalized to 'EL'; default: 'DE'). |
| consultationNumber | string | Optional VIES requester consultation reference number (e.g. 'WAPIAAAAW998877', max 64 chars) to attach to deterministic 'VALID' mode tax audit records. |
{
"type": "object",
"required": [
"buyerVatId"
],
"properties": {
"demo": {
"type": "boolean",
"description": "Optional simulation flag (boolean) for deterministic VIES gateway preset evaluation."
},
"viesMode": {
"enum": [
"FORMAT_ONLY",
"VALID",
"INVALID",
"MS_UNAVAILABLE",
"GLOBAL_MAX_CONCURRENT_REQ",
"LIVE"
],
"type": "string",
"description": "VIES evaluation mode: 'FORMAT_ONLY' (deterministic EU/XI syntax validation without consultation), 'VALID' (deterministic active VAT simulation, default), 'INVALID' (deterministic rejected VAT simulation), 'MS_UNAVAILABLE' or 'GLOBAL_MAX_CONCURRENT_REQ' (deterministic member-state outage circuit-breaker simulation), or 'LIVE' (real-time European Commission VIES lookup)."
},
"buyerVatId": {
"type": "string",
"description": "Required buyer EU or Northern Ireland VAT registration number to normalize and validate (e.g. 'DE123456789', 'GR123456789', 'NL123456789B01', 'XI123456789', max 40 chars)."
},
"sellerCountry": {
"type": "string",
"description": "Two-letter EU-27 or XI member state prefix of the merchant's dispatch warehouse (e.g. 'DE', 'NL', 'FR', 'EL', 'XI'; 'GR' is automatically normalized to 'EL'; default: 'DE')."
},
"consultationNumber": {
"type": "string",
"description": "Optional VIES requester consultation reference number (e.g. 'WAPIAAAAW998877', max 64 chars) to attach to deterministic 'VALID' mode tax audit records."
}
},
"additionalProperties": false
}| Webhook signature provider scheme to evaluate: 'stripe' (Stripe-Signature t=<sec>,v1=<hex>, default), 'shopify' (X-Shopify-Hmac-Sha256 Base64 raw UTF-8 HMAC), or 'revclamp' (X-RevClamp-Signature t=<sec>,v1=<hex>). |
| rawPayload | string | Exact unparsed UTF-8 webhook request body string (up to 16,384 chars) used to compute the canonical SHA-256 HMAC digest. Defaults to a provider-specific sample JSON event if omitted. |
| timestampSec | integer | Optional Unix epoch timestamp in integer seconds (valid range: 1 to 9999999999; defaults to current server Unix timestamp) used when generating or verifying timestamped Stripe/RevClamp headers. |
| toleranceSec | integer | Optional replay window tolerance in integer seconds (valid range: 1 to 3600, default: 300). |
| signatureHeader | string | Optional supplied HTTP signature header value to verify via crypto.timingSafeEqual (e.g. 't=1760000000,v1=...' or Base64 digest, max 512 chars). Omit to run in GENERATE_AND_SELF_VERIFY mode. |
{
"type": "object",
"properties": {
"demo": {
"type": "boolean",
"description": "Optional sandbox flag; uses synthetic defaults when provider, secret, or rawPayload are omitted."
},
"secret": {
"type": "string",
"description": "Synthetic or test webhook signing secret (default: 'whsec_test_revclamp_sandbox_secret_2026', max 256 chars, or comma-separated rotation secrets). Live production secrets (sk_live_, rk_live_, non-test whsec_..., shpss_..., shpat_..., rg_live_, rc_live_, AKIA..., and PEM private keys) are rejected."
},
"secrets": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 5,
"description": "Optional array of 1 to 5 synthetic/test webhook signing secrets (each <= 256 chars) to evaluate during rolling webhook secret rotation."
},
"provider": {
"enum": [
"stripe",
"shopify",
"revclamp"
],
"type": "string",
"description": "Webhook signature provider scheme to evaluate: 'stripe' (Stripe-Signature t=<sec>,v1=<hex>, default), 'shopify' (X-Shopify-Hmac-Sha256 Base64 raw UTF-8 HMAC), or 'revclamp' (X-RevClamp-Signature t=<sec>,v1=<hex>)."
},
"rawPayload": {
"type": "string",
"description": "Exact unparsed UTF-8 webhook request body string (up to 16,384 chars) used to compute the canonical SHA-256 HMAC digest. Defaults to a provider-specific sample JSON event if omitted."
},
"timestampSec": {
"type": "integer",
"maximum": 9999999999,
"minimum": 1,
"description": "Optional Unix epoch timestamp in integer seconds (valid range: 1 to 9999999999; defaults to current server Unix timestamp) used when generating or verifying timestamped Stripe/RevClamp headers."
},
"toleranceSec": {
"type": "integer",
"maximum": 3600,
"minimum": 1,
"description": "Optional replay window tolerance in integer seconds (valid range: 1 to 3600, default: 300)."
},
"signatureHeader": {
"type": "string",
"description": "Optional supplied HTTP signature header value to verify via crypto.timingSafeEqual (e.g. 't=1760000000,v1=...' or Base64 digest, max 512 chars). Omit to run in GENERATE_AND_SELF_VERIFY mode."
}
},
"additionalProperties": false
}