Bringing Farmers & Customers Together
Our API bridges the gap between local farmers and customers, creating a seamless marketplace for fresh, farm-to-table products.
Farmers
List products, manage inventory, set flexible pricing (per kg, unit, wholesale), and receive orders directly from customers.
Customers
Browse fresh produce, place orders, make secure payments, and leave reviews to support local farming.
πΎ Farm Products You Can Sell
From fresh vegetables to seasonal fruits, dairy products to grainsβlist and sell any farm product through our API.
π¨βπΎ Farmer Features
Complete product management with multiple pricing options, order tracking, customer reviews, and sales analytics.
π Customer Experience
Advanced search & filtering, favorites, order history, secure checkout, and easy communication with farmers.
π Enterprise Security
JWT authentication, role-based access control, rate limiting, data validation, and comprehensive security headers.
π³ Flexible Payment Options
Built-in (AdwaPay): Use POST /paymentCollection/mobile for integrated card or mobile money payments. External Providers: Integrate your own payment gateway (Stripe, Flutterwave, M-Pesa) and confirm via POST /payment/confirm-external. Full transaction lifecycle management with webhooks and notifications.
π³ Payment Collection System
Choose between our built-in payment provider or integrate your preferred payment gatewayβboth options fully supported with comprehensive documentation.
Built-in Provider (AdwaPay)
Streamlined payment collection supporting card and mobile money. Includes redirect flows, status polling, and automatic webhook notifications.
/api/v2/transactions/:orderId/paymentCollection/mobile
External Payment Gateway
Use your existing payment infrastructure (Stripe, Flutterwave, M-Pesa, etc.). Process payments externally, then confirm with our API for order updates and notifications.
/api/v2/transactions/payment/confirm-external
Configuration: PAYMENT_DEFAULT_PROVIDER=adwa or use ?provider=adwa query parameter. Complete webhook integration available at /transactions/webhook/adwapay. See full documentation for details.
π οΈ Built With Modern Technology
π API Endpoints Overview
π Authentication
/api/v2/auth/signup - User registration (OTP disabled; keeping auth simple)
/api/v2/auth/login - User login with JWT token generation
/api/v2/auth/refreshToken - Refresh JWT access tokens
πΎ Products Management
/api/v2/products - List all products with pagination & filters
/api/v2/products - Create new product (Farmers only)
/api/v2/products/:id - Get detailed product information
/api/v2/products/:id - Update product details (Owner only)
/api/v2/products/:id - Delete product (Owner only)
π¦ Orders & Transactions
/api/v2/orders - Create new order with cart items
/api/v2/orders - Get user order history
/api/v2/payments - Process payment for order
π€ User Management
/api/v2/users/profile - Get current user profile
/api/v2/users/profile - Update user profile information
/api/v2/users/upload-avatar - Upload profile picture
π Secure Authentication
JWT-based auth with refresh tokens, role-based access control, and session management. (OTP verification disabled β keeping auth simple.)
π Highly Scalable
Built with modern architecture patterns, optimized database queries, and designed to handle growth.
π API-First Design
Pure REST API backendβintegrate with any frontend: mobile apps, web applications, or third-party platforms.
π Real-time Updates
Push notifications, webhooks, email alerts, and instant order status updates for seamless user experience.
π Ready to Get Started?
Integrate the Farm Marketplace API into your application in minutes with our comprehensive documentation.
Base URL & Documentation
/api/v2
π Complete OpenAPI Documentation β
Includes: Authentication guides, endpoint references, request/response schemas, error codes, and code examples.