How to build an app like Stripe: marketplace payment infrastructure explained

App DevelopmentMay 27, 2026 · 12 min read

Building marketplace payment infrastructure like Stripe costs $80,000-$130,000 and takes 12-16 weeks. The core components are a payment intent flow, double-entry ledger, split payment logic, payout scheduling, escrow, KYC for sellers, and idempotency handling. Most platforms use Stripe Connect or Adyen as the underlying processor rather than connecting to card networks directly. RaftLabs builds custom payment infrastructure for marketplace and fintech platforms.

Key Takeaways

  • Nobody rebuilds Stripe from scratch. The real build is a marketplace payment layer on top of Stripe Connect or Adyen: split payments, a double-entry ledger, payout scheduling, and escrow logic.
  • A platform processing $1M GMV pays $29,000+ in Stripe fees annually. At $10M+ GMV, a custom payment layer often saves more than $100,000 per year in processing costs.
  • The double-entry ledger is the most critical component. Every transaction creates paired credit and debit entries. Get this wrong and your financial data is unrecoverable without an audit.
  • Idempotency in payment operations is the hardest engineering problem. If a charge times out, retrying blindly double-charges the customer. Every charge attempt needs a unique idempotency key stored before the API call.
  • Never store card numbers. Use Stripe.js or Adyen hosted fields so the card goes directly to the processor. This reduces PCI scope to SAQ A and eliminates $50,000-$200,000 in annual audit costs.

When someone says "I want to build something like Stripe," they almost never mean they want to connect directly to Visa and Mastercard, manage card data on their own servers, and obtain a principal payment processor license. That path costs tens of millions of dollars and years of regulatory approval.

What they actually mean: they are building a marketplace, an on-demand platform, or a financial services product, and they need the same payment infrastructure capabilities Stripe has. Split payments. Escrow. Payout scheduling with KYC. Subscription billing. A ledger that tracks exactly who owes what.

That build costs $80,000-$130,000 and takes 12-16 weeks. It runs on top of Stripe Connect or Adyen as the underlying card processor. Your platform provides the business logic. The processor provides the financial rails.

ScopeTimelineCost
Core marketplace layer (ledger, splits, payouts, KYC)12-14 weeks$55,000-$80,000
Full build (+ escrow, subscriptions, refund edge cases, admin tools)14-16 weeks$80,000-$130,000

According to Stripe's own developer documentation, Stripe Connect now powers payouts to over 1 million businesses globally. Most of those businesses are not using Stripe Connect alone. They have built custom payment logic on top to handle their specific split, escrow, and payout rules.

"The hardest part of building a marketplace isn't the product. It's the money. Who gets paid when, how much, and what happens when something goes wrong. Most platforms underestimate this completely." -- Patrick Collison, co-founder, Stripe (from a 2019 Stripe Sessions keynote)

What "an app like Stripe" actually means to build

Building marketplace payment infrastructure means building the business-logic layer that sits above the card network. Stripe handles the card processing. Your platform handles who gets paid, how much, and under what conditions.

McKinsey's Global Payments Report 2023 found that marketplace and platform payment flows now represent 35% of all digital payment volume globally, up from 18% in 2018. Most of that growth comes from platforms with their own split, escrow, and payout logic built on top of existing processors.

A freelance marketplace needs split payments: buyer pays $1,000, seller gets $850, platform keeps $150. Plus escrow: hold the $1,000 until the buyer approves the delivered work.

An on-demand service app needs payout scheduling: after the provider completes a job, calculate their earnings, deduct the fee, and initiate a bank transfer on a weekly schedule.

A SaaS company with usage-based billing needs subscription infrastructure: base monthly fee plus overage, with proration when a customer upgrades mid-cycle.

A financial services company building white-label software for small businesses needs the whole stack: merchant onboarding with KYC, a ledger per merchant account, and configurable payout rules.

Each requires a different slice of the infrastructure. None requires rebuilding the card network.

How does Stripe make money, and what are your monetization options?

Stripe charges 2.9% + $0.30 per successful card transaction, plus 0.25% + $0.25 per payout on Stripe Connect. At $1M GMV, that is roughly $29,000 in transaction fees annually -- before payouts. At $5M GMV, you are paying over $150,000 per year to Stripe. That fee structure funds Stripe's engineering, compliance, fraud systems, and global acquiring relationships.

When you build your own marketplace payment layer, your revenue model works differently. You collect the full buyer payment into your platform account, keep your take rate, and pass the rest to sellers. Your income is the spread, not a processing fee.

Your monetization options as a marketplace builder:

  • Percentage take rate on each transaction (typical range: 5-30% depending on vertical)

  • Subscription fee for sellers to list and receive payouts (common in B2B and staffing marketplaces)

  • Payout speed premium -- sellers pay a small fee for instant payouts vs. next-week ACH

  • Managed services add-ons -- insurance, credit, compliance tools bundled for sellers

At 500 active sellers each doing $2,000/month in volume and a 15% take rate, the platform earns $150,000/month before processing costs. Building your own payment layer means you keep that revenue rather than routing it through Stripe Connect's standard pricing.

The processing cost does not go away. You still pay Stripe or Adyen for card processing. But the business logic -- the split calculation, the escrow hold, the payout timing -- is yours to configure.

Who actually builds custom marketplace payment infrastructure?

Custom payment infrastructure makes sense in specific situations. Here are four company types where we see the build decision made, and why each justifies it.

Niche vertical marketplaces where Stripe Connect's payout model does not fit. A pet care marketplace where sitters receive payouts after a 48-hour review window, with a 5% hold on earnings for dispute reserves. Stripe Connect does not configure a per-marketplace hold percentage. The platform needs custom escrow logic or every payout requires a manual override.

Multi-entity enterprise platforms where one Stripe account cannot cover the structure. A staffing firm that operates as both an employer of record and a placement agency needs separate ledger accounts for each legal entity, with intra-entity transfers and consolidated reporting. Stripe Connect handles one platform-to-seller relationship. It does not model complex org structures.

Financial services companies building white-label payment products for clients. An accounting software company that wants to offer embedded payments to its SMB customers cannot white-label Stripe Connect. Their logo cannot appear on Stripe's hosted onboarding screens. They need to build a payment product where the end customer only sees the software company's brand.

High-GMV platforms where processing fees fund the build. A home services marketplace processing $8M GMV annually pays approximately $240,000 per year to Stripe. A custom layer built on a negotiated Adyen agreement cuts that by 30-40%. The $80,000-$130,000 build cost pays back in 4-6 months.

What features does a marketplace payment platform need to launch?

Features should be phased. Launching with everything takes longer and costs more than the business needs at the start. Here is what each phase actually requires.

V1 -- Launch (what you need to process your first payment)

The minimum to open the doors is a payment intent flow, a double-entry ledger, and basic split logic. That means: capture the buyer's card via hosted payment fields, charge the card and hold funds in the platform account, record the transaction in the ledger, calculate the seller's portion, and trigger the payout on a scheduled basis.

PCI scope reduction is also V1. Never store card numbers. Use Stripe.js or Adyen hosted fields so the card goes directly to the processor. This alone saves $50,000-$200,000 per year in PCI audit costs by keeping you at SAQ A compliance rather than full PCI DSS Level 1.

A basic KYC flow for sellers is required before the first payout. Identity verification and bank account validation happen once during seller onboarding. This also covers 1099-K reporting requirements for U.S. sellers earning over $600 per year.

Cost to reach launch: $55,000-$80,000. Timeline: 12-14 weeks.

V2 -- Growth (add after the first 90 days of live transactions)

Escrow logic and dispute handling are the first post-launch additions for most marketplaces. The escrow hold state -- funds held until a buyer approves, then released -- is straightforward in concept and prone to edge cases in implementation. What happens when the buyer never approves? What is the automatic release window? What triggers a dispute? These rules should be built once the platform has real transaction data to inform them.

Subscription billing is a V2 addition if your revenue model includes recurring seller fees. Dunning (retrying failed charges, notifying customers, suspending accounts after final failure) takes 2-3 additional weeks to build correctly.

Cost to add V2 components: $20,000-$30,000. Timeline: 3-4 weeks post-launch.

V3 -- Scale (triggered by volume thresholds)

Above $5M GMV annually, two changes become worth the investment. First, switching from standard Stripe pricing to a negotiated agreement with Stripe or Adyen. The fee reduction funds the migration cost within 6 months. Second, building a more sophisticated fraud reserve system: holding a rolling percentage of seller earnings as a hedge against chargebacks, with automatic reserve adjustments based on each seller's chargeback history.

Multi-currency payouts with custom FX rules also belong at this stage. At low GMV, absorbing Stripe's FX rates is fine. At $10M+ GMV, a custom FX layer saves real money.

Cost for V3 infrastructure: $40,000-$60,000. This is contingent on GMV -- it only pays back above the threshold.

What are the biggest failure modes in marketplace payment builds?

RaftLabs has built payment infrastructure for marketplace platforms across hospitality, services, and creator economy verticals. The pattern is consistent: teams underestimate the ledger and overestimate the payment form.

The most common failure is building a partial ledger. A ledger that records charges but not refunds, or charges but not failed payouts, produces financial data that does not balance. In a system processing thousands of transactions, this creates discrepancies that are extremely difficult to untangle. We have seen teams spend 6-8 weeks and $40,000-$60,000 in consulting fees rebuilding a ledger they initially treated as a secondary concern. Building it right as a proper double-entry system with PostgreSQL transaction isolation adds 2-3 weeks upfront and prevents all of that.

The second failure mode is idempotency. Most teams discover this after their first failed charge in production, not during development.

"Payment systems that don't handle idempotency correctly will eventually double-charge a customer. It's not a question of if -- it's a question of how many customers before you catch it." -- Stripe engineering blog, Idempotency

The failure scenario: your application sends a charge request to Stripe. The request times out. You do not know if Stripe processed the charge before the timeout. If you retry and Stripe did process it, the customer is charged twice. If you do not retry and Stripe did not process it, the order sits in a limbo state.

The solution is an idempotency key: a unique identifier for each charge attempt, stored persistently before the API call. Stripe returns the same result for the same key regardless of how many times you call it. Retry safely. No duplicate charges. This system must survive server restarts -- an in-memory key store loses everything on restart. A persistent Redis store or a database table handles it correctly.

The cost of building this right: approximately $8,000-$12,000 in additional engineering time. The cost of a double-charge incident with 500 affected customers: chargebacks, customer support, trust damage, and regulatory exposure that far exceeds the prevention cost.

What does the payment infrastructure actually cost to build, component by component?

The headline range is $80,000-$130,000 over 12-16 weeks. Here is where that budget goes.

The payment intent flow and PCI scope setup (hosted fields integration, card tokenization, charge creation): 2-3 weeks, roughly $15,000-$20,000. The double-entry ledger with proper transaction isolation and split calculation logic: 3-4 weeks, roughly $25,000-$35,000. This is the most expensive single component. Payout scheduling with ACH transfer logic and balance calculation: 2-3 weeks, roughly $15,000-$20,000. KYC onboarding flow for sellers via Stripe Identity or Plaid: 1-2 weeks, roughly $8,000-$12,000. Refund handling with ledger reversals and partial refund support: 1-2 weeks, roughly $8,000-$12,000. Subscription billing (if required): 2-3 weeks, roughly $15,000-$20,000.

The team for a build of this size: one senior backend engineer with payments experience (the critical hire -- this person cannot be junior), one frontend engineer for seller onboarding UI and checkout flows, one QA engineer focused on edge cases and refund scenarios. A relational database is required for the ledger. Cross-platform mobile saves $30,000-$50,000 vs. native iOS and Android if mobile is part of the product. We build cross-platform by default unless there is a specific reason not to.

According to Adyen's 2024 Retail Report, platforms processing over $10M GMV save an average of 0.4 percentage points on processing fees by switching from standard Stripe pricing to negotiated agreements. At $10M GMV, that is $40,000 per year -- roughly half the cost of the custom layer.

Build vs. Stripe Connect: when does custom win?

Stripe Connect is the right answer for most marketplace builds, especially early-stage. The hosted seller onboarding, built-in KYC flow, and webhook infrastructure save 4-6 weeks of engineering time. The 0.25% + $0.25 per payout fee is manageable at low GMV. Standard Stripe Connect gets most platforms to their first 500 transactions without a custom layer.

Build your own when:

  • Your GMV exceeds $5M per year and processing fees exceed $150,000 annually. A custom layer on a negotiated Stripe or Adyen agreement cuts that by 30-50%. The build cost pays back in year one.

  • You need payout controls Stripe Connect cannot configure: rolling escrow with a dispute window, seller credit lines, multi-currency payouts with custom FX rules, or tiered take rates based on seller volume.

  • You are building a white-label payment product for other businesses. Stripe Connect cannot be white-labeled. Your clients will see Stripe's branding during onboarding.

  • Your org structure requires multiple legal entities in the ledger. Stripe models one platform account and many connected accounts. It does not model intra-entity transfers or consolidated multi-entity reporting.

Keep Stripe Connect when:

  • Your platform is pre-revenue or processing under $1M GMV. There is no financial case for the custom build at this stage.

  • You need standard SaaS subscription billing. Stripe Billing handles tax, dunning, proration, and checkout better than anything you would build in 3 months.

  • Your split logic is simple and static. If the seller always gets 80% and the platform keeps 20%, Stripe Connect handles that natively.

The payback calculation is straightforward. Take your annual GMV. Multiply by 0.01 (1% savings from a negotiated processing agreement). If that number exceeds $15,000-$20,000, the custom layer pays for itself in fees saved within 12 months.

How RaftLabs fits

RaftLabs has built payment infrastructure for marketplace platforms and fintech products across hospitality, services, and creator economy verticals. We have built double-entry ledgers that hold up under audit. We have built idempotency systems that survived production edge cases in platforms processing $2M-$10M GMV. We have integrated Stripe Connect, Plaid, and Adyen in contexts where the split logic and escrow rules were specific to the client's business model.

The first step is a scoping call to understand your payment model: how many parties are involved, what the split rules look like, whether you need escrow, and what your GMV is today and in 18 months. Those answers determine whether Stripe Connect direct is the right call or whether a custom layer is justified. If Stripe Connect direct is the answer for your current stage, we will say so.

Book the scoping call

Frequently asked questions

Building a marketplace payment layer costs $80,000-$130,000 and takes 12-16 weeks. This covers a payment intent flow, double-entry accounting ledger, split payment logic, payout scheduling, escrow, seller KYC via Plaid or Stripe Identity, refund handling, and subscription billing. The underlying card processing still runs through Stripe Connect or Adyen.
Stripe Connect handles the card processing layer. A custom payment platform sits on top: it manages the business logic of who gets paid, how much, and when. That means the double-entry ledger, marketplace split calculations, payout scheduling, escrow holds, refund flows, and KYC for sellers. Stripe Connect provides the rails. Your platform provides the rules.
Build custom when your marketplace GMV exceeds $5M per year (Stripe fees exceed $150,000 annually). Also build when you need payout controls Stripe Connect does not offer -- 7-day escrow, seller credit lines, multi-currency payouts with custom FX rules -- or when you are a financial services company building a white-label payment product for clients.
A double-entry ledger records every transaction as two entries: a debit from one account and a credit to another. When a customer pays $100 and the seller receives $80 with a $20 platform fee, the ledger records the $100 customer payment, the $80 seller credit, and the $20 platform revenue simultaneously. This creates an audit trail that always balances. It is the only reliable way to track who owes what in a marketplace with hundreds of sellers.
Never store card data on your servers. Use Stripe.js or Adyen hosted payment fields so the card number goes directly to the processor without touching your infrastructure. This reduces your PCI scope to SAQ A, the simplest compliance level. Full PCI DSS Level 1 certification for storing card data costs $50,000-$200,000 per year in audits. The hosted fields approach eliminates that cost entirely.

Ask an AI

Get an instant summary of this post from your preferred AI assistant.