Verify365 Builds Per-Request Stripe Connect Clients to Isolate Multi-Tenant Payments
Verify365, a white-label SaaS platform serving multiple law firms, needed a way to route client payments directly into each partner firm's own Stripe account while still collecting a platform processing fee. The engineering team solved this by building a custom Go package called stripe365, which creates a fresh Stripe client on every request rather than sharing a single app-wide instance. Each client is initialised with either the partner's own Stripe credentials or the platform's default credentials as a fallback, determined by an IsDefault flag set at construction time. Partner accounts have a platform fee — currently 1.85% plus £0.20 per transaction — deducted before the net amount is routed to their connected Stripe account via TransferData. The per-request, stateless design prevents credential cross-contamination between tenants, a risk the team identified with long-lived cached clients.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in