Ondc seller

From ankitjh4/indic-ai-skills · View interactive version

Ondc seller is an AI agent skill from the GitHub repository ankitjh4/indic-ai-skills. Deploy and manage ONDC seller applications. Set up seller reference apps with catalog management, order fulfillment, IGM support, and logistics integration. Handle provider registration, store operations, and ONDC protocol compliance for retail sellers.

How to use this skill

Skill file

ONDC Seller Skill

This skill helps you deploy and manage ONDC (Open Network for Digital Commerce) seller applications. ONDC is India's digital commerce network enabling sellers to reach buyers across multiple platforms.

What This Skill Does

Architecture Overview

The ONDC Seller App uses microservice architecture:

Prerequisites

Before using this skill, ensure you have:

  1. Docker & Docker Compose installed
  2. Git with submodule support
  3. Domain name or ngrok for public endpoint
  4. Required service accounts:
  1. ONDC Registry Access (for production deployment)

Quick Start

1. Clone and Initialize

cd /home/workspace
git clone https://github.com/ONDC-Official/seller-app-sdk.git ondc-seller-app
cd ondc-seller-app
git submodule init
git submodule update

2. Generate Cryptographic Keys

bun /home/workspace/Skills/ondc-seller/scripts/generate-keys.ts

This creates signing and encryption keys required for ONDC registration.

3. Configure Environment

bun /home/workspace/Skills/ondc-seller/scripts/setup-env.ts \
  --domain "https://yourdomain.com" \
  --firebase-key "YOUR_KEY" \
  --smtp-host "smtp.example.com" \
  --s3-bucket "your-bucket"

4. Deploy Locally (Development)

cd /home/workspace/ondc-seller-app
docker-compose -f docker-compose-for-local.yaml --env-file .env-local up -d

5. Register with ONDC

Once deployed, use the registration helper:

bun /home/workspace/Skills/ondc-seller/scripts/register.ts \
  --subscriber-url "https://yourdomain.com" \
  --signing-key "path/to/signing_public.pem" \
  --crypto-key "path/to/crypto_public.pem"

Common Operations

Check Application Status

bun /home/workspace/Skills/ondc-seller/scripts/check-status.ts

Shows the status of all services (seller-app, frontend, protocol, IGM).

Manage Catalog

# View catalog summary
bun /home/workspace/Skills/ondc-seller/scripts/manage-catalog.ts --action list

# Enable/disable store
bun /home/workspace/Skills/ondc-seller/scripts/manage-catalog.ts --action toggle-store --store-id "STORE123"

# Update item availability
bun /home/workspace/Skills/ondc-seller/scripts/manage-catalog.ts --action update-item --item-id "ITEM456" --available true

View Orders

# List recent orders
bun /home/workspace/Skills/ondc-seller/scripts/view-orders.ts --limit 10

# Get order details
bun /home/workspace/Skills/ondc-seller/scripts/view-orders.ts --order-id "ORDER123"

# Filter by status
bun /home/workspace/Skills/ondc-seller/scripts/view-orders.ts --status "Pending"

Handle IGM Issues

# List open issues
bun /home/workspace/Skills/ondc-seller/scripts/manage-igm.ts --action list

# View issue details
bun /home/workspace/Skills/ondc-seller/scripts/manage-igm.ts --action view --issue-id "IGM123"

# Update issue status
bun /home/workspace/Skills/ondc-seller/scripts/manage-igm.ts --action update --issue-id "IGM123" --status "Resolved"

Environment Variables

Key environment variables required (store in Settings > Advanced):

# ONDC Registry
BAP_URL="https://yourdomain.com"
BAP_ID="yourdomain.com"
BAP_PRIVATE_KEY="signing_private_key"
BAP_PUBLIC_KEY="signing_public_key"
BAP_UNIQUE_KEY_ID="unique_key_id_from_registry"

# Firebase Auth
REACT_APP_FIREBASE_API_KEY="firebase_api_key"
REACT_APP_FIREBASE_AUTH_DOMAIN="yourdomain.com"

# SMTP
SMTP_HOST="smtp.example.com"
SMTP_PORT="587"
SMTP_AUTH_USERNAME="user"
SMTP_AUTH_PASSWORD="pass"
SMTP_EMAIL_SENDER="noreply@yourdomain.com"

# AWS S3
AWS_ACCESS_KEY_ID="aws_key"
AWS_SECRET_ACCESS_KEY="aws_secret"
S3_REGION="ap-south-1"
S3_BUCKET="your-bucket"

# Map My India
MMI_CLIENT_SECRET="mmi_secret"
MMI_CLIENT_ID="mmi_client_id"
MMI_ADVANCE_API_KEY="mmi_api_key"

Feature Support Matrix

The ONDC Seller App implements ONDC Retail v1.2 specification:

| Feature | Status |

|---------|--------|

| Incremental catalog refresh | ✅ Available |

| Full catalog refresh | ✅ Available |

| Order tracking (hyperlocal GPS) | ✅ Available |

| Order tracking (inter-city) | ✅ Available |

| Search, Select, Init, Confirm | ✅ Available |

| Return with liquidation | ✅ Available |

| Merchant partial cancel | ✅ Available |

| RTO (Return to Origin) | ✅ Available |

| Customization (selection) | ✅ Available |

| Variants support | ✅ Available |

| Custom menu | ✅ Available |

| Off-network logistics | 🚧 Under Development |

| Self-pickup | 🚧 Under Development |

| Slotted delivery | 🚧 Under Development |

| Customization (free text) | 📅 Future scope |

| Static terms | 📅 Future scope |

| BNP + logistics integration | 📅 Future scope |

Troubleshooting

Services Not Starting

# Check logs
docker logs ondc-seller-app
docker logs ondc-seller-frontend
docker logs ondc-seller-protocol

# Restart specific service
docker-compose restart seller-app

Registration Issues

Catalog Not Syncing

Security Notes

References

See the references/ folder for:

Support

When to Use This Skill

Use this skill when you need to:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.