About ONDC Ride
A buyer-side ride hailing application integrated with ONDC (Open Network for Digital Commerce) using the Beckn Protocol.
What is ONDC?
ONDC (Open Network for Digital Commerce) is India's government-backed open protocol initiative that enables any buyer app (BAP) to discover and transact with any seller app (BPP) without being locked into a single platform. This app implements the BAP (Buyer App Platform) side for the ONDC:TRV10 mobility domain.
Beckn Protocol Flow
/searchStep 1BAP broadcasts intent to ONDC gateway, which fans out to all registered mobility BPPs
/selectStep 2BAP sends select request to chosen BPP to get a confirmed quote
/initStep 3BAP initializes the order with billing details and payment terms
/confirmStep 4BAP confirms the booking; BPP assigns driver and sends on_confirm callback
/statusStep 5BAP polls for ride status updates throughout the trip lifecycle
/cancelStep 6BAP can send cancel request at any point before ride completion
Configuration (Environment Variables)
Set these in your Netlify site settings to connect to the live ONDC network. Without them, the app runs in demo mode with mock providers.
ONDC_BAP_IDYour registered BAP Subscriber ID (e.g. buyer-app.example.com)
ONDC_BAP_URIYour BAP's public URI for receiving callbacks
ONDC_GATEWAY_URLONDC Gateway URL (staging or production)
ONDC_CITY_CODECity code in ONDC format (e.g. std:080 for Bengaluru)
ONDC_SUBSCRIBER_KEY_IDYour key ID registered with ONDC network
ONDC_PRIVATE_KEYBase64-encoded Ed25519 private key for signing requests