ALOPAY API Documentation

Multi-tenant e-commerce backend. Every request to /api/v1/ requires the X-Tenant-ID header.

Base URLs:   /api/v1/ — Customer  |  /api/v1/admin/ — Admin (requires bearer token + role)  |  /api/platform/ — Super Admin (separate JWT secret, secret)

Auth & Profile

Register, login, OTP/2FA, password reset, address management, and preferences.

View →

Products

Catalog browsing, search by tags/price/size, individual product with variants.

View →

Categories & Collections

Hierarchical categories and curated collections with product associations.

View →

Cart Validation

Stateless server-side validation of cart items — stock, price, and active status.

View →

Orders

Create orders with row-level locks, order history, tracking timeline, and cancellation.

View →

Delivery & Zones

County-based delivery zone lookup and fee estimation before checkout.

View →

Payments

M-Pesa STK Push and Paystack card payments with webhook confirmation.

View →

Reviews

Verified-purchase reviews with admin approval workflow.

View →

Wishlist

Save products for later. Authenticated customers only.

View →

Preferences

Notification settings, language, and currency preferences per customer.

View →

Users & Analytics

Admin dashboards, revenue charts, staff roles, and unified user listing.

View →

Error Codes

All machine-readable error codes returned by the API with HTTP status mapping.

View →

Changelog

API version history and breaking changes.

View →