Back
#Ecommerce
Two Channels, Two API Contracts: Why Indian D2C Brands Need Headless Commerce Now

India’s D2C retail landscape bifurcated in 2026 and most engineering teams missed the moment it happened. On one side: ONDC, living in 400 cities, carrying over 3 lakh sellers on a 3% commission rail built on the open Beckn protocol. On the other: quick commerce, an $11.5 billion market run by Blinkit’s 2,100 dark stores, Zepto’s 1,100+, and Instamart’s growing footprint, each one wired for sub-10-minute fulfillment from hyper-local inventory.
Both channels are growing. Both are table stakes for D2C brands with national ambition. And they have fundamentally different API requirements. ONDC requires your product catalog to be published in Beckn’s JSON schema, your order management to process asynchronous webhook-based flows, and your server to maintain 99.99% uptime or your catalog disappears from search results instantly. Quick commerce requires your inventory API to return hard availability answers in under 500 milliseconds, support substitution rules, and lock stock at query time to prevent overselling. These two requirement sets cannot both be served efficiently by the same monolithic commerce backend.
ShopDirect Global, a cross-border D2C platform we built serving India and Southeast Asia, learned this the hard way. Their initial India launch used a single Shopify Plus storefront with ONDC integration via a middleware adapter. It worked until peak sale days, when the catalog sync delays on the middleware layer caused ONDC to serve stale inventory data while the quick commerce partner’s 500ms SLA was being breached on the same catalog update queue. The fix required separating the inventory read path from the catalog write path a headless restructuring that took 11 weeks to complete while they were live in production.
This post explains the architecture decision they should have made first, and a framework for evaluating where your current stack stands.
Headless commerce, in its original definition, separates the frontend presentation layer from the backend commerce engine. In an ONDC context, the relevant separation is different: it is the decoupling of the catalog management layer, the inventory management layer, the order management layer, and the fulfillment routing layer because each of these layers needs to serve different consumers with different latency and consistency requirements.
ONDC’s Beckn protocol models commerce as a sequence of asynchronous API calls: search, select, init, confirm, status, track, cancel, update, support. Each call generates a callback. Your Seller App backend must respond to these callbacks within the protocol’s defined timeout windows typically 2 to 30 seconds depending on the flow stage. The protocol is not synchronous. You cannot build an ONDC integration on a request-response commerce API and expect it to behave correctly.
Quick commerce channel APIs are the opposite: synchronous, sub-second, with hard consistency requirements. An inventory check that returns “available” must lock that unit for the next 90 seconds while the order is placed. A stale cache is not a nuisance it is a cancelled order and a platform penalty.
These two requirements asynchronous multi-step protocol with catalog visibility as the goal, vs. synchronous sub-second inventory lock with fulfillment as the goal cannot be served from the same read path.
The OCRL is a four-layer model for structuring a commerce backend that can serve ONDC and quick commerce channels concurrently without shared bottlenecks.
Layer 1: Catalog Publishing Service. A dedicated service that owns the authoritative product catalog and publishes it to all downstream channels. This service writes to ONDC via the Beckn protocol on a change-event basis (not a polling basis). It writes to quick commerce channel APIs via webhook or API push. It does not serve customer-facing requests directly. The key design constraint: catalog updates must propagate to ONDC within the protocol’s defined reconciliation window, typically 15 minutes for catalog changes, or your catalog falls out of search.
Layer 2: Inventory Truth Service. A dedicated service that owns real-time inventory across all dark store locations, warehouse nodes, and fulfillment centers. This is the service that quick commerce APIs query for availability. It must be designed for sub-500ms read latency and support optimistic locking for concurrent availability checks. It does not serve ONDC directly ONDC availability is calculated from the Inventory Truth Service at order-init time, not at search time.
Layer 3: Order Orchestration Service. A dedicated service that manages order state across all channels. For ONDC orders, this service handles the asynchronous Beckn flow receiving confirm callbacks, routing to fulfillment, publishing status updates. For quick commerce orders, it handles synchronous dispatch to the dark store picker workflow. The critical design principle: order state must be channel-agnostic. An ONDC order and a Blinkit-fulfilled order of the same product from the same inventory pool must use the same underlying inventory decrement operation.
Layer 4: Fulfillment Routing Engine. A dedicated service that selects the fulfillment node for each order based on customer location, available inventory, SLA, and channel constraints. This is where the ONDC “deliver in X days” and the quick commerce “deliver in 10 minutes” SLAs are reconciled against physical inventory distribution. Most D2C brands do not build this as a separate service they embed routing logic in the order management system. At moderate scale, embedded routing becomes the bottleneck that neither channel’s SLA can tolerate.
Selling on ONDC is not a channel decision. It is a backend architecture decision that you cannot undo cheaply.
Becoming an ONDC Seller Network Participant (SNP) requires your backend to implement the Beckn protocol stack, which is not a REST API in the conventional sense. Three technical decisions tend to cause the most integration failures.
Certificate-based participant registry. ONDC uses a decentralized participant registry where each SNP publishes a signing key. Every API call between buyer apps and your seller app is signed. If your middleware layer does not implement request signing correctly, buyer apps will drop your catalog from search results without an explicit error message. Debugging unsigned request failures in a decentralized network is substantially harder than debugging a 401 from a traditional API.
Catalog schema compliance at the category level. ONDC defines different catalog schemas for different product categories: grocery, fashion, electronics, food service, and others. A catalog published in the wrong schema for a category will not surface in buyer app searches for that category. Most D2C brands selling across categories need category-specific catalog adapters. A single generic Beckn catalog serializer covers approximately 60% of the cases before category-specific fields start causing silent failures.
Multi-availability zone deployment for catalog uptime. ONDC makes catalog visibility contingent on your SNP backend being reachable. If your backend is unavailable, your catalog disappears from buyer app searches not with a placeholder, not with a “temporarily unavailable” notice, just absence. This creates a 99.99% uptime requirement that most D2C backends were not designed to meet. Deploying across multiple availability zones with automated failover is not optional for an ONDC integration at production scale.
If you are a CTO, Head of Engineering, or VP Product at a D2C brand considering or already pursuing ONDC integration and quick commerce channel expansion, here is what to focus on in the next 30 days:
Separate your inventory read path from your catalog write path. This is the single most impactful architecture change you can make before ONDC integration begins. It eliminates the primary bottleneck that causes availability data on ONDC to lag behind actual inventory state.
Assess your backend uptime against ONDC’s catalog visibility requirement. Run a 30-day availability audit on your current commerce backend. If you are seeing downtime events above 0.01% monthly (roughly 4 minutes per month), you will have catalog visibility gaps on ONDC. Multi-AZ deployment is the fix, not application optimization.
Build your ONDC Beckn integration against the staging environment, not production. ONDC provides staging, preprod, and production environments. Most teams rush to production integration. The certificate registry, the catalog schema validators, and the asynchronous callback flows all behave differently in staging. Budget four to six weeks in staging before requesting production onboarding.
More Blog” ABC Integration for Universities: How NEP 2020 Is Reshaping Academic Credit Systems
Copyright © 2026 codelynks.com. All rights reserved.