skills/ondc-buyer/SKILL.md
Deploy and manage ONDC buyer applications. Set up buyer reference apps with product discovery, cart management, checkout flows, and order tracking. Handle payment integration, delivery tracking, and ONDC protocol compliance for consumer-facing applications.
npx skillsauth add ankitjh4/indic-ai-skills ondc-buyerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill helps you deploy and manage ONDC (Open Network for Digital Commerce) buyer applications. ONDC is India's digital commerce network enabling buyers to discover and purchase from sellers across multiple platforms.
The ONDC Buyer App uses microservice architecture:
Before using this skill, ensure you have:
cd /home/workspace
git clone https://github.com/ONDC-Official/ondc-sdk.git ondc-buyer-app
cd ondc-buyer-app
git submodule init
git submodule update
bun /home/workspace/Skills/ondc-buyer/scripts/generate-keys.ts
This creates signing and encryption keys required for ONDC registration.
bun /home/workspace/Skills/ondc-buyer/scripts/setup-env.ts \
--domain "https://buyerapp.example.com" \
--firebase-key "YOUR_KEY" \
--juspay-merchant-id "MERCHANT_ID" \
--mmi-client-id "MMI_CLIENT"
cd /home/workspace/ondc-buyer-app
docker-compose -f docker-compose-for-local.yaml --env-file .env-local up -d
Access the app at http://localhost (or your configured domain).
Once deployed, use the registration helper:
bun /home/workspace/Skills/ondc-buyer/scripts/register.ts \
--subscriber-url "https://buyerapp.example.com" \
--signing-key "path/to/signing_public.pem" \
--crypto-key "path/to/crypto_public.pem"
bun /home/workspace/Skills/ondc-buyer/scripts/check-status.ts
Shows the status of all services (client, frontend, protocol, IGM, catalog).
# Search across ONDC network
bun /home/workspace/Skills/ondc-buyer/scripts/search.ts --query "smartphones" --city "Bangalore"
# Search by category
bun /home/workspace/Skills/ondc-buyer/scripts/search.ts --category "Grocery" --location "110001"
# Get provider details
bun /home/workspace/Skills/ondc-buyer/scripts/search.ts --provider-id "PROVIDER123"
# List user orders
bun /home/workspace/Skills/ondc-buyer/scripts/view-orders.ts --user-id "USER123" --limit 10
# Get order details and tracking
bun /home/workspace/Skills/ondc-buyer/scripts/view-orders.ts --order-id "ORDER456"
# Track order status
bun /home/workspace/Skills/ondc-buyer/scripts/track-order.ts --order-id "ORDER456"
# Initiate cancellation
bun /home/workspace/Skills/ondc-buyer/scripts/cancel-order.ts --order-id "ORDER789" --reason "Changed mind"
# Request return
bun /home/workspace/Skills/ondc-buyer/scripts/return-order.ts --order-id "ORDER789" --items "ITEM1,ITEM2"
# Check cancellation status
bun /home/workspace/Skills/ondc-buyer/scripts/check-cancellation.ts --order-id "ORDER789"
# List user issues
bun /home/workspace/Skills/ondc-buyer/scripts/manage-igm.ts --action list --user-id "USER123"
# File new issue
bun /home/workspace/Skills/ondc-buyer/scripts/manage-igm.ts --action create \
--order-id "ORDER123" \
--type "PRODUCT_QUALITY" \
--description "Product damaged"
# Track issue status
bun /home/workspace/Skills/ondc-buyer/scripts/manage-igm.ts --action track --issue-id "IGM456"
Key environment variables required (store in Settings > Advanced):
# ONDC Registry
BAP_URL="https://buyerapp.example.com"
BAP_ID="buyerapp.example.com"
BAP_PRIVATE_KEY="signing_private_key"
BAP_PUBLIC_KEY="signing_public_key"
BAP_UNIQUE_KEY_ID="unique_key_id_from_registry"
# Firebase Auth
FIREBASE_ADMIN_SERVICE_ACCOUNT="/path/to/firebase-service-account.json"
REACT_APP_FIREBASE_API_KEY="firebase_api_key"
REACT_APP_FIREBASE_AUTH_DOMAIN="buyerapp.example.com"
# Juspay Payment Gateway
JUSPAY_SECRET_KEY_PATH="/path/to/juspay-creds.pem"
JUSPAY_BASE_URL="https://sandbox.juspay.in"
JUSPAY_MERCHANT_ID="merchant_id"
JUSPAY_API_KEY="access_key"
JUSPAY_WEBHOOK_USERNAME="webhook_user"
JUSPAY_WEBHOOK_PASSWORD="webhook_pass"
# Web App Payment Config
REACT_APP_JUSTPAY_CLIENT_AND_MERCHANT_KEY="merchant_id"
REACT_APP_MERCHANT_KEY_ID="merchant_id"
REACT_APP_PAYMENT_SDK_ENV="sandbox"
REACT_APP_PAYMENT_SERVICE_URL="https://api.juspay.in"
# Map My India
MMI_CLIENT_SECRET="mmi_secret"
MMI_CLIENT_ID="mmi_client_id"
MMI_ADVANCE_API_KEY="mmi_api_key"
# MongoDB
MONGO_DB_URL="mongodb://mongo:27017/ondc"
The ONDC Buyer App implements ONDC Retail v1.2 specification:
| Feature | Status | |---------|--------| | Incremental catalog refresh | ✅ Available | | Full catalog refresh | ✅ Available | | Product search & discovery | ✅ Available | | Shopping cart management | ✅ Available | | Checkout flow (select/init/confirm) | ✅ Available | | Payment integration (Juspay) | ✅ Available | | Order tracking (GPS-based) | ✅ Available | | Live order tracking | ✅ Available | | Customization (selection) | ✅ Available | | Variants support | ✅ Available | | Return with liquidation | ✅ Available | | Cancellation flows | ✅ Available | | RTO (Return to Origin) | ✅ Available | | IGM issue management | ✅ Available | | Order history | ✅ Available | | Multi-store cart | ✅ Available | | Address management | ✅ Available | | Customization (free text) | 📅 Future scope | | Subscription orders | 📅 Future scope | | Offers & discounts | 📅 Future scope |
To integrate other payment gateways (Razorpay, Paytm, etc.):
# Modify payment service integration
vim /home/workspace/ondc-buyer-app/biap-client-node-js/src/payment/
Update the payment service to match your gateway's API.
MMI provides:
Required APIs:
https://outpost.mapmyindia.com/api - Authenticationhttps://atlas.mapmyindia.com/api/places/search/json - Searchhttps://explore.mappls.com - Explore placeshttps://apis.mapmyindia.com/advancedmaps/v1 - Advanced mappinghttps://atlas.mappls.com/api/places/geocode - GeocodingFor IGM ticket management:
https://yourdomain.com/bugzilla/adminadmin and password passwordBUGZILLA_API_KEY to environment variablesNote: Bugzilla is optional but recommended for full IGM functionality.
# Check logs
docker logs ondc-buyer-client
docker logs ondc-buyer-frontend
docker logs ondc-buyer-protocol
docker logs ondc-catalog-service
# Restart specific service
docker-compose restart biap-client-node-js
/search request/response logs/track endpoint responses.env files or credentials to version control# Install ngrok
brew install --cask ngrok
# Start tunnel
ngrok http 5555
# Use ngrok URL in BAP_URL and PROTOCOL_BASE_URL
# Use docker-compose with SSL
docker-compose -f docker-compose.yaml --env-file .env-prod up -d
# Initialize Let's Encrypt
./init-letsencrypt.sh
cd deploying_ansible
ansible-playbook -i ansible_hosts buyer-app-install-for-ssl.yaml
ansible-playbook -i ansible_hosts buyer-app-run.yaml
See the references/ folder for:
Use this skill when you need to:
development
--- name: cashfree description: Use this skill whenever the user wants to integrate Cashfree payment APIs. Triggers include: creating orders or payment sessions, accepting payments via UPI/cards/netbanking/wallets, generating payment links to share via SMS/email, handling refunds, verifying webhook signatures, fetching payment or settlement status, building a checkout flow, writing Python code for Cashfree, switching between test and production environments, or understanding Cashfree error codes
development
Interact with Zoho CRM, Projects, and Meeting APIs. Use when managing deals, contacts, leads, tasks, projects, milestones, meeting recordings, or any Zoho workspace data.
testing
Access Vedic scriptures including Rig Veda, Yajur Veda, Atharva Veda, and Puranas. Use when user asks for "Vedas", "Rig Veda", "Vedic hymns", "ancient Indian scriptures", or wants Hindu religious/philosophical content.
testing
Complete Vedic astrology chart generation and interpretation. Generate birth charts (D1-D60), calculate Panchanga, Shadbala, Vimshottari Dasha, Ashtakavarga, and provide interpretations using Krishnamurthi Paddhati (KP) system, classical Parashara principles, and traditional texts. Supports both natal and horary (Prasna) charts.