Skip to content

Build a Multi-Warehouse Retail Platform

Davor Minchorov•Advanced•16 to 24 weekends•October 29, 2026

A home-goods retailer sells the same stock from three warehouses and keeps overselling, double-refunding and showing stale search results. You will build the replacement, from catalog and stock to checkout, payments, split shipments and returns, and prove it with a simulated trading day in which everything that can go wrong does.

The brief

The client

I run e-commerce operations at a home-goods retailer. We take about 4,000 orders a day, 600 an hour at peak, for 18,000 products held in three warehouses (WH1, WH2 and WH3), all sold through one shop application. During a promotion on a stand mixer with 40 units in stock, the shop accepted 112 orders in 20 minutes, because it checked the stock count when the shopper opened the page and never again. We cancelled 72 orders by email and refunded each card by hand, and customers kept writing for two weeks asking where their money was, because a refund shows up on the card 5 to 10 business days later. Since then, an order that ships in two parcels from two warehouses has been charged twice or not at all, depending on who touched it last. I need a shop where the last unit sells once, where every hold on stock or money has an end time, and where I can tell a customer exactly what happened to their order and their money. It also has to keep selling when payment, search or a warehouse tool is down or being updated.

The problem

The shop keeps one stock number per product and checks it when a page loads. Two shoppers can pay for the last unit, and the second order is found out only when a warehouse operator cannot pick it. Stock sits in three warehouses, but the shop sees one total, so an order for three items is assigned by hand and a split into two parcels is a spreadsheet.

Payment is taken at order time, so every cancellation and every short pick becomes a manual refund, and finance reconciles captures against refunds by hand at month end. The client's payment contract charges a fee on each refund that the provider does not return, so every avoidable cancellation after capture costs money. The search results are rebuilt overnight, so a sell-out or a price change reaches search up to a day late; after the mixer sold out, search kept showing it in stock for an hour. Returns arrive at the warehouse with no link to the order line they came from, so refunds are typed in, and some have exceeded what was paid. When the payment provider is slow, the whole shop is slow, and a deploy takes the shop down for everyone.

The client's name and figures are invented for this brief; the rules and the failures are ones that real businesses of this kind work with.

The spec

Requirements

  • Let a merchandiser publish, change and withdraw products with a history of who changed what and when, and let a shopper search them by name, category and attribute, with each result shown as in stock or out of stock within 10 seconds of a change at the 95th percentile.
  • Reserve stock for a shopper at checkout in specific warehouses for 15 minutes, and never sell the same unit twice, including when 200 buyers go for 10 units at once.
  • Let a warehouse operator receive stock, correct a count after a shelf check and transfer stock between warehouses, with transferred units unsellable until they are received.
  • Take payment by card through a payment provider, including a payment that needs extra authentication and one the shopper abandons, and never hold stock or money past its deadline.
  • Make one order and one charge when the front end places the same order twice, including twice at the same moment.
  • Split an order across the warehouses that hold its items, ship each part separately, and show the order as partly shipped.
  • Cope with a line a picker cannot find and with a warehouse that goes quiet, by moving the line to another warehouse or cancelling it and refunding it.
  • Let a shopper or a support agent cancel an order, or one line of it, before it is picked, with the stock released and the money returned in full.
  • Let a shopper return items until 14 days after the last parcel of the order is delivered, inspect them at the warehouse, restock or write them off, and refund only the returned lines with their share of shipping and discount.
  • Never refund more than was captured, record every refund with its reason, and give finance a report that shows each order's money adding up.
  • Erase a shopper's personal data on request while the order, payment and refund records stay.
  • Keep selling when one part of the shop is stopped or being updated: with search stopped, shoppers can still order; with payment stopped, shoppers can still search and warehouses can still ship paid orders; with the warehouse tools stopped, shoppers can still order and pay. Handle 600 orders in the peak hour.

Deliverables

  • Your repository starts the whole shop with one command, plus a way to run the client's day faster than real time. The simulated day plays shoppers, a merchandiser, warehouse operators and the clock, and can cause every outside failure the brief names: the payment provider answering late, twice, out of order or not at all, the carrier reporting late or twice, a warehouse going quiet, search stopped, and any part of the shop killed or updated while orders flow.
  • A README that takes a reviewer from a fresh clone to an order shipped in two parcels, delivered, partly returned and refunded in 15 minutes, and lists the command that runs each test.
  • A document of the stock and money rules, written before the code: every hold and its deadline, and how shipping and discount are shared across lines.
  • An integration guide for the shop's front end and the warehouse tools: every action they can take, what they send, what they get back, and the header that makes placing an order safe to repeat.
  • A test suite, plus the results of the trading day from the final Phase committed to your repository.
  • An operations note stating what an operator must be able to do: trace one order from click to refund, set aside a step that keeps failing and retry it, restore search and the order view, and update one part of the shop while orders keep flowing.

Out of scope

  • Handling card numbers or implementing 3-D Secure. The payment provider holds card data and the shop never sees a card number; an order only needs to wait while the shopper authenticates.
  • VAT and credit notes on refunds. Tax rules are national, and every price here is the amount the shopper pays.
  • Real carrier integration. A stand-in carrier reports shipped and delivered, because a carrier network is a project of its own.
  • Promotions, pricing rules and customer accounts. They are separate domains; an order carries the discount and shipping amounts it is given.
  • Emails and messages to shoppers. The order view tells a shopper what happened.
  • Warehouse management system integration, advance shipping notices and purchasing. Operators use the interface this brief describes.
  • Disputes and chargebacks. A bank pulling money back from a refunded payment is a lifecycle of its own; refunds here end when the provider settles them.
  • Deleting records after their retention period. Dutch law makes the client keep its business records for 7 years (Belastingdienst), so erasure here removes personal fields and keeps order, payment and refund records, identified by ID, for that period. Deleting them once the 7 years have passed is outside this brief.
  • Backorders and delivery-time promises. A line nobody can pick is cancelled and refunded, because a supplier workflow is outside the brief.
  • Kubernetes or cloud deployment. Everything runs on one machine, because the failures that matter here come from the outside world.
  • Payment methods other than cards, such as iDEAL. The retailer takes cards only, because the card is authorised at checkout and charged at shipment, and iDEAL takes the money at once.

Architectural constraints

  • A unit of stock is never sold twice, and only the stock count decides whether an order can go ahead; what search shows is a hint.
  • Amounts are exact to the cent, in EUR. Shipping and discount are shared across an order's lines by one stated rounding rule, and the shares always add up to the original amounts.
  • Every hold has an end time: a stock reservation lasts 15 minutes and a card authorisation 7 days. The 14-day return window ends 14 calendar days (Europe/Amsterdam) after the last parcel of the order is delivered, for every line. It holds nothing; it is checked when a return is requested.
  • A card is charged once per order. A refund is never above what was captured, goes only to the original payment, and has a recorded reason.
  • No card number is ever stored or shown to the shop.
  • An order's price is fixed when checkout starts. A later catalog change never reprices it.
  • A repeated request or message never charges, refunds, restocks or ships twice.
  • A part of the shop that is stopped may delay work that depends on it. It never makes the rest of the shop refuse shoppers.
  • Personal fields (name, email, delivery address) are erased or pseudonymised on request, wherever they appear, while orders, payments, refunds, returns and stock records stay, identified by ID. The delivery address is erased once the order is closed: every parcel delivered or cancelled, the order's return window over, no return open, no refund pending or failed.

Prerequisites

You should have finished an intermediate project or have equivalent experience, in any language and stack. You do not need to know how card payments work or how a home-goods retailer runs its warehouses; the first Phase explains the business and the words the brief uses, and authorisation, capture and refund are explained where they first appear. Knowing what goes wrong when two people change the same stock count at once will help in the stock Phases.

Create a free accountSign in

Free to start. An account is what keeps track of the checkpoints you finish.

Phase 1

Work out the rules and start the shop

Produces the written stock and money rules, two worked examples of the client's rules, and a shop that starts with one command next to a simulated day with a clock. Builds no shop behaviour yet.

Research

Research

Implementation

Architectural walkthrough

How a home-goods retailer sells from three warehouses

The retailer sells 18,000 products through one online shop and keeps them in three warehouses, WH1, WH2 and WH3. It takes about 4,000 orders a day, and 600 an hour at peak. A merchandiser publishes, changes and withdraws products. A shopper searches the catalogue and sees each product as in stock or out of stock.

At checkout the shop sets aside the stock for the shopper and authorises the card, and it charges the card when the goods ship. An order can hold items from different warehouses. The shop then ships it as separate parcels, one from each warehouse, and the order shows as partly shipped until the last one goes. A picker in a warehouse takes the items off the shelves for each order.

Warehouse operators receive stock, correct counts and move stock between warehouses. A shopper can return items for 14 days after the last parcel arrives. The warehouse inspects what comes back and a refund goes to the card. A card refund reaches the shopper 5 to 10 business days later, and the client's payment contract keeps the fee from the original charge.

The words this brief uses:

  • Reservation: stock set aside for one shopper at checkout, for 15 minutes.

  • Authorisation: the card's bank agreeing to pay and setting the amount aside, up to 7 days, without moving it yet.

  • Capture: taking the authorised money, which the shop does when the goods ship.

  • Order line: one product, with a quantity, on an order.

  • Pick and short pick: taking an order line's items off the shelf, and the case where the picker cannot find them.

  • Transfer: moving stock from one warehouse to another. The units cannot be sold until the receiving warehouse has them.

  • Shelf check: counting what a shelf really holds, which can lead to a correction of the stock number.

  • Return window: the 14 calendar days after the last parcel is delivered in which a shopper may return items.

  • Write-off: removing returned items that cannot go back on sale from the stock.

  • Refund: money returned to the card. It can never be more than was captured.

Why the rules come first

A team that starts coding before the client's rules are written down finds the gaps one at a time, in production. Shipping and discount are shared by guesswork, so one order's lines add up to the order total and the next order's lines are a cent over. A hold on stock has no stated end, so a unit stays promised to a shopper who left an hour ago. Nobody has decided what an erasure request may remove, so the first one is answered by whoever is on duty.

Each gap comes back later as a cent that does not add up or a unit nobody owns. A cent of difference is invisible on one order. Across 4,000 orders a day, finance finds it at month end and reconciles by hand, which is the work this shop is meant to end.

The client's rules also reach across the whole product. A refund for a returned bowl depends on how shipping was shared when the order was placed, and a short pick depends on the same shares. When the rule exists in two heads, the two answers differ by a cent, and each is right by the head that produced it.

A product that cannot be started the same way twice has a related cost. If a reviewer needs an afternoon to reach a first response, nobody runs the simulated day, and the failures the later Phases pose are never caused on purpose.

Phase 2

Publish products and count stock

Produces the merchandiser's product publishing with history and the warehouse operators' stock counts, corrections and transfers. Leaves reservations, search and ordering for later.

Implementation

Implementation

Implementation

Implementation

Testing

Architectural walkthrough

Stock counts are the shop's first promise to a shopper, and several people change them at once. Two operators receive stock for the same SKU in the same second, and one receipt disappears from the count. Nobody sees it until a picker finds fewer units on the shelf than the screen shows. A count that cannot be explained by what happened cannot be corrected either, because nobody knows which change was wrong.

A product edit has the same cost on a smaller scale. A merchandiser changes a price, a colleague changes the description a moment later, and one of the two changes is gone with no sign of who made it. Support then argues with a shopper about a price nobody can reproduce.

A transfer between warehouses goes wrong in the most expensive way. Units that have left WH1 and not reached WH2 are on a truck. If the shop counts them in both warehouses, two shoppers are promised the same unit. If it counts them in neither once they have arrived, sellable stock disappears for no reason. Receiving the same transfer twice puts units on the screen that were never on a shelf.

A process that stops between a change and its record is the quietest failure. The count moved and the history did not, or the other way round, and the two disagree from then on. Every later Phase trusts these counts, so an error here is paid for in oversold orders.

Phase 3

Reserve stock with a deadline

Produces holds on stock for shoppers: allocation across the three warehouses, a 15-minute deadline, safety stock, moves when a count drops or a warehouse goes quiet, and the 200-buyer proof. Leaves committing a hold to the Phase that confirms orders.

Research

Implementation

Implementation

Implementation

Implementation

Testing

Architectural walkthrough

This Phase is the stand mixer incident. The old shop checked the stock count when a page opened and never again, so it accepted 112 orders in 20 minutes for 40 units. Two shoppers were told yes for the last unit, and the second order was found out only when a picker could not pick it. The client cancelled 72 orders by email and refunded 72 cards by hand.

Stock held for a shopper is unsellable to everyone else. A shopper closes the tab, a payment never reports back, or a warehouse stops answering, and the hold stays on the shelf for a sale that never happens. About 30% of checkouts are abandoned at payment, so even a 15-minute hold keeps units off sale all day.

Counts change under holds. An operator finds 3 units where the screen said 8, while 6 are promised to shoppers. If the shop does nothing, three shoppers have paid for units that are not there. A warehouse that goes quiet is the same problem at a larger scale: its holds may be good or may not, and orders keep arriving.

The shop also has to decide where a basket comes from. A basket that one warehouse could fill but ships in two parcels costs the client a second delivery for no reason, and the shopper cannot choose. How the shop decides is the client's rule, and the Phase starts by working it out by hand.

Each of these costs the client a cancellation, a refund fee the provider does not return and a shopper who may not come back.

Phase 4

Search the catalog

Produces search by name, category and attribute with an in-stock label, and proof that search catches up after crashes, outages and a bulk price change. Leaves ordering to later Phases and never lets search decide an order.

Implementation

Implementation

Testing

Testing

Testing

Architectural walkthrough

Search is the page shoppers see first and the page that is wrong first. After the stand mixer sold out, search kept showing it in stock for an hour, and shoppers chased stock that was gone. After a price change, a result that shows yesterday's price sends the shopper to a checkout where the price is different. A change saved just before a crash that never reaches search is the quietest version: nothing fails, and the product stays wrong until someone notices.

The opposite failure costs more. If search is slow, stopped or being updated and shoppers cannot order, a fault on a page for browsing has stopped the shop's sales. Search must never decide whether an order can go ahead. What it shows is a hint, and the stock count is the answer.

A bulk change makes both worse. A merchandiser changing the price of all 18,000 products at once leaves search wrong for every product until it catches up. A rebuild that runs during the change can lose what changed while it ran.

Phase 5

Take payment

Produces a stand-in payment provider that misbehaves on demand, the authorisation of a card payment including extra authentication and abandonment, and a payment that ends in the right place however the provider's messages arrive. Leaves the charge and refunds for the Phases that need them.

Implementation

Implementation

Implementation

Testing

Architectural walkthrough

Three words matter in this Phase. An authorisation is the card issuer's promise to hold an amount for the shop. A charge, also called a capture, is the shop taking that money. A refund gives money back to the card. This Phase deals with authorisation only.

The payment provider is outside the shop, and it behaves like the outside world. It answers twice, answers late, answers out of order or does not answer at all. A shopper whose payment timed out presses the button again, and a retry that authorises a second time holds the same money twice on their card. A payment shown as failed that the provider authorised a moment later leaves a shopper holding money for an order the shop cancelled.

Some payments stop and wait. A bank may ask the shopper to confirm on their phone, and for minutes, or for good, nothing happens. The order cannot be confirmed or cancelled yet, and the stock held for it has a deadline.

The cost lands on the client. A shopper whose card holds money for a cancelled order writes to support, and the money comes back when the authorisation lapses or the provider releases it. A provider notice that is accepted from anyone who sends it lets a stranger mark orders as paid. The shop must also never see a card number, because anything that stores or logs one puts card data in places the client never meant to protect.

A real provider does not fail on demand, so this Phase starts by building a stand-in that does, and the checks that follow find out what the shop does when it misbehaves.

Phase 6

Place an order

Produces checkout at a fixed price, an order confirmed only when stock is held and the card is authorised, the release of everything when payment fails or the shopper leaves, and proof that no failure leaves stock or money held. Leaves shipping for later.

Implementation

Implementation

Implementation

Testing

Testing

Architectural walkthrough

An order is several steps that all have to happen or none: hold the stock, authorise the card, confirm. A process that dies between two of them leaves a card authorised for an order whose hold ran out, or stock held for a payment that failed. Neither is visible to the shopper until the stock is missing or the money is. The client pays for it in shoppers whose money is held for nothing and in units locked for nobody.

The front end adds its own failure. It sends the same order twice because a shopper double-clicked, or because a request timed out and it tried again. If the shop makes two orders, the shopper pays twice and the second order is a refund waiting to happen, on which the provider keeps its fee. Two requests that arrive in the same moment are the hardest version.

The payment provider can stop answering while shoppers are checking out. About 30% of checkouts are abandoned at payment anyway, so a shopper who left and a provider that is silent look alike from the shop's side. Both must end with the stock back on sale after the 15-minute deadline.

A price that changes while a shopper is checking out is a smaller failure with the same cost. A shopper who saw 49.99 EUR and is charged 54.99 EUR writes to support, and one who is charged less costs the client the difference.

Phase 7

Fulfil from three warehouses

Produces one pick list per warehouse, picking, packing, shipping and delivery with a stand-in carrier, the short-pick answer, one charge at the first shipment and the handling of a card authorisation that cannot be renewed. Leaves cancels and returns for later.

Implementation

Implementation

Implementation

Implementation

Implementation

Testing

Architectural walkthrough

A split order ships as two parcels, and the card is charged once for the whole order, when the first parcel ships. The provider allows one charge per authorisation. If the shop tries to charge at each parcel, the second charge is refused and the shop may read that refusal as a failed payment. If it charges at neither, parcels leave with no money behind them. The charge waits for the first shipment because the provider keeps its processing fee on every refund, and a charge at order time would turn every short pick and every cancel into a refund with a fee.

The dangerous moments sit between steps. A process that dies after a parcel is recorded as shipped and before the charge is asked for leaves a parcel in a van with nothing paid, and nobody finds out until finance reconciles. A carrier that reports the same delivery twice, or reports it before shipping is recorded, can mark an order delivered while a parcel is still in the warehouse, and the 14-day return window then ends too early.

About one line in a hundred cannot be found on the shelf. If the shop does nothing, the shopper waits for an item that is not coming. If the shop cancels at once, the client loses a sale another warehouse could have made. If the cancel comes after the charge, the refund costs a provider fee on money the client held for a few hours.

A card authorisation lapses 7 days after it was made. A slow warehouse can still be picking on day 8, and a parcel shipped against a lapsed authorisation is a parcel given away. Renewing without limit is no safer: it holds the shopper's credit for an order nobody ships. Short picks, partial shipments and lapses each look correct alone. The wrong figures appear where they overlap, such as a refund sized from the wrong charged amount or a cancel that frees stock a parcel already took, and the last Checkpoint of the Phase is there to find those.

Phase 8

Cancel, refund and erase

Produces the order view, cancels before picking, refunds capped by what was charged, erasure of personal data and the finance proof that every order's money adds up. Leaves returns for later.

Implementation

Implementation

Implementation

Implementation

Testing

Architectural walkthrough

Money moves backwards in this Phase, and every step has a way to move too much. A refund above what was charged is cash the client rarely recovers. A cancel that arrives while a parcel is being packed can let the warehouse ship goods the shopper was told were cancelled, and the client then refunds an order it also delivered. A cancel clicked twice by an impatient shopper pays the shopper twice.

The payment provider is slow and sometimes refuses. A shopper told on screen that a refund is done, while the provider rejects it, phones a week later asking where the money is. The provider keeps its fee on every refund and settles 5 to 10 business days after the request, so an avoidable refund costs money and a wrong refund costs more.

A shopper can ask for personal data to be erased. The client must still keep its orders, payments, refunds, returns and stock records. Deleting the order destroys what finance needs. Leaving a name in a search entry, a finance export or a log keeps data the shopper asked to remove, and the client finds out when the shopper complains.

Without a proof, finance reconciles by hand. A cent of rounding on a shipping share or a refund counted twice after a retry is invisible on one order and shows up across 4,000 orders a day as a difference nobody can place.

Phase 9

Take returns back

Produces return requests inside the 14-day window, processing at the warehouse, refunds with a share of shipping and discount, and proof that each return restocks and refunds once. Leaves operations for later.

Implementation

Implementation

Implementation

Testing

Architectural walkthrough

About 8% of orders come back, which is 320 returns in the simulated day. At that volume a small mistake repeats hundreds of times. A return refunded twice pays the shopper for goods the client also got back. A bowl put back on the shelf twice leaves the count one higher than the shelf, so the next order for it is accepted and the picker cannot find the second bowl.

The window ends 14 calendar days after the last parcel of the order is delivered, on the same day for every line. A window counted from the order date punishes the shopper whose second parcel arrived late, and one counted from each line's own parcel closes on the first parcel's lines before the shopper has seen the whole order. A return accepted for a line that was never delivered, or for more units than were delivered, refunds goods the shopper never had.

Refunds do not divide evenly. A line of three units with a share of shipping and a share of discount has a total that three equal rounded amounts do not add up to. A refund a cent too high or too low per unit shows up across 320 returns as a difference finance must explain. The tablet at the returns desk resends on a bad connection, and the provider repeats its notices, so every step must give the same result when it is told twice.

Phase 10

Operate the shop

Produces the operator's abilities: tracing one order, setting aside a step that keeps failing, restoring a stale order view and updating one part of the shop while orders keep flowing. Leaves the load target and the full trading day for the last Phase.

Implementation

Implementation

Implementation

Testing

Architectural walkthrough

The shop works when everything goes right, and an operator is the person who deals with the rest. A support agent asks why one order has no refund. If the answer is spread across everything that touched the order, the agent guesses, and a wrong guess costs a refund or an apology.

One order step that always fails can block every order waiting behind it. Dropping it loses a charge or a refund nobody knows is owed, and a dropped step looks like health because nothing shows red. The client finds out when a shopper asks where the refund is.

The order view shows what happened to an order. A view that is wrong tells a shopper that an order shipped yesterday is waiting for payment, which brings a support call and sometimes a second order. When the only fix is editing orders by hand, the client cannot say how many are wrong.

A release in the middle of the day is a release in the middle of orders. An update that drops the requests arriving while a part restarts loses orders the shopper believes were placed, or places them twice when the shopper presses buy again. If the client cannot update safely during the day, every fix waits for the night and the shop goes down for everyone to fix one part.

Phase 11

Survive a trading day

Produces the failure plan, a peak-hour load proof and the final simulated trading day with every failure at once. Adds no shop behaviour.

Research

Testing

Testing

Architectural walkthrough

The shop passes each test and still fails on the busiest day, because the failures overlap. A payment outage that lasts longer than the 15-minute hold, while one part of the shop is being updated and a warehouse has gone quiet, leaves holds, authorisations and half-confirmed orders that no single test produced.

The cost lands on the client in the peak hour: 600 orders, about 10 a minute, each one a shopper deciding whether to wait. A slow part shows up there first. Sold-out stock still shows in stock, shoppers press buy twice, and the stand mixer incident of 40 units and 112 accepted orders happens again.

A plan written after the run explains the result. A plan written before it can be wrong, which is the point of writing it first. The overlap that hurts the client is the one nobody wrote down.

Architectural walkthrough

One unit, one buyer

The old shop checked the stock count when a page loaded and never again. Between that check and the payment, it accepted 112 orders for 40 stand mixers. The retailer cancelled 72 orders by email and refunded 72 cards by hand, and because a refund shows on a card 5 to 10 business days later, customers kept writing for two weeks asking where their money was. Each oversold unit costs a cancellation, a refund fee that the provider does not return, and a customer who may not come back. The last-unit test reproduces the incident at a larger scale: 200 buyers, 10 units, and exactly 10 of them get one.

Holds that never end

Stock held for one shopper is unsellable to everyone else. A shopper who closes the tab, a payment that never reports back and a payment provider that is offline all leave a hold that nobody releases. About 30% of checkouts are abandoned at payment, which is about 1,700 a day, so even a 15-minute hold keeps stock off the shelf for a sale that never happens. A hold with no end turns a popular item into one that nobody can buy and nobody owns.

The card has the same problem on a longer clock. The provider drops a card authorisation after 7 days. A parcel that ships on day 8 against an authorisation that lapsed on day 7 is a parcel nobody paid for.

One order, four hits

Take an order for a stand mixer, a lid and two bowls, with a shipping charge and a discount. Four things happen to it.

  • Split. The mixer and the bowls are in WH1 and the lid is in WH2, so two parcels leave on different days. The shopper must be charged once and shown a partly shipped order. A shop that charges per parcel bills the shipping twice, and one that charges when nobody is looking bills nothing.

  • Slow warehouse. WH2 is slow, and on day 6 the card authorisation is a day from lapsing. If nothing renews it, WH1's parcel ships on day 8 with no money behind it.

  • Short pick. The picker in WH2 cannot find the lid. The shopper has to hear about it and must not pay for it. The refund settles 5 to 10 business days later and the provider keeps its fee on it, so every line that was charged and then cancelled costs the retailer money.

  • Return. The shopper sends back one bowl a few days after delivery. The refund is the bowl's price plus its share of shipping and discount. A refund paid twice, or a bowl put back on the shelf twice, leaves the books wrong by the price of a bowl.

Pick one order from your own trading day and check that stock, money and what the shopper was told agree about every unit, every line and every cent.

What the outside world does

The payment provider sends the same message twice, sends a later message before an earlier one, answers after 30 seconds, or does not answer at all. A process dies between saving an order and the next thing that should have happened to it. Two requests for the last unit arrive in the same millisecond. A carrier reports a delivery twice. A merchandiser changes the price of every product while shoppers are searching.

Each of these costs the client money or trust in a different way: a customer charged twice, a unit sold twice, a parcel that never ships, a search page that shows a price from yesterday. The trading day at the end of the project makes all of them happen in the same simulated day, because they do not arrive one at a time.

Where it shows if you cut a corner

If two buyers can both be told yes for the last unit, the 200-buyer test sells an eleventh unit. If a refund is sized from the order's total and not from what was captured, the money test finds an order where captured minus refunded does not equal the lines the shopper kept. If a hold has no end, the trading day finds a reservation or an authorisation still live after the payment provider's outage ended. If stopping search stops orders, or an update to payment drops the orders that arrive during it, the shop has the same weakness the old one had, in a different place.