This guide will walk through the end to end requirements and flow to develop the APIs required to facilitate the transaction between consumer and provider.

ONDC Reference Applications

Do you need assistance in building the buyer or seller apps? Go through ONDC reference buyer and seller apps source code to help you get started.

ONDC reference Buyer APP:

https://github.com/ONDC-Official/biap-client-node-jshttps://github.com/ONDC-Official/ONDC-Mobile-Buyer-App-Private

ONDC reference Seller APP:

https://github.com/ONDC-Official/seller-app-sdk

note

API Specifications

API Specifications

ONDC API contracts map business requirements for various use case scenarios to a set of attribute keys in different APIs and ensures interoperability, between a buyer app & seller app, as follows:

59b54eee-861c-4cf1-a2aa-a2167dbd6618f3419816-cc5c-4118-a38f-ca8a68beb40aDECIDEDRetail

Retail Domains live in ONDC:

Grocery

ONDC:RET10

F&B

ONDC:RET11

Fashion

ONDC:RET12

Beauty & Personal Care

ONDC:RET13

Electronics

ONDC:RET14

Home & Decor

ONDC:RET15

Pharma

ONDC:RET16

ONDC APIs is built as an extension to Beckn protocol and closely follows the standards of Open API.

Refer to the complete API specs and try the APIs in swagger hub:

https://app.swaggerhub.com/apis/ONDC/ONDC-Protocol-Retail/1.0.29

Please refer our API contract to understand the attributes usage and retail specific use cases implemented. These API contracts will help you understand the single source of truth for each attribute key and thereby establishing mutability & immutability of these keys on behalf of the participants at each end of the transaction.

https://drive.google.com/file/d/1Z0eT1PZ8_tthEyxli8bLs-B9oCYAZIS0/view?usp=sharing

Retail B2C transaction contract between Retail Buyer and Seller:

https://docs.google.com/document/d/12oMC4A05jT5rjCbY-M7j4T2oekr9bqcvSOpTI0jFEgE/edit?usp=sharing

There is a new version released for retail, which is currently being developed by the existing network participants in staging and pre-prod environment. The new version (v1.2.0) released includes Variants, customization, Add-ons, cross-categories, offers and much more. All the new network participants are expected to develop on the newer version v1.2.0.

https://docs.google.com/document/d/1brvcltG_DagZ3kGr1ZZQk4hG4tze3zvcxmGV4NMTzr8/edit#

0354b044-f019-4d2c-a6f3-6703baf798445c5b2d99-b5e0-475a-9364-d83f576ca068DECIDEDLogistics

Refer to the logistics API contract to understand the attributes usage and retail specific use cases implemented. These API contracts will help you understand the single source of truth for each attribute key and thereby establishing mutability & immutability of these keys on behalf of the participants at each end of the transaction.

https://drive.google.com/file/d/1IebvnM4ZyGXllsQTFTVRAvUTlkmARnM_/view?usp=sharing

There is a new version released for Logistics, which is currently being developed by the existing network participants in staging and pre-prod environment. All the new network participants are expected to develop on the newer version v1.2.0.

https://docs.google.com/document/d/1CkfxtqyLbSQccJZyNmf9BSGzJBH13gcLOk_tywV-LBk/edit?usp=sharing

Logistics transaction contract between Logistics Provider and Consumer:

https://docs.google.com/document/d/1LiKGK3AKwzx5GWAc5g942QKB-TzDn0gGMsvXNJgIrmk/edit?usp=sharing

17797645-15ad-40f4-a301-48b2ef3bb1d4b7ae2075-c8bb-4642-a2c4-b60da6ad57cdDECIDEDB2B

Please refer our API contract to understand the attributes usage and retail specific use cases implemented. These API contracts will help you understand the single source of truth for each attribute key and thereby establishing mutability & immutability of these keys on behalf of the participants at each end of the transaction.

https://github.com/ONDC-Official/ONDC-RET-Specifications/tree/master

dfb5693f-57a0-4c3a-b5e4-4e898f827ce686b0fe56-b08d-4118-ad54-d2cf55eac06eDECIDEDGift Card

The API contract here elaborates the process flows for buying gift cards on the network across four phases of order processing flow of discovery of gift cards available on the network, order placement, fulfillment of the order and post fulfillment requirements.

https://docs.google.com/document/d/1pxbDGag8GBzCFXju8YbnIxEFv17DifzyvFI4OsU8oEA/edit?usp=sharing

cba7552b-1818-4ff7-b38a-4855d90086cfcb008271-7ffe-41d5-8ff4-583a4aa09fc9DECIDEDMobility

ONDC mobility & travel aims to build a nationwide multi-modal network that provides seamless experiences, supports growth & innovation by,

In the mobility space, the intent is to enable seamless and truly multimodal transit options by bringing in diverse inventory onboard at scale that will serve the country’s population.

This would be possible in the mobility domain by making sure all mobility apps in the network are built in such a way as to enable them to communicate with each other in the same language.

https://ondc-official.github.io/mobility-specification/

8b6b0bf9-486b-4c79-a014-d0abe26bf26db617d4b8-5ab3-4089-b8f3-46539c50e4f2DECIDEDFinancial Services

ONDC financial services aims to build a nationwide multi-modal network that provides seamless experiences, supports growth & innovation by

In the financial service space, the intent is to enable seamless and truly interoperable service options by bringing in diverse inventory onboard at scale that will serve the country’s population. This would be possible in the financial service domain by making sure all financial services apps in the network are built in such a way as to enable them to communicate with each other in the same language.

https://ondc-official.github.io/ONDC-FIS-Specifications/

IGM (Issue and Grievance Management Framework)

The Issue & Grievance Management (IGM) for ONDC is a mechanism via which issues between users of the network are resolved. The IGM flow developed acts as a facilitator to resolve issues, grievances and disputes between a Complainant and a Respondent in a manner that ensures transparency, fairness and data security to the parties. The framework is built on the interactions of Network Participants (NPs) for unique transactions including logistics services by Logistics Service Provider (LSP) procured over the network. This implies that a complainant shall be raising an issue for a particular transaction on the network which may involve buyer app, seller app, logistics service provider app or any other participants for a given transaction.

Try the APIs on swagger hub:

https://app.swaggerhub.com/apis/ONDC/ONDC-Protocol-IGM/1.0.0

Refer to the IGM MVP API Contract here:

https://docs.google.com/document/d/1UYGIo1fSOcA4ypnk5FuaCgUgNnu9dBQt/edit?usp=sharing&ouid=100595989766867836454&rtpof=true&sd=true

Refer to IGM API contract here:

https://docs.google.com/document/d/135OCfsi5jQ7wh4H_LOoMxb0T0ZrWDYy4LTBvpYS6k_w/edit?usp=sharing

RSF (Reconciliation and Settlement Framework)

The objective is to design Reconciliation and Settlement framework for NPs, providing a framework for the participants to settle funds against transactions to respective parties and create an audit trail of transactions. Following are the enumerated design principles for reconciliation and settlement framework:

  1. Enable seamless settlement of funds collected by participants

  2. Non-repudiable information dissemination all through network entities

  3. Maintaining Audit trail to ensure evidence security 

  4. Defining standards of message communication for transparency, efficiency and machine readability of Information

  5. Building trust through safeguarding fund flow for a transaction through well defined triggers for money withdrawal from Nodal Like account

  6. Ensuring non-repudiability through digital signatures and payload authentication

  7. Seamless integration using protocol with all stakeholders including settlement agency, reconciliation service providers and participants

Try the APIs on swagger hub:

https://app.swaggerhub.com/apis/ONDC/ONDC-Protocol-RSP/0.1.0-draft#/

Refer to RSF API contract here:

https://docs.google.com/document/d/1ubUPAWpbbUJ4vG2h5TQ74srZBjYjrO0P/edit?usp=sharing&ouid=103244249656832991961&rtpof=true&sd=true

Rating

The ONDC Network Rating framework is to enable the collection & collation of the various ratings from a Buyer and then transmit them to the Seller Application(s). Buyer Apps will collect, collate and send the raw ratings and Seller App(s) will store the raw ratings. An aggregated score, as calculated by the Network Score Ledger shall be transmitted to whoever wants to consume the data (e.g. reporting agencies, scoring agencies, badging agencies etc.). Seller Applications will also send out the scores to the Buyer Applications as and when they receive a search request as part of the product/ service catalog shared by the Seller Application.

https://docs.google.com/document/d/1VaafY8t47hjpoW6tdezGsPwLwxxaAaGc/edit?usp=sharing&ouid=100595989766867836454&rtpof=true&sd=true

Serviceability

The serviceability construct will allow a buyer app to display catalogs, for only those stores, that can fulfill orders for a buyer, at a specific time, at their location.

Please go through the serviceability construct here

https://docs.google.com/document/d/1f4QbVstY5m-L_-Jut5jvbeiaBKLR1ttJL_am6GG2Fko/edit?usp=sharing

City-State codes are defined here:

https://docs.google.com/spreadsheets/d/1BtABwe4CXgN_sHIvDH51dJeYzRWdAhedYtzx10apOTs/edit?usp=sharing

Order Cancellation, Returns & Replacements

The objective is to propose process flows for Cancellation, Return & Replacement. Cancellation, Return & Replacement can be processed by Buyer & Seller Apps, using existing protocol APIs. The detailed process flows and sequence diagrams are defined below.

This note proposes detailed process flows for the following:

Please go through the complete flow here:

https://docs.google.com/document/d/1M-lZSduYMFKIk1V6d8QLt-j-16-rVzYVdPn0pmbkclk/edit?usp=sharing

Catalogue Mandatory Requirements

https://docs.google.com/spreadsheets/d/1BNPOgcJzKglZzj1bpx-KkjvWBpH-R50AXbdC1AKJm1g/edit?usp=sharing

Error Codes

Error Codes

Payment and Settlement

https://docs.google.com/document/d/1iqLdayk488ekEzKrEs-yn6gVrevbxBkILBe5j4oIxMY/edit?usp=sharing

Checklist for Sellers

https://docs.google.com/document/d/1m2V3GR6UIjJK65u4JW1r35cihy7lFmuBe8_cv66mVU8/edit?usp=sharing