Skip to content

NFC Payments

The Keshless User App supports NFC-enabled payments through linked physical cards, allowing tap-to-pay functionality at supported terminals.

Overview

NFC (Near Field Communication) enables contactless payments using physical cards linked to the user's Keshless wallet.

┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐
│   Keshless      │     │   NFC Card      │     │   Vendor        │
│   Wallet        │────▶│   (Linked)      │────▶│   Terminal      │
└─────────────────┘     └─────────────────┘     └─────────────────┘

Card Types

Card TypeTechnologyUsage
Keshless CardNFC NTAGTap-to-pay at vendors
Bank CardEMVTraditional POS
Phone NFCHCEContactless payments

Linking a Card

┌─────────────────┐
│  Navigate to    │
│  Card Settings  │
└────────┬────────┘


┌─────────────────┐
│  Tap "Link New  │
│  Card"          │
└────────┬────────┘


┌─────────────────┐
│  Hold Card to   │
│  Phone NFC Area │
└────────┬────────┘


┌─────────────────┐
│  Enter Card PIN │
│  (if existing)  │
└────────┬────────┘


┌─────────────────┐
│  Set Card PIN   │
│  (4 digits)     │
└────────┬────────┘


┌─────────────────┐
│  Card Linked    │
│  Successfully   │
└─────────────────┘
  1. Check NFC availability on device
  2. Start NFC session
  3. Read card UID when tapped
  4. Register card UID with backend
  5. Set PIN for card

Card Management

Linked Cards View

The app displays all linked cards with:

  • Card nickname
  • Card type icon
  • Last 4 digits (masked)
  • Active/Blocked status
  • Default card indicator

Card Operations

OperationDescription
Set DefaultPrimary card for payments
BlockTemporarily disable card
UnblockRe-enable blocked card
Reset PINChange card PIN
RemoveUnlink card from wallet

Tap-to-Pay Process

Payment Flow

User taps card at vendor terminal


┌─────────────────┐
│ Terminal reads  │
│ card UID        │
└────────┬────────┘


┌─────────────────┐
│ Terminal sends  │
│ payment request │
└────────┬────────┘


┌─────────────────┐
│ API validates   │
│ card & balance  │
└────────┬────────┘


┌─────────────────┐
│ User enters PIN │
│ on terminal     │
└────────┬────────┘


┌─────────────────┐
│ Payment         │
│ processed       │
└────────┬────────┘


┌─────────────────┐
│ Notification    │
│ sent to user    │
└─────────────────┘

Transaction Limits

SettingLimit
Per tap (no PIN)E100
Per tap (with PIN)E2,000
Daily totalE5,000

Card Security

PIN Management

RequirementValue
PIN Length4 digits
PIN FormatNumeric only
HashingHashed before transmission

Blocking Rules

Cards are automatically blocked when:

  • 3 consecutive wrong PIN attempts
  • Suspicious transaction patterns
  • User reports lost/stolen
  • Account suspended

NFC Reading (Phone)

Users can read NFC cards to check balance or top up.

API Endpoints

EndpointMethodDescription
/cardsGETList linked cards
/cards/linkPOSTLink new card
/cards/:idDELETEUnlink card
/cards/:id/blockPOSTBlock card
/cards/:id/unblockPOSTUnblock card
/cards/:id/pinPOSTSet/reset PIN
/cards/:id/defaultPOSTSet as default

Error Handling

ErrorCauseAction
NFC_001NFC not availableEnable NFC
NFC_002Card read failedReposition card
NFC_003Card already linkedUse different card
NFC_004Card blockedContact support
NFC_005Invalid PINTry again (3 attempts)

Troubleshooting

Common Issues

IssueSolution
Card not detectedRemove phone case, hold steady
"NFC not available"Enable NFC in phone settings
Card read timeoutHold for 3+ seconds
Wrong card typeOnly Keshless NFC cards supported
FilePurpose
lib/screens/cards/cards_list_screen.dartCards list
lib/screens/cards/link_card_screen.dartLink card
lib/screens/cards/card_details_screen.dartCard details
lib/controllers/card_controller.dartCard controller
lib/services/nfc_service.dartNFC service
lib/services/card_service.dartCard service

Internal use only - Keshless Payment Platform