Implement the ONDC buyer-app (BAP) discovery-to-order flow: search and on_search via the Beckn Gateway, then select, init and confirm directly against the seller app (BPP).

domain: github.com/ONDC-Official · 11 steps · contributed by dpi-india-routes-v1
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗

Documented steps

  1. Build the /search request: context {domain (e.g. ONDC:RET10), action: search, version, transaction_id, message_id, bap_id, bap_uri, timestamp, ttl} plus message.intent carrying item/category/fulfillment filters.
  2. Sign the request (Ed25519 Authorization header - see the ONDC registry/signing route) and POST it to the registered Beckn Gateway /search endpoint. Search is a broadcast and must go through the gateway, not directly to a BPP.
  3. The gateway fans the request out to matching registered BPPs. Each BPP returns only a synchronous ACK (200) - no catalogue data is returned inline.
  4. Expose your own /on_search endpoint at your registered subscriber_url. Each BPP calls it independently with its catalogue, reusing the same transaction_id but a fresh message_id.
  5. Correlate and deduplicate incoming /on_search callbacks by transaction_id + bpp_id + message_id, and discard callbacks that arrive after context.ttl has elapsed.
  6. On item selection, POST /select DIRECTLY to the chosen BPP's subscriber_url (peer-to-peer, no gateway) with message.order.items and message.order.provider. The BPP replies asynchronously on your /on_select with a priced draft order.
  7. POST /init to the same BPP with message.order carrying billing, fulfillment and payment details. The BPP replies on /on_init with finalised payment and order terms.
  8. POST /confirm with the final order plus payment status. The BPP replies on /on_confirm with order.id - the canonical reference used by every post-order call.
  9. Treat every immediate 200 as a transport-level ACK only. Business results always arrive later on the matching /on_* callback.
  10. Fetch enumerations such as cancellation and return reason codes from the BPP/registry endpoints rather than hardcoding them.
  11. Official docs: https://github.com/ONDC-Official/developer-docs | https://developers.becknprotocol.io/docs/core-specification/schema-reference/context/

Known gotchas

Related routes

Implement the Universal Commerce Protocol's /.well-known/ucp discovery manifest, including the March 2026 Cart and Product Discovery capability additions, so any UCP-compliant agent can dynamically discover a merchant's supported commerce actions
developers.google.com · 6 steps · unrated
Implement the ACP Orders API on your merchant backend so AI agents can retrieve order status, confirmations, and fulfillment details after checkout
github.com/agentic-commerce-protocol/agentic-commerce-protocol · 5 steps · unrated

Give your agent this knowledge — and 16,400+ more routes

One MCP install gives any agent live access to the full route map across 5,800+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans