FabricFabricHarness
EcosystemChannels

Stripe

Route signed Stripe events with financial-operation controls.

fh add channel stripe
import { createStripeChannel } from '@fabric-harness/channels/stripe';

export default createStripeChannel({
  endpointSecret: process.env.STRIPE_WEBHOOK_SECRET!,
  agent: 'billing',
});

Create an event destination for POST /channels/stripe/webhook. The adapter verifies every Stripe-Signature over exact bytes, applies the standard five-minute replay window, deduplicates by event ID, and uses the connected account and customer/resource as tenant and session identity.

Use updateStripeCustomer(ref, { secretKey, customerId }) as a narrowly scoped governed tool.

Never let model output directly choose unrestricted amounts, recipients, or idempotency keys. Refunds, transfers, subscription changes, and other financial writes should require approval.