Loading…

Stripe
Global payments and financial infrastructure platform building sophisticated technology for online commerce
- 117 posts summarised
- latest
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
From their blog
Latest articles
Agentic payments for marketplaces: How a smart fridge can shop safely
GreenMart’s smart-fridge scenario addresses how an agent can turn a detected grocery need into an authorized order without receiving unrestricted access to household card or wallet credentials. GreenMart uses Stripe Agentic Commerce Suite to expose its catalog and checkout through a hosted Agentic Commerce Protocol (ACP) endpoint, while retaining responsibility for inventory, pricing, fulfillment, and order operations. A fridge agent discovers products and creates a checkout, and a companion app evaluates the final checkout against deterministic household rules covering items, totals, delivery, substitutions, and budgets. After approval, Link can provide bounded payment authority, while direct Shared Payment Tokens (SPTs) support lower-level Stripe integrations; virtual cards are described for eligible non-Stripe merchants. The design emphasizes auditable policy decisions, explicit escalation or denial, idempotent retries, webhook reconciliation, and stopping when changes exceed the household’s authority.
Meet Stripe's Knowledge AI Platform
Stripe built Kai, a knowledge AI platform for non-engineering work that existing no-code and coding agents could not support with Stripe’s required data security and workflow specificity. It serves tasks including account research, incident triage, revenue modeling, compliance reviews, and data-warehouse queries, while adapting to different tools, data sources, outputs, and definitions of completion. Kai is organized into surface-agnostic APIs, AgentStudio for domain teams to build and govern agents, and shared execution environments with per-session Kubernetes sandboxes, multi-tenant virtual filesystems, access controls, and long-session state management. The platform connects to more than 1,000 skills and tools and supports web, Slack, embedded, and custom application experiences. Within two weeks of its April launch, most of Stripe was using Kai; it now has 83% weekly active users, and reported effects include 25,000 annual hours shifted from administrative work and higher sales activity and deal creation among Account Executives.
How Stripe uses graph search and state machines to auto-remediate a global database fleet
Stripe describes how its Document Database fleet previously handled degraded MongoDB shards with single-step, hard-coded plugins that struggled with combined failures, intermediate states, and more than 40 shard layouts. The replacement models shard topology and health as a directed graph, with infrastructure operations as edges and safety invariants defining valid states. A simulator uses breadth-first search to find minimum-operation recovery paths, while an abstraction over Temporal contexts lets the same remediation logic run in memory without real infrastructure calls; later, the system also uses Dijkstra's algorithm. The system reduced pager volume by 30%—about 200 pages annually—reclaimed 12 days of fleet health each year, and handled a new layout with zero code changes, according to the post.
Keeping funds where they belong: Implementing fund segregation in Stripe Connect
Marketplaces using Stripe Connect’s separate charges and transfers can pool seller funds with platform revenue, exposing them to payouts, unrelated disputes, fees, refunds, and operational mistakes. In response to anticipated PSD3 changes and tighter Commercial Agent Exemptions, Stripe introduced Segregated Separate Charges and Transfers, which places captured payment funds in an allocated balance that cannot fund payouts and can only be transferred to connected accounts. The integration enables allocated_funds on PaymentIntents, transfer_group tracking, source_transaction-linked transfers, and application fees collected from the same allocation; balances are inspected through the API. The post also details split transfers, refund and reversal ordering, dispute handling, prerequisites, and limitations including card-only support, preview-header requirements, and sandbox-only testing, presenting segregation as a way to make fund flows traceable and operationally safer.
Introducing a better way to process Stripe's thin events
Stripe introduces event notification handlers to simplify processing thin events, unversioned JSON payloads that remain identical across API versions. The problem is that current integrations require developers to validate and route notifications, manage Stripe-Context for connected accounts, and manually maintain event-type strings, while API-version or SDK upgrades can cause runtime errors. Handlers move casting, routing, validation, and conversions into the SDK: typed callbacks are registered with handler.on, and callbacks receive a parsed notification plus a StripeClient already bound to the event context. The handler also provides a fallback for unhandled events and supports normal function-level testing, while the webhook endpoint only needs to pass the request body and signature to handler.handle. The pattern is supported in seven server-side SDKs, with feedback sought before general availability and possible future improvements to validation and framework integrations.
Extending Stripe’s network with stablecoins
Stripe describes integrating stablecoin settlement into its existing Global Payments and Treasury Network (GPTN), rather than creating a parallel system. GPTN models accounts, wallets, and payment rails as a directed graph, allowing routing, netting, cross-entity settlement, FX, reconciliation, and liquidity management to span fiat and blockchain flows. For a payout, Stripe records a pending stablecoin obligation, Bridge draws from a stablecoin liquidity pool to credit the recipient within seconds to minutes, and fiat replenishment proceeds asynchronously over traditional rails; reverse flows work similarly. A direct mode bypasses the usual few-minute planning cycle for urgent wallet funding, trading netting efficiency for speed, while standard flows continue batching. The live infrastructure handles real traffic, with ongoing work focused on forecast-driven liquidity, faster replenishment through RTP and SEPA Instant, and broader product and corridor coverage.
From hobby to real world: integrating the hard stuff with agents
The post documents building a production-oriented leaderboard for open-source Stripe Projects applications, where users submit projects, share links, and vote. Unlike an earlier transcription app, this project required authentication, multiple database tables, hosting, and controls limiting unauthenticated users to one vote per project. The agent initially selected Supabase for database and auth and Vercel for hosting, then added Upstash Redis after an in-memory rate limiter proved unsuitable for serverless enforcement. Supabase's two-emails-per-hour authentication limit prompted a human-directed migration to Clerk, after the agent proposed an unsuitable Twilio solution. The resulting MVP used five resources across four providers, took more than a day, and received separate security and performance audits before review.
How API changes flow into Stripe's developer products
Stripe describes how API changes are propagated across its developer-product suite, including SDKs in seven languages and three release channels, the CLI, Shell, API Explorer, API Reference, changelog, and internal tools. Historically, v1 workflows used OpenAPI or a Ruby-based DSL while v2 APIs used protobuf-based DSLs and an internal API specification, forcing teams to maintain parallel generators and leaving some products without v2 support. Stripe chose OpenAPI as a shared representation and built a pipeline whose generated artifacts are tailored by variant, release phase, and API version, with vendor extensions carrying Stripe-specific metadata. Automated validation, OpenAPI diffs, pre-release comparisons, versioned snapshots, and downstream publishing now connect API definition changes to documentation, code samples, SDK and CLI releases, while older v1 versions remain difficult to regenerate with newly added metadata.
Scaling up your microservice testing with Apache Spark—Part 2
Part 2 describes how to build a repeatable Apache Spark replay harness for testing high-impact microservices against historical, production-shaped inputs without reimplementing the service. The design turns dependency state—such as database snapshots, versioned rules, merchant configuration, eligibility state, and logged service responses—into datasets, while representing side effects as output rows and matching fidelity to the decision under test. A thin Spark wrapper reconstructs ReplayInput objects, invokes the same deterministic decision engine used online, compares current and candidate results, and writes traceable diffs with intermediate values and rule explanations. The source cautions that incomplete context, distributed state, asynchronous workflows, and external actors limit replay’s predictive power, so it should model explicit assumptions rather than claim full production simulation. It presents migrations as a practical point to establish these boundaries and use replay to reduce risk.
Scaling up your microservice testing with Apache Spark
Microservices whose behavior depends on long-tail production inputs—such as payment cost estimation—are difficult to validate with unit and integration tests alone. The described pattern separates deterministic service logic from transport and side effects, then invokes that logic in Apache Spark across historical records enriched with the required dependency state. The resulting datasets can compare current and candidate implementations, quantify changed outputs, model future rule changes, and identify affected transaction or merchant segments. Replay inputs and artifacts are minimized and protected through tokenized identifiers, redaction, access controls, and retention policies, while smaller privacy-safe golden datasets run in pull-request CI. The approach complements, rather than replaces, unit and integration tests: golden datasets cover known service behavior, and full replays expose changes across the real production distribution before deployment.
Compliance versus conversion: Tax ID validation at checkout
Tax ID collection at checkout supports compliant tax invoices and tax determination, including reverse-charge treatment for qualifying cross-border business transactions. Validation can be performed synchronously before purchase completion or asynchronously after checkout: synchronous checks reduce correction and audit risk but may increase abandonment and expose conversion to government-service downtime, while asynchronous checks preserve completion but require follow-up on failures. The implementation discussion covers direct national-registry integrations, third-party validation services, and Stripe’s CheckoutSessions and PaymentIntents integrations, where the Tax ID Element uses verification modes of if_supported or none. Stripe first applies a country-specific format check, routes validly formatted IDs to government APIs, may fall back to asynchronous processing after four seconds, and exposes status through customer.tax_id.updated and the customer object.
Modern Java at Stripe: Language upgrades as a service
Large JVM codebases often stall Java upgrades because build-graph constraints require coordinated changes across many owners, while manual scripts and stale inventories repeatedly rediscover blockers. Stripe built AutoJDK to continuously analyze the live build graph, compute eligibility using reverse-dependency, runtime, framework, and dependency-ordering constraints, and generate bounded, idempotent pull requests rather than opaque rewrites. It also tracks adoption and blocker categories, uses AI assistance for selected remediation tasks, and can operate continuously or on specified packages and services. Centralized JDK and runtime policy, CI checks, multi-JDK support, static analysis, and packaging applications with platform-specific JDKs support gradual transitions. After three months, the upgrader had merged more than 160 PRs, made JDK 17 the most common target, eliminated Java 8 services, and reduced the JDK 8 and 11 footprint by roughly 25K targets.
What it feels like building with Stripe Projects
The post recounts a 60-minute attempt to build a GitHub traffic dashboard with Stripe Projects, motivated by GitHub’s 14-day limit on traffic history. Using Cursor’s agentic chat workflow alongside Projects, the builder assembled a Next.js application with Auth0 authentication, Supabase persistence, Prisma schema management, Vercel hosting, scheduled jobs, environment wiring, and periodic GitHub traffic synchronization. The experiment largely avoided direct coding and instead tested whether AI-mediated orchestration could produce a production-shaped stack quickly. As services and credentials appeared across providers, the main difficulty shifted from implementation to understanding ownership, deployment topology, environment management, and operational flow. The repositories synced, charts populated, and historical data appeared, while the experience also exposed a need for clearer generated architecture or infrastructure-as-code descriptions of the assembled system.
You can't whisper at an AI agent
Stripe engineers ran roughly a dozen experiments to determine how to get AI agents to use current API versions, follow integration best practices, and load the Stripe skill. Passive hints, including SDK files, AGENTS.md guidance, and API warning responses, were largely ignored, while active prompts and distribution mechanisms performed better. A modular, progressively disclosed skill structure outperformed a monolithic file by roughly 10% and reduced token usage; a CLI login prompt led 30–35% of viewers to copy its install command, and explicit compatibility-mode errors prompted agents to correct version mismatches. The results suggest that agent-facing developer experience is primarily a distribution problem, with hard steering through errors and loaded instructions more reliable than soft hints agents may never encounter.
Learnings from init to deploy
An agent was used to build a transcription app for a team from initialization through deployment with Stripe Projects, OpenRouter, and Vercel. The app sends video-generated subtitles through an OpenRouter agent with a detailed system prompt and Stripe documentation tool calls, producing a formatted transcription whose speaker and service names are corrected. The author recommends treating agent-generated plans like design documents, verifying provider behavior, and using streaming for long transcripts because Vercel serverless limits made non-streaming responses prone to 504s for a roughly 1,500-line transcript. Testing led to removing an unreliable free-model tier, defaulting to openrouter/auto, and choosing Claude Opus 4.5-thinking over Claude Sonnet 4.5; shared agent files were committed, and a separate review agent was used before human review.
From init to deploy: building with agents and Stripe Projects
The post describes an internal agentic transcription app built to reduce the manual effort required to correct auto-generated subtitles for Stripe Developers videos. The app uses a Next.js interface with transcript, chat, and corrected-output panels, while Stripe Projects CLI links Vercel and OpenRouter and populates required environment variables. An LLM client supports selectable models, iterative instructions, and a transcription agent whose system prompt emphasizes preserving transcript structure; the agent can also use Stripe documentation search through MCP. In a benchmark on a 771-line meetup script, Gemini 2.5 Pro reached 99% accuracy, while the tested models reduced editing from more than 30 minutes to just over two minutes of generated edits plus a human check. The reported overall reduction was 4x, with testing costs totaling $2.54.
Formatting an entire 25 million line codebase overnight: the rubyfmt story
Stripe’s 25-million-line Ruby codebase needed a true autoformatter; before rubyfmt, no industry-wide Ruby formatter existed, and earlier tools had crashed on its files. rubyfmt began as a zero-configuration open-source project motivated by formatting disputes, Ruby’s slow startup, and the uncertainty faced by engineers arriving from other languages. To meet a 100ms target, it initially used a hand-authored C launcher and later moved formatting into Rust, with ripper parse trees first passing through JSON and eventually being deserialized directly from Ruby VALUE objects. Stripe adopted per-file opt-in, expanded coverage cautiously, and formatted the codebase on a Saturday in 2024; the excerpt reports that all 42-million-line Ruby codebase is now formatted. In 2025, migrating from ripper to Prism removed the need to link a Ruby VM and made rubyfmt smaller and dramatically faster.
How we built Stripe Credits: A programmable, auditable way to pay your Stripe fees
Stripe Fee Credits replaces ad-hoc discounts and manual cash adjustments with a programmable, auditable virtual balance dedicated to eligible Stripe fees. The architecture has three layers: a standalone gRPC credits engine for metadata, policies, lifecycle, and audit history; logical financial accounts built on Money Movement and Storage; and fee-settlement orchestration that applies eligible credits before the primary balance. Logical accounts carry ledger balances without representing real cash, while platform checks restrict Originated Money Transfers to logical-to-logical movements and exclude these accounts from cash sweeps. Prepaid and Stripe-funded credits share the user experience but use separate funds flows: prepayments create deferred revenue and collect tax at drawdown, whereas Stripe-funded credits are booked as Stripe costs with taxes written off. The resulting infrastructure supports incentives, prepaid annual fees, and other programs across 26+ countries, with Dashboard balances and real-time auditability, while avoiding bespoke engineering for each commercial model.
Using AI agents to build Stripe-Salesforce integrations faster
An experiment using Claude Code to build a Stripe App for Salesforce Flow exposed context gaps: the generated integration misnamed fields, targeted a nonexistent custom field, and omitted AsyncAfterCommit, causing a “Callout from triggers not supported” deployment error. The proposed remedy is a repository of grounding context files that present invocable signatures, request models, platform constraints, LWC patterns, and validated examples in concise, machine-readable form. Core files are about 35K tokens, while the full reference catalog is about 230K tokens and can be loaded on demand. With the context loaded, the agent selected the v02_CreateCustomers invocable directly and generated a helper Apex class for nested Checkout Session inputs, along with callout-safe Flow structure and other safeguards. The author reports minutes instead of hours and fewer iterations in personal usage, while noting that org-specific details still require human verification.
Selective Test Execution at Stripe: Fast CI for a 50M-line Ruby monorepo
Stripe’s Ruby monorepo contains about 50 million lines, 100,000 test files, and roughly 1.2 million test units, making sequential execution impractical at an estimated four months. To keep CI within minutes, Selective Test Execution (STE) runs tests whose recorded file accesses intersect files changed since a suitable baseline, averaging about 5% of the suite and under 10% of always-run compute. A dynamically linked C++ library loaded with LD_PRELOAD intercepts file opens, associates them with hierarchical test scopes, and propagates tracing to child processes; logs are aggregated into a selection index outside the syscall hot path. Guardrails cover tests affected by directory discovery, previously failing tests, selective linting, generated files, and reproducible database-backed baselines ordered by Monotonic Revision IDs. The system is presented as a way to preserve safety and affordability while scaling CI for a highly dynamic language.
Topics they write about
All topics →Weekly digest
The best engineering reads, once a week.