Skip to content

Selling on a marketplace and on your own site at once

  • Home
  • Blog
  • Selling on a marketplace and on your own site at once
Selling on a marketplace and on your own site at once

Selling on a marketplace and on your own website at once works when both channels read and write one shared stock and order record; it breaks when each keeps its own. The fix is a single source of truth, an idempotent sync layer, and a daily reconciliation job that catches the drift batch imports leave behind.

Key Takeaways

  • Two channels need one stock and order record. Two separate records guarantee an oversell eventually, usually on a weekend.
  • Marketplace APIs are eventually consistent — a webhook that arrives forty seconds late can still sell the last unit you own.
  • Idempotency is not optional. Store the marketplace's order ID with a unique constraint, or a retried webhook creates a second order.
  • Batch CSV imports are the weakest link. They overwrite rather than merge, and they know nothing about what sold in the last hour.
  • A daily reconciliation that compares counts per SKU catches drift no human will ever notice by eye.
  • Below a handful of orders a day, manual updates are genuinely fine. Don't build a sync layer you'll have to operate.
  • You rent the customer on a marketplace and own them on your own site. That asymmetry should decide where you invest.
How one marketplace order reaches your own website stockFour stages from a marketplace sale through webhook verification to a single order row and a storefront update.One order, both channels1Sale on themarketplace2Queue andverify3One orderrow, unique4Own sitestock updated
One marketplace sale flows through verification into a single order row, which then decrements stock on your own website.

What does selling on two channels actually involve?

Two channels means two catalogues, two order streams and one physical shelf. Every item you sell exists once in the real world and twice online, so price, stock, description and tax have to reach both. Most failures come from treating those updates as separate jobs instead of one write to a shared record.

In practice you end up maintaining three things: a product record, an availability number, and a mapping between your SKU and the marketplace's listing ID. That mapping is the piece teams forget, and it's the piece every sync breaks on first.

Why do marketplace stock and website stock drift apart?

Drift appears because each channel updates on its own clock. A marketplace webhook arrives late, a nightly CSV import overwrites everything, and your storefront decrements stock the moment a cart is paid. Between those events the same unit looks available in two places, and whoever pays first takes it.

Three mechanisms do most of the damage. The first is last-write-wins: a bulk import written at 02:00 carries yesterday's numbers and cheerfully undoes a sale that happened at 23:50. The second is eventual consistency — marketplaces queue their events, so a "sold" notification can land a minute after a customer on your own site bought the same item. The third is rate limiting: if your sync job gets throttled and retries later, the interval between the two channels' views of reality stretches from seconds to hours.

None of this is exotic. It's the normal behaviour of distributed systems, and the reason a shared ledger plus a reconciliation pass beats optimistic syncing every time.

When do you actually need a sync layer?

You need a sync layer when the same SKU sells on both channels faster than a human can correct it. As a rough line, if a popular item moves more than a few units a day across both, manual updates will eventually sell something you don't have, and the cost of that is a cancelled order and a rating drop.

You don't need one when stock is effectively infinite (digital goods, made-to-order), when the two channels sell disjoint ranges, or when volume is low enough that one person checks twice a day. Building an integration you then have to monitor, patch and pay for is a real cost — take it on when the oversell risk is bigger than the maintenance.

Which selling setup fits which retailerRows mapping each channel arrangement to the stock accuracy and operational load it brings.Which setup appliesMarketplace onlyYou rent the audience; you never own the customer recordOwn site onlyFull margin and data, but you pay for every visit you getBoth, one ledgerNeeds a sync layer and a daily reconciliation passBoth, manualFine below a few orders a day; fails on the first busy weekend
How each channel arrangement maps to stock accuracy, the operational load it creates, and the retailers it suits.

How do you set up a second sales channel without duplicating work?

You set up a second channel by making the marketplace a client of your system, not a parallel one. Your store owns the product record and the stock number; the marketplace gets told what changed. The steps below are the order that avoids rework.

  1. Pick the system of record. Usually your own store, because you control it. Every product gets one internal SKU that never changes.
  2. Map listings to SKUs. Store the marketplace's listing and variant IDs against your SKU in a table you can query. Without this, no sync can be trusted.
  3. Create the shared order table with a uniqueness rule on the channel plus the external order ID, so a retried webhook cannot create a duplicate.
  4. Subscribe to marketplace events. Most platforms offer webhooks for order and cancellation events; where they don't, poll on a short interval and store the last-seen timestamp.
  5. Put the events on a queue. Validate the signature, then enqueue. Do the stock write in a worker, not in the webhook request — marketplaces time out and retry, and retries are where duplicates come from.
  6. Push stock outward, not inward. Treat the marketplace's stock figure as a copy. Only your ledger decrements, and only in one transaction per order.
  7. Add a nightly reconciliation job. Compare per-SKU availability on both sides and alert on any difference above zero.
CREATE TABLE orders (
  id                BIGSERIAL PRIMARY KEY,
  channel           TEXT NOT NULL CHECK (channel IN ('marketplace','own_site')),
  external_order_id TEXT NOT NULL,
  sku               TEXT NOT NULL,
  quantity          INTEGER NOT NULL CHECK (quantity > 0),
  created_at        TIMESTAMPTZ NOT NULL DEFAULT now(),
  UNIQUE (channel, external_order_id)
);

That unique constraint is the single cheapest safeguard you can add. When a marketplace sends the same order twice — and it will — the second insert fails loudly instead of shipping twice.

If your store runs on WordPress, this is mostly a question of how much of the catalogue you keep in WooCommerce versus a separate system; our guide to WordPress versus a custom website covers that trade-off, and our services include building the integration layer when the two systems don't want to talk.

How do you verify the two channels agree?

You verify by comparing counts, not by eyeballing listings. A reconciliation query that joins your ledger against the last stock figure pushed to the marketplace will show every SKU where the two disagree, and it takes seconds to run on any catalogue under a few hundred thousand rows.

Run it nightly, and again after every bulk import. Alert on any non-zero difference and on any SKU where the marketplace reports stock but your ledger reports zero — that combination is the one that becomes an oversell. Log the comparison result even when it's clean, so you can show an auditor or a marketplace dispute exactly what your numbers were on a given day.

What breaks first in production, and how do you debug it?

The first failure is almost always overselling on the last unit of a fast-moving SKU, followed by duplicate fulfilment from a retried webhook. Debug in this order: check the ledger transaction log for that SKU, then the webhook delivery log, then the marketplace's stock figure, then your cache.

  • Two orders, one unit. Look for a webhook that arrived after the sale but before the stock write committed. Long transactions and slow workers widen that window.
  • Duplicate orders. A retry with no idempotency key. Check whether the second insert hit the unique constraint, and whether your handler logged it as an error instead of ignoring it.
  • Stock that never comes back. Usually a cancellation event you never subscribed to, or one that failed signature validation and was silently dropped.
  • Prices that disagree. A scheduled import overwriting a manual change. Timestamp your imports and refuse to apply any row older than the last known change.
  • Everything stalls at once. Token expiry or an API rate limit. Marketplaces expire credentials without much warning, so alert on repeated 401s rather than waiting for a customer to complain.

The fix pattern is the same each time: move the write into a single transaction, make it idempotent, and alert on the difference instead of trusting the sync to be perfect.

What happens in the hours after one stock changeA timeline showing how a single change propagates to a marketplace, a storefront cache, reconciliation and a daily drift report.One change, four checkpoints1Stock changedWritten to ledgerwith timestamp2Pushed outMarketplace APIplus cache purge3ReconciledNightly job comparesboth stock figures4Drift reportAny gap abovezero alertsThe UNIQUE (channel, external_order_id) constraint is what stops a retriedwebhook from shipping the same order twice.
A single stock change propagates through the ledger, the marketplace push, the nightly reconciliation and the drift report.

What does running two channels cost you?

Two channels cost less in licences than in attention. Expect a marketplace commission on every sale, occasional listing or subscription fees, and — if you use a connector — a monthly charge that scales with order volume. Those are the visible numbers, and the vendor's own pricing page is the only place to confirm them.

The invisible cost is engineering time. Somebody has to own the mapping table, rotate API credentials, watch the reconciliation alerts and fix the SKU that stopped syncing three weeks ago. Budget a few hours a month in a quiet period, and considerably more the first time you add a new marketplace or change your stock model.

What should you check on security and account ownership?

Treat marketplace API credentials as production secrets. Store them in a secret manager or your platform's environment configuration, never in a theme file or a repository. Verify webhook signatures before you act on a payload, and reject anything that fails rather than logging and continuing.

Grant the narrowest scope the integration needs — order read and stock write, not account administration. And make sure the marketplace account, the domain and the hosting are registered to the business, not to a former contractor's personal email. We've been called in more than once to recover an account nobody could log into, and it is a slow, unpleasant process. Our frequently asked questions cover how we handle credentials and handover.

What mistakes do teams make most often?

The most common mistake is syncing stock in both directions. When the marketplace can also write your availability, you get feedback loops where one correction triggers another, and the numbers oscillate. Pick one writer — your ledger — and make the other side read-only for stock.

Second is trusting a bulk import to be authoritative. A CSV is a snapshot, not a source of truth, and applying it blindly undoes live sales. Third is testing the integration with one order on a quiet Tuesday and assuming it holds on a campaign day, when hundreds of webhooks arrive at once and your worker pool is the bottleneck.

A realistic scenario

A Kathmandu retailer sells outdoor gear on a regional marketplace and through their own store. They started with manual updates: list on both, adjust stock when an order comes in. It worked at ten orders a week. During a festival promotion it didn't — one tent sold twice within four minutes, and the marketplace cancelled the second order, which cost them the seller rating they'd spent a year building.

The fix wasn't a new platform. They kept their store as the system of record, added a mapping table between SKUs and marketplace listings, moved order handling onto a queue with a unique constraint, and started a nightly reconciliation that emails a single number: how many SKUs disagree. Oversells stopped. Nobody has touched the integration in months except to rotate a token.

Which approach fits your business?

Choose the setup that matches how fast your stock actually moves, not the one that sounds most advanced. A shared ledger is the right answer for most retailers doing steady volume on both channels; manual updates remain perfectly rational below a handful of orders a day.

ApproachStock accuracyOperational loadBest fit
Marketplace onlyHigh — one system owns itLowTesting demand before building a brand site
Own site onlyHighMedium — you drive all the trafficBusinesses with an audience or B2B contracts
Both, shared ledgerHigh with daily reconciliationMedium to high — one more system to runRetailers selling steadily on both channels
Both, manual updatesLow on busy daysLow until it failsVery low volume, low-variance stock

If you already have a store and you're adding a marketplace, the integration work is closer to plumbing than product development — which is why it's often worth doing properly once rather than patching monthly. A look at how we've approached business platforms in Nepal shows the shape of that work.

In short

  • One ledger, one writer. The marketplace gets a copy of your stock, never authority over it.
  • Idempotency first — a unique constraint on channel plus external order ID costs nothing and prevents double fulfilment.
  • Queue the webhook, write in a worker, and treat retries as normal rather than exceptional.
  • Reconcile nightly and alert on differences. The job that finds drift is worth more than the sync that assumes there is none.
  • Below a few orders a day, keep it manual and spend the money on marketing instead.

People also search for

If your stock numbers on the marketplace and on your own site no longer agree, or you're about to add a second channel and would rather not discover the problem during a promotion, talk to our team. We build these integrations in your accounts and repositories, and hand over something your own staff can operate — you can see the wider range of what we do first if you'd like context before the call.

Frequently asked questions

  • It means the same catalogue is sold through two channels: a third-party marketplace and your own storefront. Orders arrive in both, but stock, pricing and customer records sit in separate systems, so you need an integration layer. Most sellers add it once marketplace fees or dependence on one platform start to hurt.

  • Pick one, usually your own database or ERP, and treat the marketplace as a downstream copy. Stock decrements there first, then pushes out through the marketplace API. If each channel owns its own count, you will oversell. Verify by checking a SKU's quantity in both after a test order.

  • Use the marketplace's inventory API with a scheduled push plus webhook-driven updates for new orders, not a manual CSV upload. Batch pushes typically lag by minutes, so set a buffer quantity on fast-moving SKUs. Confirm sync by placing test orders on each channel and watching quantities fall in both within one cycle.

  • Overselling happens when the marketplace sells the last unit before your site's stock update lands. The marketplace confirms its own order first; your site still shows one available. Rate limits and retry backoff widen that window. Mitigate with a reserved buffer, idempotent order imports keyed on marketplace order ID, and alerting on negative stock.

  • Start with the sync log and the last successful timestamp, then check whether the failure is authentication, rate limiting or schema. An expired refresh token returns 401 and stops everything; a 429 means backoff too aggressive; a validation error means one product broke the batch. Replay the failed payload after fixing, and check vendor docs for current error codes.

  • Fulfilment is the same physical pick-and-pack either way; the difference is the paperwork. Marketplace orders usually require their own label, packing slip and tracking upload through the marketplace API, and late dispatch harms your seller metrics. Route both channels into one order queue, then branch at label generation and tracking submission.

  • Yes. Marketplaces impose their own title rules, category trees, required attributes and image sizes, so a clean product record rarely maps one-to-one. Keep one master catalogue with marketplace-specific mapping fields, and generate each channel's listing from it. Otherwise every price or description edit has to be made twice and drifts.

  • Marketplaces pay out net of commission, payment fees, shipping and refunds, often on a rolling settlement cycle. Import the settlement report and post each line against the order, not the gross sale. Reconcile monthly: the bank deposit should equal gross sales minus fees minus refunds. Gaps usually mean a refund recorded in only one system.

  • Marketplace credentials and refresh tokens are long-lived and grant access to orders and customer data, so store them in a secrets manager, never in code or a plugin settings field. Request the narrowest scopes available, rotate keys on staff changes, and allowlist your server's outbound IP where supported. Check current vendor docs for scope names.

  • Cost drivers are staff time on reconciliation and support, any middleware or integration subscription, and marketplace commission on every sale. You also carry duplicate catalogue maintenance. Alternatives: marketplace-only and accept the fees, own-site-only and build your own traffic, or a scripted API sync for small catalogues. Our team can scope the trade-offs at /contact.

0 comments

Be the first to share your thoughts.

Leave a comment

Chat on WhatsApp