Services
Digital Platform ModernizationSoon
Intelligent Automation & AISoon
Decentralized & Trust SystemsSoon
Dedicated Technology TeamsSoon
Capabilities
Enterprise Platform EngineeringStrangler-Fig MigrationMulti-Tenant SaaS TopologyEvent-Driven ArchitectureZero-Trust Infrastructure & Cloud IAMFederated API GatewaysE-commerce & Marketplace
Cloud DevOps & ScalabilitySoon
Intelligent Automation & AISoon
Blockchain & Trust SystemsSoon
Dedicated Engineering TeamsSoon
Industries
Healthcare & Life Sciences
Financial Services & FinTech
Supply Chain & Logistics
Education & eLearning
Retail & eCommerce
Oil & Gas
Case StudiesOur ThinkingAboutContactStart a POC
Architecture pattern · Commerce platforms

Ecommerce marketplace development that gets stock, orders and payouts right.

We design and build multi-vendor marketplaces: reliable inventory reservation, one order per seller, an auditable payout ledger and a checkout that survives failure. Start with a 14-day proof of concept.

Design targets · not measured results from past client work

Target · Overselling0

No order accepted for stock that is not available. The stock check and the reservation happen in one database transaction.

Target · Ledger Coverage100%

Every payout and refund is traceable to ledger entries, and totals reconcile to the payment provider’s reports.

Target · Idempotency100%

Every payment webhook and order event can be delivered twice without a double charge, double payout or duplicate order.

Target · Order Audit100%

Every order state change is recorded with who or what caused it, and when.

The short answer

What is a multi-vendor marketplace architecture?

A multi-vendor marketplace lets many independent sellers sell through one storefront. The platform sits in the middle: it owns the catalogue and checkout, splits each cart into orders per seller, takes payment once, divides the money between sellers and itself, and pays sellers out later. That makes three things harder than in a single-shop store: keeping stock correct, keeping orders and returns per seller, and keeping an auditable record of who is owed what.

Stock

Available stock is on hand minus reserved. A reservation must succeed or fail atomically, so two buyers cannot take the same last unit.

Orders

One parent order represents the customer’s payment. One child order per seller carries that seller’s items, shipment and returns.

Money

A ledger of append-only entries records payments, commission, refunds and payouts. Balances are computed from entries, never edited.

Robral designs and builds custom marketplaces and multi-vendor commerce platforms: the order and checkout engine, inventory reservation, the seller ledger and payout runs, and the integrations around them, starting with a 14-day proof of concept.
Core architectural pillars

Three pillars. One dependable marketplace.

Orders, money and stock are where marketplaces fail. Each pillar addresses one of them.

01
Orders

Parent & Child Order Lifecycle

A marketplace cart becomes one parent order for the customer and one child order per seller. Each child order has its own fulfilment, shipment and return path, driven by a clear state machine and events that are safe to replay.

  • One parent order, one child order per seller
  • Explicit states for each child order
  • Events published through a transactional outbox
  • Returns handled per child order, not per cart
02
Money

Ledger-First Payouts

Money movement is recorded as append-only ledger entries, never as an editable balance field. A seller’s balance is the sum of its entries, so every number can be explained, and returns and disputes are new entries rather than edits.

  • Append-only, double-entry style ledger
  • Commission and fees as separate entries
  • Payout holds for return and dispute windows
  • Reconciliation against provider reports
03
Inventory

Reliable Stock Reservation

Available stock is on hand minus reserved, and a reservation succeeds only if enough is available, checked and written in one atomic step. Caches speed up browsing, but the database decides who gets the last unit.

  • Atomic reservation with an expiry time
  • Release on payment failure or abandonment
  • Per-warehouse stock where sellers ship from several places
  • Cached stock for browse pages only
Build or buy

Custom, marketplace product, or hybrid?

Not every marketplace needs custom engineering. This table shows where each route usually fits, and where it starts to hurt.

SituationTypical fitWhy it fitsWatch out for
Standard catalogue, few sellers, need to test demand quicklyA marketplace product or hosted platformFastest route to a working marketplace, with common features already built.Customizing fees, payout rules or workflows can be limited. Check this before you commit.
Distinctive workflows: unusual fees, B2B rules, complex fulfilmentA custom buildOrders, payouts and pricing follow your business rules rather than a product’s model.More to build and operate. Start with the hardest parts and a proof of concept.
Mostly standard, but one area is unusual (payouts, stock or pricing)Hybrid: a product for the storefront plus custom services for that areaYou keep what is commodity and build only where you differ.Integration seams need clear contracts and ownership, or they become the failure point.
Heavy integration with ERP, warehouse or legacy systemsCustom or hybrid, with an integration layerAdapters and events isolate the marketplace from slow or fragile backends.Test against the real systems early. Our API gateway page covers the adapter pattern.

This is guidance, not a verdict. We assess your catalogue, sellers, volumes and integrations before recommending a route.

Merchant of record

Who sells, and who pays when it goes wrong?

On Stripe Connect, the charge type decides who the merchant of record is and which balance is debited for disputes and fees. Other providers have comparable choices, so settle this before you build the payment flow.

Charge typeTypical marketplace fitWho is debited for disputesWatch out for
Direct chargesSellers sell in their own nameStripe attempts to debit the connected account’s balance; if it cannot, responsibility depends on who is responsible for negative balances.Dispute fees depend on the connected account’s fee configuration.
Destination chargesEach payment involves a single sellerStripe debits the platform account for the dispute amount and fees. Refunds also come from the platform balance.Recover funds from the seller by reversing the transfer, ideally from a webhook on the dispute event. A refund can reverse the transfer too, and the platform’s application fee is not returned unless you ask for it.
Separate charges and transfersOne cart paying several sellersStripe debits the platform account. The platform is the merchant of record and its balance bears fees, refunds and chargebacks.Refunding a charge does not change its transfers, so the platform must reconcile what the seller owes by reversing a transfer or reducing a later one. A transfer fails if it exceeds the platform’s available balance. Use source_transaction, and check how automatic payouts interact with transfers.

Based on Stripe’s Connect documentation at the time of review. Check the current documentation and take legal and tax advice for your markets.

Worked example

One cart, three sellers, one return.

Illustrative figures with a flat 10% commission and payment processing fees ignored. The point is that the ledger always balances, and a return is a new entry rather than an edit.

RecordAmountWhat it means
Parent order P-1001150.00One payment from the customer.
Child order C-1 (Seller A)60.00Commission 6.00, seller share 54.00.
Child order C-2 (Seller B)50.00Commission 5.00, seller share 45.00.
Child order C-3 (Seller C)40.00Commission 4.00, seller share 36.00.
Ledger check135.00 + 15.00Seller shares plus commission equal the 150.00 the customer paid.
Customer returns C-2−50.00Refund the customer, then add entries reversing the 45.00 seller share and the 5.00 commission. Nothing is edited or deleted. If Seller B was already paid, the reversal makes their balance negative and the next payout run recovers it. On Stripe’s separate charges and transfers, refunding the charge does not touch the transfers, so this reconciliation is your platform’s job.
Checkout flow

Checkout as a saga with compensations.

Stock, payment and orders live in different systems, so no single database transaction covers them. A saga breaks checkout into local steps, each with a defined way to undo it.

StateWhat happensIf it fails or expiresNext
ReservingStock is reserved atomically for each item, with an expiry time.Nothing reserved; the customer is told what is unavailable.Payment pending
Payment pendingThe customer pays. The provider’s webhook confirms the result.The reservation is released on failure or expiry.Paid
PaidThe parent order and child orders are created, and the ledger records the payment, in one transaction with an outbox event.If order creation cannot complete, the payment is refunded and the reservation released.Confirmed
ConfirmedEach seller is notified through an outbox event and fulfils their child order.A seller who cannot fulfil triggers a partial refund and a ledger reversal.Fulfilled or refunded

In saga terms, the successful payment is the pivot: after it, the flow moves forward with retryable, idempotent steps rather than rolling back.

Key engineering capabilities

The marketplace toolchain.

Core building blocks we include in a marketplace engagement.

Catalogue & Search

Seller-managed listings with variants and attributes, indexed for fast faceted search. The search index is updated from catalogue events, so listings and search stay in step.

Listings & VariantsFaceted SearchEvent-Driven IndexingModeration Queue

Pricing & Promotions

Platform and seller-level promotions, volume tiers and B2B price lists, evaluated by one rules layer so the cart and checkout always agree on the price.

Rules EngineVolume PricingB2B Price ListsCoupon Validation

Payments & Payouts

Hosted payment fields keep card numbers off your servers, and the payment provider handles strong customer authentication where required. Splits and payouts run from the ledger, not from the checkout request.

Stripe ConnectHosted Payment FieldsPayout RunsWebhook Handling

Seller Onboarding, Tax & Compliance

Seller identity checks through the payment provider’s onboarding, tax calculation through a tax service, and the records you need for reporting. Your obligations depend on where you sell, so we map them with you.

Provider OnboardingTax ServiceReportingAudit Trail
Engineering notes

What correct stock reservation looks like.

The core of overselling prevention is one conditional update. It checks and reserves in the same statement, so the database serializes competing buyers.

Atomic stock reservation (illustrative, PostgreSQL)
-- inventory(sku_id, warehouse_id, on_hand, reserved)
-- available = on_hand - reserved

BEGIN;

UPDATE inventory
SET    reserved = reserved + :qty
WHERE  sku_id = :sku
  AND  warehouse_id = :wh
  AND  on_hand - reserved >= :qty;
-- 1 row updated  -> stock reserved
-- 0 rows updated -> not enough stock, nothing changed

INSERT INTO reservations (id, order_ref, sku_id, warehouse_id, qty, expires_at)
VALUES (:id, :order_ref, :sku, :wh, :qty, now() + interval '15 minutes');

COMMIT;

-- A scheduled job releases expired reservations:
-- reserved = reserved - qty, then marks the reservation released.

Because the check and the update are one statement, two buyers cannot both take the last unit. The reservation row records who holds the stock and when it expires. A cache can serve browse pages, but it should never be the thing that decides availability.

Six scenarios every marketplace must survive
  • Two customers buy the last unit at the same moment: only one reservation succeeds, and the other sees the item as unavailable.
  • Payment succeeds but order creation fails: the order and an outbox event are written in one transaction, and if that cannot complete, the payment is refunded and stock released.
  • A customer returns one item from a multi-seller cart: only that child order is refunded, and the ledger gets reversal entries for that seller.
  • The payment webhook arrives twice, or out of order: event IDs are stored, each event is processed once, and the current order state is checked first.
  • A dispute opens before the seller’s payout: the payout is held, and the disputed amount is recovered through the ledger and the provider’s reversal tools.
  • A seller is suspended mid-order: open child orders are reassigned or refunded, pending payouts are frozen, and the ledger shows exactly what is owed.
Common mistakes

Where marketplace projects go wrong.

Six failure patterns we design against from the first week.

A balance field you can edit

When a seller’s balance is one number that code updates, nobody can explain a mismatch later. Record entries and compute the balance from them.

Append-onlyReconciliationAudit trail

Cache as the only stock guard

A cache or a lock in front of the database can still let two requests through if it fails or expires. Correctness belongs in an atomic database check, with the cache used for reads.

Atomic reserveDatabase truthCache for reads

One order for a multi-seller cart

Sellers ship separately and return separately. A single order forces awkward partial states. Use a parent order with a child order per seller.

Parent orderChild ordersPer-seller returns

Trusting webhooks to arrive once

Payment providers can retry, and events can arrive out of order. Store each event ID, process it once and check the current state before acting.

Idempotency keysEvent IDsOrdering checks

Paying out the moment a sale clears

A return or dispute can arrive days later. Hold payouts for an agreed window, and decide in advance who covers a seller whose balance goes negative.

Payout holdsDispute windowNegative balances

Deciding merchant of record late

Who sells to the customer decides tax duties, refunds, chargebacks and which payment flow fits. Settle it before you build the payment flow.

Merchant of recordCharge typeLiability
What you receive

A working marketplace sandbox. In 14 days.

01

Live Marketplace Sandbox

A storefront, a few test sellers and a working checkout deployed in a dedicated environment, using the payment provider’s test mode.

02

Operations Console

A dashboard for stock reservations, parent and child orders, ledger entries and payout runs, so you can see how each number was reached.

03

Schema, Events & Terraform Repo

Database schema, event contracts, infrastructure as code and load-test scripts, ready for your engineers to run and extend.

Not slides. Not a proposal. A live marketplace slice with real stock, order and ledger logic.
Choosing a partner

How to choose a marketplace development partner.

Six questions to ask any firm, including us, and the evidence to request.

01

Money model

Ask how seller balances are recorded and how a refund after payout is handled. Evidence to request: a sample ledger schema and a worked reversal.

Red flag: one editable balance field
02

Inventory correctness

Ask how two buyers for the last unit are handled. Evidence to request: the reservation query or design, and the concurrency test that proves it.

Red flag: "we use a cache lock"
03

Multi-seller orders

Ask how a cart with several sellers is modelled, shipped and returned. Look for parent and child orders and per-seller states.

Red flag: one order per cart
04

Merchant of record

Ask who the merchant of record will be and what that means for tax, refunds and chargebacks. Look for a clear recommendation tied to your markets.

Red flag: "the provider handles it"
05

Failure handling

Ask what happens when payment succeeds and order creation fails. Look for outbox, idempotent consumers and a compensating flow.

Red flag: "that rarely happens"
06

Ownership and handover

Ask what you own at the end. Look for source code, infrastructure as code, runbooks and training handed over, with acceptance criteria agreed up front.

Red flag: black-box delivery
Questions and answers

Marketplace architecture: common questions.

What is a multi-vendor marketplace?

It is a platform where many independent sellers list and sell products through one storefront. The platform takes the customer’s payment, splits the cart into orders per seller, divides the money between sellers and itself, and pays sellers out, usually after a hold for returns and disputes.

How do you prevent overselling?

Check and reserve stock in one atomic database step: increase the reserved quantity only if on hand minus reserved covers the request. Give each reservation an expiry so abandoned checkouts release stock. Caches can speed up browsing, but the database should decide who gets the last unit.

What are parent and child orders?

A parent order represents the customer’s purchase and payment. Each seller in the cart gets a child order holding their items, shipment, status and returns. This lets one seller ship or refund without disturbing the others.

Why use a ledger instead of a balance field?

A balance field only shows the current number. A ledger of append-only entries shows how it was reached, so a refund, commission or dispute is a new entry rather than an edit. The balance is the sum of the entries, and it can be reconciled against the payment provider’s reports.

Who pays for chargebacks on a marketplace?

It depends on the payment flow. In Stripe Connect, for destination charges and for separate charges and transfers, Stripe debits dispute amounts and fees from the platform account, and the platform can try to recover funds from the seller by reversing the transfer. Refunds also come from the platform balance for those charge types, and a refund stays pending if the platform balance is short. With direct charges, Stripe debits the disputed amount from the connected account’s balance. Take legal and tax advice for your markets.

What if payment succeeds but the order cannot be created?

Design checkout as a saga. Write the order and an outbox event in the same transaction as the payment record, and make later steps idempotent. If order creation cannot be completed, run a compensating step: refund the payment and release the reserved stock.

How much does a custom marketplace cost and how long does it take?

It depends on the number of seller types, payment flows, integrations and markets. We do not publish a flat price, because any figure would mislead. A proof of concept on the hardest part of your design is the quickest way to get a realistic estimate, and we deliver that as a 14-day sandbox.

Build your marketplace

Ready to build a marketplace that holds up under real orders?

Work with our principal architects to blueprint the order, inventory and payout engine for your marketplace.