Skip to content

POS (Point of Sale)

The POS screen enables vendors to accept NFC card payments from Keshless users.

Overview

The vendor taps the customer's Keshless card on their phone to initiate a payment. The amount is deducted from the customer's wallet and credited to the vendor's account.

Payment Flow

┌─────────────────────────────────────────────────────────┐
│                    POS Payment Flow                      │
├─────────────────────────────────────────────────────────┤
│                                                          │
│  ┌─────────────┐     ┌─────────────┐     ┌─────────────┐│
│  │   Enter     │────▶│   Tap Card  │────▶│   Verify    ││
│  │   Amount    │     │   (NFC)     │     │   Customer  ││
│  └─────────────┘     └─────────────┘     └──────┬──────┘│
│                                                  │       │
│                                                  ▼       │
│  ┌─────────────┐     ┌─────────────┐     ┌─────────────┐│
│  │   Receipt   │◀────│   Success   │◀────│   Enter     ││
│  │   Screen    │     │             │     │   PIN       ││
│  └─────────────┘     └─────────────┘     └─────────────┘│
│                                                          │
└─────────────────────────────────────────────────────────┘

Step 1: Enter Amount

The vendor enters the payment amount using a numeric keypad.

Amount Validation

RuleLimit
MinimumE1
MaximumE10,000
Decimals2 places

Step 2: NFC Card Reading

After entering amount, the app waits for card tap:

NFC States

StateDisplay
WaitingAnimated NFC icon
Reading"Reading card..."
SuccessGreen checkmark
ErrorError message + retry

Process Flow

  1. Start NFC session
  2. Read card UID on tap
  3. Lookup card owner via API
  4. Check if PIN required (amount > E100)
  5. Proceed to PIN entry or process directly

Step 3: PIN Verification

For amounts over E100, customer enters PIN:

PIN Rules

SettingValue
PIN Length4 digits
Max Attempts3
Lockout15 minutes
PIN-free LimitE100

PIN Entry

  • Customer enters 4-digit PIN on vendor's device
  • PIN is hashed before transmission
  • On 3 failed attempts, card is locked

Step 4: Payment Success

Display confirmation and receipt:

  • Success animation
  • Amount displayed
  • Transaction reference
  • Receipt options

Receipt Options

OptionDescription
PrintBluetooth thermal printer
SMSSend to customer phone
ShareShare via apps
NoneSkip receipt

POS Service Methods

MethodDescription
lookupCard(cardUid)Get card owner info
verifyAndPay(cardUid, amount, pin)Process payment

API Endpoints

EndpointMethodDescription
/pos/lookupGETLookup card info
/pos/payPOSTProcess payment
/pos/verify-pinPOSTVerify PIN only
/pos/receipt/:idGETGet receipt data

Error Handling

ErrorCauseAction
POS_001Card not foundCheck card is Keshless
POS_002Insufficient fundsCustomer needs top-up
POS_003Card blockedContact support
POS_004Invalid PIN3 attempts max
POS_005Daily limit exceededTry tomorrow
POS_006NFC read failedReposition card
FilePurpose
lib/screens/pos/amount_entry_screen.dartAmount entry
lib/screens/pos/nfc_payment_screen.dartNFC payment
lib/screens/pos/pin_entry_screen.dartPIN entry
lib/screens/pos/payment_success_screen.dartPayment success
lib/controllers/pos_controller.dartPOS controller
lib/services/pos_service.dartPOS service
lib/services/nfc_service.dartNFC service

Internal use only - Keshless Payment Platform