Seven Lines of Code: How the Collison Brothers Made PayPal Look Like a Relic
πŸš€Origin StoriesSeptember 6, 2026 at 3:18 AMΒ·7 min read

Seven Lines of Code: How the Collison Brothers Made PayPal Look Like a Relic

In the summer of 2010, a 22-year-old Irish college dropout walked onto a Y Combinator stage and made payments disappear into seven lines of JavaScript. Fifteen years later, Stripe is worth $95 billion β€” and still hasn't gone public.

StripeFintechStartupsDeveloper ToolsAPI DesignY CombinatorPayPal

The Demo That Broke the Room

Summer 2010. A stuffy room in Mountain View, California, packed with Y Combinator founders waiting their turn to pitch. Most demos that day were the usual grind β€” screenshots, roadmaps, promises. Then a lanky 22-year-old with a soft Cork accent stepped up, pulled up a text editor, and said something that sounded almost insultingly simple:

"Paste seven lines of JavaScript, and you can accept payments."

He typed. He pasted a snippet. He ran it. Money moved.

The room went quiet in the way rooms go quiet when everyone realizes they just watched something that shouldn't have been possible. Getting a business ready to accept credit cards in 2010 meant weeks of merchant account applications, PCI compliance forms, sales calls with payment processors who treated you like a fraud risk until proven otherwise, and a checkout UX that looked like it was designed to make customers abandon their carts. PayPal, the supposed gold standard, wasn't much better β€” redirects, broken sessions, a developer experience seemingly built by people who'd never shipped code themselves.

Patrick Collison had just made all of that evaporate. His brother John, nineteen years old, was in the audience. The company was called Stripe.

Dripsey, Ireland β€” Population: Not Many

To understand why the Collisons built Stripe, you have to understand where they came from: Dripsey, a village in County Cork, Ireland, so small it barely registers on a map. Their father was an engineer, their mother ran a business β€” a household that treated technical curiosity as the default setting, not a hobby.

Patrick was building things before most kids learn long division. At sixteen, he won the BT Young Scientist & Technology Exhibition β€” Ireland's most prestigious science competition β€” for creating a Lisp dialect called Croma. Not a website. Not an app. A programming language, designed by a teenager in a rural Irish village.

John was close behind him, equally obsessive, equally allergic to slow-moving institutions. Both brothers went to elite universities β€” Patrick to MIT, John to Harvard β€” and both promptly discovered that classes were a distraction from what they actually wanted to do, which was build companies.

Their first attempt was Auctomatic, a startup that helped eBay power sellers manage their listings across multiple accounts. They built it, got into Y Combinator, and sold it to Live Current Media for a reported $5 million. Patrick was 19. John was 17. Most people that age are worrying about final exams. The Collisons had already had an exit.

They went back to school. They dropped out again. Because in 2009, while trying to build something new, they kept hitting the same wall every developer building anything online hit: taking payments was miserable. Not hard in the sense of cryptography or distributed systems β€” hard in the sense of paperwork, gatekeepers, and hostile documentation. So they decided to fix the actual plumbing of the internet economy.

Pitching the Unimpressed

Getting into Y Combinator wasn't automatic sailing. Paul Graham and Sam Altman had seen a hundred "we're going to fix payments" pitches, and payments was considered a graveyard for startups β€” regulated, boring, dominated by entrenched giants with banking relationships nobody could replicate. But when the Collisons showed what the integration actually felt like from a developer's chair, the reaction changed. Graham reportedly became one of Stripe's earliest and loudest believers, and Stripe entered YC in 2010 under the working name "/dev/payments" before rebranding.

The insight wasn't a new payment rail. Visa and Mastercard's rails already existed. The insight was that every other payments company treated developers as suspects to be interrogated β€” compliance checklists, hostile documentation, sales calls β€” while the Collisons treated developers as the customer. The actual product wasn't payment processing. It was the experience of integrating payment processing. That distinction was worth billions.

The Architecture of Trust

Stripe's technical decisions weren't accidents; they were a philosophy expressed in code.

API-first, verb-correct REST. Where competitors bolted an API onto an existing enterprise sales process, Stripe built the API as the product itself. Every resource β€” a Charge, a Customer, a Subscription β€” behaved exactly like you'd expect from reading the name. No surprises, no undocumented side effects. Developers noticed immediately, because most APIs at the time didn't respect that discipline.

Idempotency keys. This is the unsung hero of Stripe's engineering culture. Networks fail. Requests time out. A client might retry a charge request without knowing if the first one succeeded. Stripe let developers attach a client-generated idempotency key to any request; if the same key showed up twice, Stripe returned the original result instead of charging the customer again. It sounds small. It single-handedly eliminated one of the most terrifying failure modes in financial software β€” the double charge β€” and it became a pattern the entire industry eventually copied.

Exponential backoff, baked into every SDK. Stripe didn't just document how to retry failed requests responsibly β€” they shipped the retry logic inside their official libraries, so developers got resilient behavior by default instead of by reading page 40 of a PDF.

Test mode and live mode, separated by key prefix. sk_test_ versus sk_live_. A trivial-seeming detail that meant developers could build, break, and experiment fearlessly, without touching real money, without filing a support ticket to get a sandbox account provisioned.

Error messages as a design surface. Stripe engineers obsessed over error strings the way novelists obsess over opening lines. Instead of Error: 402, you got a sentence explaining exactly what went wrong and often what to do about it. For an industry built on cryptic bank decline codes, this alone felt revolutionary.

Webhooks as first-class citizens. Payments aren't single events β€” a subscription renews, a dispute opens, a payout clears days later. Stripe built its entire event system around webhooks from day one, letting applications react to the full lifecycle of money moving, not just the initial charge.

The Turning Point: Becoming Infrastructure, Not a Feature

The real inflection came when Stripe stopped being "a way to accept credit cards" and started becoming the infrastructure layer for starting and running an entire business. Stripe Atlas let anyone, anywhere in the world, incorporate a Delaware C-corp and open a US bank account without ever setting foot in America β€” turning company formation itself into an API call. Stripe Connect let platforms like Lyft, Instacart, and countless marketplaces pay out thousands of independent sellers or drivers without building their own banking relationships. Stripe Radar used machine learning trained across Stripe's entire network to catch fraud patterns a single merchant could never see alone. Stripe Issuing let companies mint their own physical and virtual cards.

Each product followed the same logic: find the boring, painful, bureaucratic layer of running an internet business, and make it an API call.

The Legacy

Stripe now processes hundreds of billions of dollars a year for millions of businesses, from single-person Shopify stores to Amazon and Google. It's valued around $95 billion, one of the most valuable private companies in the world β€” and still, remarkably, private, years past when most observers expected an IPO. The Collisons have shown no urgency, preferring to keep building rather than answer to quarterly earnings calls.

What makes Stripe's story endure isn't the valuation. It's that a document meant purely as technical reference β€” the Stripe API docs β€” became something computer science programs now study as a model of interface design, the same way English departments study prose style. Two brothers from a village most people can't find on a map decided that the plumbing of the internet economy deserved the same craftsmanship as the products built on top of it. Seven lines of JavaScript later, PayPal looked like a fax machine in a world that had just discovered email.

✍️
Written by Swayam Mohanty
Untold stories behind the tech giants, legendary moments, and the code that changed the world.

Keep Reading