Stripe’s payments APIs: The first 10 years
Stripe's payments API evolved from a card-centric Token-and-Charge model, famous as "seven lines of code", through ad hoc extensions for ACH debit (a pending state) and Bitcoin (a separate BitcoinReceiver), to the unified Sources API. Each extension piled product debt onto abstractions built for cards, the simplest payment method because it finalizes immediately and needs no customer action. The result was two state machines split across client and server, parallel synchronous and webhook-driven fulfillment paths, and lost payments when browsers dropped connectivity before a Charge was created. The key lesson is that global payment methods are not the exception, cards are, and that recognition drove the redesign toward the PaymentIntents API.
Related posts
- Stripe: An orchestration layer, not a platform
Render easyNovice
Stripe Projects is a CLI and open protocol that lets developers (or coding agents) create provider accounts, provision services, manage environment variables and pay for upgrades across roughly 50 providers from one place. The protocol models three objects (account, service and resource), and each provider implements three endpoints: a browserless account request, a service catalog polled every ten minutes, and a resource endpoint covering provisioning, credential return, rotation and removal. Payment uses one shared method that Stripe tokenizes separately per provider, with per-provider spending limits and a push API for syncing changes. Accounts remain owned by the developer, positioning Stripe as an orchestration layer rather than an intermediary, and the protocol is slated to be published later in the summer.
- Introducing the commerce payments protocol
Shopify Engineering mediumAdeptThe Commerce Payments Protocol, built by Coinbase and Shopify on Base, brings card-style authorize-and-capture flows onchain using an immutable escrow smart contract between payer and receiver. Operators submit transactions and pay gas on behalf of merchants but are constrained: payers sign a hash of the payment terms (receiver, token, max amount, expiries, operator), signatures cannot be replayed, payers can reclaim funds after authorization expiry, and each operator's funds sit in separate buckets. Six operations (authorize, capture, charge, void, reclaim, refund) cover the payment lifecycle, with partial captures and ERC-3009 signature-based token collection enabling gasless USDC payments. The protocol powers Shopify's USDC payment method and is open for extension via operator, receiver and token-collector contracts.
- Building with Stripe Data Pipeline and the Neon backend
Neon mediumAdept
Stripe Data Pipeline's real-time sync streams Stripe objects into Postgres tables within seconds, which lets apps drop webhooks entirely: they write to Stripe's API and read charges, prices and promotion codes from synced stripe.* tables. Two example apps compute credit balances as a SQL view (purchased minus spent), so refunds, disputes and duplicate deliveries are handled without handler code. Double spending is prevented by a per-user advisory lock plus a conditional UPDATE that claims a job only if the view shows enough balance. Neon point-in-time branches copy Stripe data, app data, object storage and disabled triggers, so billing bugs can be reproduced and fixed locally without touching production.
- Agents that can pay: building Restock with Stripe's Link and Managed Deep Agents
LangChain mediumAdeptRestock is a sample Slack office-supply agent on Managed Deep Agents that makes real purchases. It searches Zinc, builds a cart, and pays through Stripe's Link wallet over the Machine Payments Protocol, where the merchant returns HTTP 402 with payment instructions and the client retries with a shared payment token. Spending limits and approvals live in code the model can't touch. The user sets an upfront amount under the budget, approves it through a Slack interrupt and again in Link, and the agent reads actual fees from the 402 challenge first. Credentials stay in per-user Connections and a sandbox, tokens are deleted after use, and an order counts as placed only when the merchant reports it.
- Beyond Test Cards: A Fake Payment Provider for Testing at Scale
Lyft Engineering mediumAdeptLyft built a Fake Payment Provider that implements the same provider interface as real processors (tokenize, authorize, increment, capture, charge, refund, void), so it can simulate partial failures, soft declines with retries, pending responses, timeouts and outages that processor test cards cannot. Each test scenario is encoded into a fake low-value token, persisted as a high-value token, and kept stable across the charge lifecycle. Scenarios are dictionaries of per-action specs with success predicates (including a 50% chaos mode), delays, network decline codes and per-attempt retry specs. Strict routing rules confine the fake to simulated users. That lets it run safely in production for load testing the full payment stack, and new scenarios can be added through an AI coding skill whose output still goes through code review.