# NexaPOS

**NexaPOS** is a modern, modular, and intelligent Point of Sale system designed for retail shops, supermarkets, wholesalers, pharmacies, restaurants, hotels, and other businesses that require reliable sales processing, inventory control, payment tracking, and real-time business visibility.

NexaPOS is being enhanced with deep **M-PESA payment integration**, including **STK Push**, **direct Till and Paybill payment capture**, **transaction reconciliation**, and future support for **B2C refunds** and **B2B supplier payments**. The system is also planned to support **KRA eTIMS integration** for compliant electronic invoicing and tax reporting.

---

## Table of Contents

1. [About NexaPOS](#about-nexapos)
2. [Core Objectives](#core-objectives)
3. [Key Features](#key-features)
4. [M-PESA Integration](#m-pesa-integration)
5. [Payment Workflows](#payment-workflows)
6. [Direct Till and Paybill Payments](#direct-till-and-paybill-payments)
7. [M-PESA Transaction Reconciliation](#m-pesa-transaction-reconciliation)
8. [Future B2C and B2B Support](#future-b2c-and-b2b-support)
9. [KRA eTIMS Integration Roadmap](#kra-etims-integration-roadmap)
10. [System Modules](#system-modules)
11. [Technical Architecture](#technical-architecture)
12. [Installation Overview](#installation-overview)
13. [Environment Configuration](#environment-configuration)
14. [Database Overview](#database-overview)
15. [Security Considerations](#security-considerations)
16. [Development Roadmap](#development-roadmap)
17. [Use Cases](#use-cases)
18. [Project Status](#project-status)
19. [Branding](#branding)
20. [License](#license)

---

# About NexaPOS

NexaPOS is a business-focused Point of Sale platform built to simplify daily sales operations while giving merchants a smarter way to manage payments, stock, customers, and financial records.

The system aims to serve both small and growing businesses by combining:

- Fast cashier operations
- Structured inventory management
- Multiple payment methods
- M-PESA-powered cashless transactions
- Accurate sales and payment reconciliation
- KRA eTIMS compliance readiness
- Modular business expansion

NexaPOS is not just a checkout screen. It is intended to become a complete retail and payment management platform.

---

# Core Objectives

NexaPOS is designed around the following goals:

- Provide a fast and reliable POS experience
- Support real-world Kenyan payment flows, especially M-PESA
- Reduce manual payment verification at the counter
- Automatically connect M-PESA payments to sales
- Support modern tax compliance through KRA eTIMS
- Offer scalable modules that can grow with business needs
- Maintain clear financial records and audit trails
- Improve transaction accuracy and reduce cashier errors

---

# Key Features

## Sales Management

- Create and process customer sales
- Add products to a cart
- Apply discounts where allowed
- Accept multiple payment types
- Print or generate receipts
- Track sales history
- Support walk-in customers
- Link sales to payment records

## Inventory Management

- Product registration
- Stock quantity tracking
- Category and subcategory management
- Purchase and stock adjustment support
- Low-stock monitoring
- Product pricing management
- Barcode-ready workflows

## Customer Management

- Walk-in customer support
- Customer profile records
- Customer purchase history
- Customer-specific transaction review

## Payment Management

- Cash payments
- Card payments, where configured
- Bank or transfer references, where applicable
- M-PESA STK Push
- Direct Till and Paybill payment recognition
- Manual transaction linking
- Automatic transaction reconciliation

## Reporting

- Daily sales reports
- Payment method summaries
- M-PESA transaction reports
- Pending and unlinked M-PESA payments
- Sales reconciliation reports
- Cashier transaction visibility
- Future tax and eTIMS-related reporting

---

# M-PESA Integration

A key direction of NexaPOS is its **native M-PESA integration**, designed specifically for Kenyan retail environments.

The M-PESA module is being built to support:

- STK Push collections
- Direct Till payment detection
- Direct Paybill payment detection
- Transaction callback processing
- Transaction status tracking
- Sale-to-payment matching
- Unlinked transaction queues
- Manual reconciliation where required
- Future modem/SMS ingestion for non-API transaction capture
- Future B2C and B2B transaction support

---

# Payment Workflows

## 1. STK Push Payment Flow

A cashier initiates an M-PESA payment from the POS.

### Flow

1. Customer completes shopping.
2. Cashier selects **M-PESA** as the payment method.
3. Cashier enters the customer’s phone number.
4. NexaPOS sends an **STK Push request**.
5. Customer receives a payment prompt on their phone.
6. Customer enters their M-PESA PIN.
7. M-PESA processes the payment.
8. NexaPOS receives the transaction result.
9. The payment is recorded and linked to the sale.
10. The sale is completed and a receipt may be issued.

### Expected Statuses

- Pending
- Successful
- Failed
- Cancelled
- Timeout

---

## 2. Direct Till Payment Flow

A customer may choose to pay directly from their phone using:

- **Lipa na M-PESA Buy Goods**
- **Till-to-Till payment**
- Other supported business till flows

### Flow

1. Customer sends money directly to the merchant’s Till Number.
2. The payment reaches the merchant’s Till account.
3. NexaPOS detects or imports the payment through the configured collection channel.
4. The payment appears in the **Unlinked M-PESA Transactions** list.
5. The cashier selects the correct transaction and links it to the current sale.
6. The sale is completed once payment is confirmed.

---

## 3. Direct Paybill Payment Flow

For businesses using Paybill:

1. Customer selects **Pay Bill** on their phone.
2. Customer enters:
   - Business Number
   - Account Number, if required
   - Amount
3. Payment is processed by M-PESA.
4. NexaPOS records or imports the transaction.
5. The transaction is matched or manually linked to a sale.

---

# Direct Till and Paybill Payments

NexaPOS is being designed to account for payments that are not initiated from inside the POS.

This is important because many customers may:

- Pay before the cashier initiates STK
- Prefer manually paying through the M-PESA menu
- Send funds through Till-to-Till workflows
- Use Paybill flows depending on the merchant’s setup

## Till-Based Collection Concept

In a Till-based business setup:

- The **Till Number** is the public payment number used by customers.
- The payment belongs to the merchant’s business Till account.
- The **Nominated Number** is the business-side phone number linked to operating that Till and managing its funds.

In NexaPOS configuration, we may store:

- Till Number
- Business Shortcode, where applicable
- Nominated Phone Number
- Store/branch reference
- Collection type
- Callback configuration
- API credentials where applicable

This ensures the POS recognizes which merchant account a transaction belongs to.

---

# M-PESA Transaction Reconciliation

A major part of NexaPOS M-PESA functionality is **reconciliation**.

## Why Reconciliation Matters

Not every M-PESA payment will automatically map to a sale. Some payments may:

- Arrive before a sale is finalized
- Be made manually from the customer’s phone
- Be duplicated or retried
- Have delays before confirmation
- Need cashier verification before use

## Reconciliation Features

The system is designed to support:

- A list of successful but unlinked M-PESA transactions
- Payment search by:
  - Receipt number
  - Phone number
  - Amount
  - Payer name
  - Time/date
- Manual linking of a transaction to a sale
- Prevention of one transaction being used twice
- Linking transactions to:
  - Sale transaction
  - Payment record
- Audit trail for linked transactions

## Example Reconciliation Scenario

A customer pays **KES 1,500** directly to the merchant Till.

The transaction arrives in NexaPOS as:

- Receipt number
- Amount
- Phone number
- Payer name
- Transaction date
- Status: successful
- Sale link: empty

The cashier opens the sale, selects the transaction, and links it.  
NexaPOS then marks it as used and records it against that sale.

---

# Future B2C and B2B Support

NexaPOS is also planned to support outbound M-PESA transactions.

## B2C — Business to Customer

B2C can be used for:

- Customer refunds
- Overpayment refunds
- Cancelled order refunds
- Cashback payouts
- Other approved disbursements

### Possible POS Refund Flow

1. Cashier or authorized manager opens the original sale.
2. System validates that a refund is allowed.
3. User selects **Refund via M-PESA**.
4. Customer phone number and amount are confirmed.
5. NexaPOS initiates a B2C disbursement.
6. Callback status updates the refund record.
7. Refund is marked as:
   - Pending
   - Successful
   - Failed

---

## B2B — Business to Business

B2B can support:

- Supplier payments
- Distributor settlements
- Inter-business payments
- Branch-to-branch fund transfers where applicable

This functionality fits best within:

- Supplier Management
- Purchase Management
- Accounts Payable
- Expense Approval Workflows

---

# KRA eTIMS Integration Roadmap

NexaPOS is intended to support **KRA eTIMS** integration for compliant sales invoicing and tax reporting.

The planned eTIMS layer may include:

- Electronic tax invoice generation
- Tax item mapping
- Buyer PIN support where required
- Invoice validation before transmission
- Submission of sales data to eTIMS-compatible endpoints
- Storage of returned invoice references
- Printable receipts with tax-compliant invoice details
- Error handling and retry queues
- Offline-safe or delayed submission logic where implementation allows

## Future eTIMS Module Direction

The eTIMS functionality is planned as a dedicated installable module so that it can be:

- Enabled only for merchants who need it
- Maintained independently
- Updated without affecting the full POS core
- Adapted as compliance requirements evolve

---

# System Modules

NexaPOS is expected to support the following major modules:

## Core POS

- Checkout
- Product scanning
- Cart management
- Receipt generation
- Payment capture

## Products and Inventory

- Items
- Categories
- Units
- Stock adjustments
- Opening stock
- Purchase restocking

## Sales and Payments

- Sales history
- Payment records
- M-PESA transactions
- Refund management
- Reconciliation queue

## Customers

- Customer records
- Customer purchase history
- Optional credit or account support in future

## Suppliers and Purchases

- Supplier registration
- Purchase orders
- Stock receiving
- Supplier payments
- Future B2B integration

## Reports

- Sales reports
- Stock reports
- Payment summaries
- M-PESA reconciliation reports
- Tax and eTIMS-oriented reporting

## Settings

- Business profile
- Branches
- Cashier/users
- Receipt settings
- M-PESA configuration
- eTIMS settings
- Security settings

---

# Technical Architecture

NexaPOS is being structured as a modular system where integrations can be added without disrupting the core business workflow.

## Current Integration Focus

- M-PESA payment module
- Transaction callback handling
- Direct payment transaction import
- POS sale linking
- Database-driven transaction reconciliation

## Planned Integration Focus

- KRA eTIMS module
- Airtel Money support
- Modem-based transaction capture
- B2C and B2B M-PESA payment workflows
- Extended dashboard analytics

---

# Installation Overview

The exact installation flow depends on the deployment environment and final packaging, but the general setup includes:

1. Clone or deploy the NexaPOS source code.
2. Configure the application environment.
3. Configure the database.
4. Run migrations where applicable.
5. Set up payment modules.
6. Add merchant M-PESA credentials and Till/Paybill details.
7. Configure webhook/callback URLs.
8. Test STK Push flow.
9. Test transaction callback handling.
10. Validate direct payment reconciliation.

---

SYSTEM BY : EDIX SYSTEMS & SOLUTIONS
PHONE       +254742784550
EMAIL       info@edixsystems.co.ke
POS URL     nexapos.edixsystems.co.ke
CO. WEBSITE edixsystems.co.ke

COMPILED BY : DANCUN AKATU
                DIRECTOR-EDIX SYSTEMS