Skip to main content

Non-Functional Requirements (NFR): Drop — Fintech Payment App

Non-Functional Requirements Specification (FRS)NFR): Drop — Fintech Payment App

Project: Drop — Remittance + QR Payments Version: 1.0 Date: 2026-02-23 Author: John (AI Director) Status: Approved Reviewers: Alem Bašić (CEO)

Document History

Version Date Author Changes
0.1 2026-02-23 John Initial draftdraft; basedtargets onfrom CLAUDE.md,security API-REFERENCE.md,audit DATABASE-SCHEMA.md+ business case

1. SystemNFR Overview

System Name: Drop — Fintech Payment App System Purpose: Drop is a PSD2 pass-through payment app for residents of Norway/Scandinavia. It enables international remittance (PISP bank transfer at 0.5% fee) and QR-code merchant payments (PISP at 1% fee) directly from users' Norwegian bank accounts — without holding any customer funds. Users are onboarded via Norwegian BankID (18+ required).

System Context Diagram:

graph TB
    subgraph "Drop Application"
        UI[Next.js Web App - 10 screens]
        API[Next.js API Routes - 26 endpoints]
        DB[(SQLite → PostgreSQL)]
    end
    U1[Consumer User] -->|BankID login| UI
    U2[Merchant User] -->|QR management| UI
    API -->|Reads/Writes| DB
    API -->|PISP payment initiation| BAAS[BaaS Provider - Swan/SpareBank1]
    API -->|AISP balance read| BAAS
    API -->|KYC verification| KYC[KYC Provider - Sumsub]
    BAAS -->|Open Banking| BANKS[Norwegian Banks - PSD2]
    BAAS -->|SCA| BANKID[BankID]
    API -->|Remittance corridors| CORRIDOR[30+ countries]

2. Actors & Personas

strongcustomerauthentication (SCA)integration
Actor IDCategory Actor# NameRequirements TypeHighest Priority DescriptionAccess LevelOwner
ACT-01Performance Consumer User6 HumanMust Have Norwegian residentJohn (18+)Tech sending money abroad or paying merchantsAuthenticated userLead)
ACT-02Scalability Merchant User4 HumanMust Have LocalJohn business/ owner accepting QR paymentsAuthenticated merchantDevOps
ACT-03Availability BaaS Provider6 SystemMust Have SwanJohn or/ SpareBank1 — Open Banking API (AISP/PISP)System integrationDevOps
ACT-04Security KYC Provider12 SystemCritical SumsubJohn + identitySecurity verification and AML screeningSystem integrationagent
ACT-05Reliability BankID5 SystemMust Have NorwegianJohn
Usability System5 Should HaveJohn (Designer)
Compatibility4Must HaveJohn
Maintainability5Should HaveJohn
Compliance8CriticalJohn + Legal
Data5Must HaveJohn

Persona Detail

Persona: Amir (Consumer)

  • Role: Software developer, immigrant from Bosnia
  • Goal: Send 3,000 NOK/month to his mother in Sarajevo cheaply and reliably; also pay at Ahmet's kebab shop
  • Pain Points: Western Union charges 10%; needs 2 separate apps for remittance and local payments
  • Tech Savviness: High
  • Frequency of Use: Weekly (remittance monthly; QR payments weekly)

Persona: Ahmet (Merchant)

  • Role: Owner of kebab shop in Oslo
  • Goal: Accept payments without Vipps terminal; lower fees; understand daily revenue
  • Pain Points: Vipps charges 1.75-2.75%; requires hardware terminal; fees eat into margins
  • Tech Savviness: Medium
  • Frequency of Use: Daily (receives 20-50 QR payments/day)

3.2. FunctionalPerformance Requirements

3.1 Module: Authentication & BankID Onboarding

Module Overview

User registration and login via Norwegian BankID SCA. Age (18+) and residency (Norway, +47 phone) verified. JWT tokens issued in httpOnly cookies. 3-step onboarding: BankID verification → OTP verification → PIN setup.


FR-001: User Registration (3-step onboarding)

to Interactive responsetime p95response
AttributeID ValueRequirementMetricTargetMeasurement ConditionsMethodPriority
ModuleNFR-P01 AuthenticationPage load time (initial)
Time
Priority< 3 seconds4G connection, cold cacheLighthouse Must Have
TraceNFR-P02 BR-001,API BR-002
UI Reference(standard) mockups/figma-make-export/src/components/Onboarding.js

Description: New users register via a 3-step flow: (1) personal details + BankID, (2) OTP verification via Norwegian phone number, (3) PIN setup. Users must be ≥18 years old (validated via BankID DOB). Norwegian phone (+47) required.

Acceptance Criteria:

  •  Given a valid email, password (≥8 chars), Norwegian phone (+47), and DOB ≥18 years, when user submits registration, then account is created and user proceeds to OTP step
  •  Given a user under 18 years old, when they submit registration, then system rejects with "Du må være minst 18 år"
  •  Given an already-registered email, when user tries to register, then system returns 409 "Email already in use"
  •  Given OTP is sent, when user enters correct 6-digit code, then user proceeds to PIN setup
  •  Given PIN setup, when user enters and confirms 4-digit PIN, then account is activated
  •  Given invalid email format, when user submits, then 422 validation error with specific field details

Data Requirements:

  • Input: email (unique), password (≥8 chars), first_name, last_name, phone (+47), date_of_birth
  • Output: user record (id, kyc_status=pending), JWT token in httpOnly cookie
  • Validation: email format (regex), password length, phone format, DOB ≥18

Business Rules: RUL-001, RUL-002, RUL-008

Dependencies: None


FR-002: User Login

load (200 concurrent users)APIresponsetime
AttributeValue
Moduletime Authentication< 500ms
Normal
PriorityAPM / k6 Must Have
TraceNFR-P03 BR-001
UI(bcrypt Referenceoperations) mockups/figma-make-export/src/components/Login.js

Description: Users log in with email + password. JWT token issued in httpOnly cookie (7-day expiry). Failed logins rate-limited.

Acceptance Criteria:

  •  Given valid email + password, when user submits login, then JWT cookie set and user redirected to dashboard
  •  Given invalid credentials, when user submits, then 401 "Invalid email or password" (no user enumeration)
  •  Given 10+ attempts from same IP in 1 minute, when user tries again, then 429 rate limitp95 response
  •  Given authenticated session idle for 7 days, when user makes request, then token expired; redirect to login

Data Requirements:

  • Input: email, password
  • Output: JWT in httpOnly cookie (SameSite=Strict); user object (id, email, role, kyc_status)
  • Validation: email format, password non-empty

Business Rules: RUL-001, RUL-002

Dependencies: FR-001


FR-003: Session Management + Logout

loadDatabasequery
AttributeValue
Moduletime Authentication< 1,000ms
Normal
PriorityBenchmark tests Must Have
TraceNFR-P04 BR-001

Description: Authenticated routes require valid JWT. Logout clears the cookie and revokes the session in the database. GET /api/auth/me returns current user.

Acceptance Criteria:

  •  Given authenticated user, when they call GET /api/auth/me, then current user object returned
  •  Given unauthenticated user, when they access protected route, then 401 Unauthorized
  •  Given authenticated user, when they POST /api/auth/logout, then cookie cleared and session revoked in DB

Business Rules: RUL-001

Dependencies: FR-002


3.2 Module: KYC Verification

Module Overview

Know-Your-Customer identity verification required before any transaction. In MVP: Sumsub integration (mocked in demo). Users with kyc_status=approved can transact; others are blocked with clear messaging.


FR-010: KYC Identity Verification

10ms (SELECT), < 20ms (INSERT)
AttributeValue
Moduletime KYCp95 query time
<
PriorityNormal loadapi-benchmarks.test.ts Must Have
TraceNFR-P05 BR-001, BR-002

Description: Users must complete KYC verification before initiating their first transaction. KYC status stored per user: pending → in_review → approved | rejected. In production: Sumsub document + biometric verification.

Acceptance Criteria:

  •  Given user with kyc_status=pending, when they attempt remittance, then 403 "KYC verification required" with link to complete
  •  Given approved user, when they initiate transaction, then transaction proceeds
  •  Given Sumsub webhook callback with approved status, when received, then user kyc_status updated to approved
  •  Given rejected user, when they attempt transaction, then 403 with rejection reason

Business Rules: RUL-008

Dependencies: FR-001


3.3 Module: Remittance (Send Money)

Module Overview

Core revenueWeb streamVitals: #1. Users send money to 30+ countries at 0.5% fee via PISP. The payment is initiated directly from the user's Norwegian bank account. Recipient receives bank transfer or cash pickup within 1-2 business days.


FR-020: Send Money — Remittance Flow

2.5 seconds concurrentratelimit
AttributeValue
ModuleLCP RemittanceLargest Contentful Paint
<
PriorityMobile, 4GLighthouse Must Have
TraceNFR-P06 BR-003,50 BR-005
UI Referencechecks mockups/figma-make-export/src/components/SendMoney.jsTotal time< 2,000ms total50 concurrent callsapi-benchmarks.test.tsShould Have

Description: Authenticated, KYC-approved users can send money to recipients in 30+ countries. Fee: 0.5% of transaction amount. Supported MVP corridors: NOK→RSD, NOK→BAM, NOK→PKR, NOK→TRY, NOK→PLN, NOK→EUR.

Acceptance Criteria:

  •  Given authenticated + KYC-approved user and valid recipient, when POST /api/transactions/remittance with amount 100-50,000 NOK, then 201 transaction created; fee calculated as amount × 0.005
  •  Given unauthenticated user, when they attempt remittance, then 401 Unauthorized
  •  Given user with insufficient balance, when they attempt remittance, then 402 "Insufficient balance"
  •  Given amount below 100 NOK or above 50,000 NOK, when user submits, then 400 validation error
  •  Given valid transaction, when completed, then transaction_history record created with status=completed, correct fee

Data Requirements:

  • Input: recipientId, amount (100-50,000 NOK), currency (RSD/BAM/PKR/TRY/PLN/EUR), note (optional)
  • Output: transaction_id, amount, fee (amount × 0.005), recipient_amount, status, created_at
  • Validation: amount range, recipientId exists, KYC approved, balance sufficient

Business Rules: RUL-003, RUL-005, RUL-007, RUL-008

Dependencies: FR-002, FR-010, FR-040 (recipients)


FR-021:

3. ExchangeScalability Rates

Requirements

sessions Databasemigration
AttributeID ValueRequirementMetricMVP TargetPhase 2 TargetMethodPriority
ModuleNFR-S01 RemittanceConcurrent users
Active
Priority200 users (SQLite limit)5,000+ users (PostgreSQL)Load testing Must Have
TraceNFR-S02 BR-003

Description: Current NOK exchange rates for all supported corridors. GET /api/rates returns all; GET /api/rates/[currency] returns specific rate.

Acceptance Criteria:

  •  Given GET /api/rates, when called, then returns all 6 NOK exchange rates (RSD, BAM, PKR, TRY, PLN, EUR)
  •  Given GET /api/rates/RSD, when called, then returns NOK→RSD rate
  •  Given GET /api/rates/XXX (invalid), when called, then 404 Not Found
  •  Given rate query, when currency code is lowercase, then case-insensitive match

Dependencies: None


FR-022: Recipients Management

at 200 concurrent APIrate
AttributeValue
Moduletrigger RemittanceConcurrent users
Migrate
PriorityPostgreSQL in Phase 2Monitoring Must Have
TraceNFR-S03 BR-003

Description: Users can add, list, and reuse recipients for remittance. Recipients have name, country, bank account / IBAN.

Acceptance Criteria:

  •  Given authenticated user, when POST /api/recipients with valid data, then recipient created and associated with user
  •  Given authenticated user, when GET /api/recipients, then all user's recipients returned
  •  Given IBAN provided, when validated, then reject invalid IBAN format
  •  Given unauthenticated user, when accessing recipients, then 401 Unauthorized

Business Rules: RUL-003

Dependencies: FR-002


3.4 Module: QR Payments (Merchant + Consumer)

Module Overview

Core revenue stream #2. Merchants generate QR codes via Drop; consumers scan and pay. 1% merchant fee. Settlement via daily batch payout to merchant bank account.


FR-030: QR Payment — Consumer Flow

req/min (auth), 60 req/min (general)
AttributeValue
Modulelimits QRMax Paymentsrequests per IP
10
PrioritySameRate limiter config Must Have
TraceNFR-S04 BR-004,Storage BR-005
UI Referencegrowth mockups/figma-make-export/src/components/ScanQR.jsDB size< 1GB on Fly.io persistent volumeManaged PostgreSQLStorage monitoringShould Have

Description: Consumer scans merchant's QR code → enters amount → confirms → payment initiated via PISP from bank account. Fee: 1% charged to merchant. Consumer sees confirmation; merchant receives push notification.

Acceptance Criteria:

  •  Given authenticated + KYC-approved user, when POST /api/transactions/qr-payment with valid merchantId and amount ≥1 NOK, then 201 transaction created; merchant fee calculated as amount × 0.01
  •  Given invalid merchantId, when user pays, then 404 "Merchant not found"
  •  Given amount < 1 NOK, when submitted, then 400 validation error
  •  Given missing merchantId, when submitted, then 400 validation error
  •  Given successful payment, when completed, then both user and merchant transaction records updated

Data Requirements:

  • Input: merchantId, amount (≥1 NOK), note (optional)
  • Output: transaction_id, amount, merchant_fee (amount × 0.01), status, merchant details
  • Validation: merchantId exists, amount ≥1, KYC approved, balance sufficient

Business Rules: RUL-003, RUL-006, RUL-008

Dependencies: FR-002, FR-010, FR-031


FR-031:

4. MerchantAvailability Registration + QR Generation

Requirements

99.5%
AttributeID ValueRequirementTargetPeriodExclusionsPriority
ModuleNFR-A01 QRSystem Paymentsuptime SLA
PriorityMonthly rollingScheduled maintenance (advance notice) Must Have
TraceNFR-A02 BR-004,Scheduled BR-006maintenance windowMax 4 hours/monthMonthlyTue-Thu 02:00-06:00 CET preferredMust Have
UI ReferenceNFR-A03 mockups/figma-make-export/src/components/MerchantDashboard.jsMaintenance notice lead time≥ 24 hoursPer eventEmergency patches: ASAP notifyMust Have
NFR-A04RPO (Recovery Point Objective)Max 24 hours data lossPer incidentDaily backup scheduleMust Have
NFR-A05RTO (Recovery Time Objective)System restored within 4 hoursPer incidentFor staging; production target 2 hoursMust Have
NFR-A06Database backupDaily automated backupOngoingFly.io persistent volumeMust Have

Description:SLA Merchants register their business (name, address, bank account) and receive a unique QR code. Self-service onboarding < 5 minutes.

Acceptance Criteria:

  •  Given authenticated user, when POST /api/merchants with valid business data, then merchant record created with unique QR code value
  •  Given merchant, when GET /api/merchants/me, then merchant details + QR code returned
  •  Given QR code, when scanned by Drop consumer app, then merchant identified and payment flow initiated

Business Rules: RUL-006

Dependencies: FR-002, FR-010


FR-032: Merchant Dashboard AnalyticsReference:

AttributeUptime % ValueMonthly Downtime
Module99.9% QR43.8 Paymentsminutes
99.5%3.6 hours
99.0%7.3 hours

5. Security Requirements

Context: Drop is a fintech app handling real money flows. Security is Critical priority. See security/drop-security-rapport.md for full audit (score: 57/100 pre-Phase 0.5; target: 80/100 post-hardening).

IDRequirementCategoryTarget / StandardMethodPriority
NFR-SEC01AuthenticationAuthJWT (jose library) in httpOnly cookie; SameSite=Strict; 7-day expiryCode review + auditMust Have
NFR-SEC02Password hashingAuthbcrypt, 12 rounds; NO SHA-256 fallbackauth.test.tsMust Have
NFR-SEC03JWT secretSecretsJWT_SECRET must be set via env var — fail fast if missingCode reviewMust Have
NFR-SEC04CSRF protectionInjectionCSRF middleware on all POST/PATCH/DELETE endpointsCode review + testMust Have
NFR-SEC05Rate limitingAbuse10 req/min on auth; 60/min general; persistent (DB-backed, not in-memory)middleware.test.tsMust Have
NFR-SEC06Input validationInjectionAll inputs sanitized server-side; parameterized SQL (no raw queries)validation.test.tsMust Have
NFR-SEC07XSS preventionInjectionCSP headers (script-src 'self'); no dangerouslySetInnerHTMLOWASP ZAPMust Have
NFR-SEC08Security headersHTTPHSTS, X-Frame-Options: DENY, X-Content-Type-Options: nosniff, CSPsecurityheaders.comMust Have
NFR-SEC09Card dataPCI-DSSNEVER store or return full card number or CVV; only last_four + token_refCode review + db.test.tsMust Have
NFR-SEC10Audit loggingComplianceAll auth events, transactions, KYC changes logged with user_id + IP + timestampCode reviewMust Have
NFR-SEC11Per-user transaction locksFinancialConcurrent transactions from same user serialised; no double-spendIntegration testMust Have
NFR-SEC12Penetration testingOperationsExternal pentest before production launchThird-party reportShould Have

6. Reliability Requirements

IDRequirementMetricTargetMethodPriority
NFR-R01Application error rate5xx errors / total requests< 0.1%MonitoringMust Have
NFR-R02Transaction integrityAtomic transactionsACID compliance; no partial updatesdb.test.tsMust Have
NFR-R03MTTRAverage recovery time< 4 hoursIncident logMust Have
NFR-R04Data integrityDatabase constraintsZero orphaned records; FK constraints enableddb.test.tsMust Have
NFR-R05Health checkSystem observabilityGET /api/health returns 200 with DB statusCI smoke testsMust Have

7. Usability Requirements

IDRequirementTargetMethodPriority
NFR-U01Onboarding completionNew user completes onboarding (3 steps) in < 3 minutesUsability testingMust Have
NFR-U02Remittance flow timeRegistered user sends money in < 2 minutesUsability testingMust Have
NFR-U03Mobile responsivenessFully functional on 375px–1440px (primary: 375-428px mobile)Manual + automatedMust Have
NFR-U04Error recoveryUser can recover from any form error without page reloadManual testingMust Have
NFR-U05LanguageNorwegian (primary) and English (secondary)Content auditShould Have

8. Compatibility Requirements

IDRequirementCategoryTargetPriority
NFR-C01Web browsersBrowserChrome 100+, Firefox 100+, Safari 16+, Edge 100+Must Have
NFR-C02Mobile browsersBrowserSafari iOS 15+, Chrome Android 100+ (primary platform)Must Have
NFR-C03Screen resolutionsResponsive375px (iPhone SE) to 1440px (desktop); mobile-firstMust Have
NFR-C04API versioningAPINext.js API Routes (no versioning in MVP); semantic versioning in Phase 2Should Have

9. Maintainability Requirements

Documentation
IDRequirementMetricTargetMethodPriority
NFR-M01Test coverage% code covered≥ 80% overall; 100% for auth + transaction pathsCI coverage (Vitest)Must Have
NFR-M02CI/CD pipelineDeployment frequencyBug fix to staging in < 30 minutes from mergeGitHub ActionsMust Have
NFR-M03Feature flagsFeature controlAll gated features controllable via env vars without redeployfeature-flags.test.ts Should Have
TraceNFR-M04 BR-011

Description: Merchants view transaction volume, revenue, and fees by time period (today/week/month).

Acceptance Criteria:

  •  Given authenticated merchant, when GET /api/merchants/dashboard?period=week, then total transactions, gross volume, fees earned returned
  •  Given invalid period, when queried, then defaults to today

Dependencies: FR-031


3.5 Module: Bank Accounts (AISP)

Module Overview

Read-only view of user's linked bank account balance via AISP (Open Banking). Drop never holds funds — balance displayed for user awareness only.


FR-040: Bank Account Balance View

API endpoints documented in docs/backend/API-REFERENCE.mdDependency
AttributeValue
Modulecurrency BankDoc Accountscoverage
All
PriorityDoc review Should Have
TraceNFR-M05 BR-010
UI Referencecurrency mockups/figma-make-export/src/components/BankAccounts.jsCVE exposure0 critical CVEs in production dependenciesnpm audit in CIMust Have

Description: Users view their linked bank account balance from their Norwegian bank via AISP. In MVP: mock balance from demo account. In Phase 2: real Open Banking AISP via BaaS provider.

Acceptance Criteria:

  •  Given authenticated user, when GET /api/bank-accounts, then linked bank account(s) with masked account number and balance returned
  •  Given user with no linked account, when viewing accounts, then prompt to link bank via BankID

Business Rules: RUL-003

Dependencies: FR-002, FR-010


3.6

10. Module:Compliance Transaction History

Module Overview

Users view all their transactions (remittance, QR payments) with filters by type, date, status.


FR-050: Transaction History

Requirements Norwegian
AttributeID ValueRegulationApplicabilityRequirementTechnical ImplementationPriority
ModuleNFR-COMP01 TransactionGDPR History(EU)Yes — Norwegian usersLawful basis; right to deletion; DPA with BaaS; 72h breach notificationData deletion API; audit logs; DPA contractMust Have
PriorityNFR-COMP02GDPR — Data minimisationYesCollect only data necessary for stated purposeBA review of DB schemaMust Have
NFR-COMP03PSD2 (EU)Yes — payment initiationPISP/AISP registration with Finanstilsynet; or operate under bank partner licenceFinanstilsynet registrationMust Have
NFR-COMP04AML / AMLD6Yes — money transferKYC verification before transaction; transaction monitoring; SAR capabilitySumsub integration; monitoring alertsMust Have
NFR-COMP05PCI-DSSPartial (cards feature)No card number/CVV storage; tokenisation onlylast_four + token_ref only; tokenisation via partnerMust Have
NFR-COMP06DORA (EU)YesICT risk management; incident reporting frameworkIncident report template; business continuity Should Have
TraceNFR-COMP07 BR-009
UI ReferencePersonvernloven mockups/figma-make-export/src/components/TransactionHistory.js

Description: Authenticated users view all transactions with pagination. Filterable by type (remittance/qr_payment) and date range.

Acceptance Criteria:

  •  Given authenticated user, when GET /api/transactions, then all user's transactions returned (most recent first)
  •  Given query params, when ?type=remittance, then filtered results returned
  •  Given unauthenticated user, when accessing transactions, then 401 Unauthorized

Dependencies: FR-002


3.7 Module: Notifications

Module Overview

Push notifications for transaction events. Users receive alerts for incoming/outgoing transactions.


FR-060: Transaction Notifications

NationalGDPRimplementation;
AttributeValue
ModuleYes Notifications
Prioritysame requirements ShouldLegal reviewMust Have
TraceNFR-COMP08 BR-008Financial licence disclaimer
Yes
NEVER use "banking" without licence disclaimer in UI UI Referencecopy review; /learning-opportunity on violations mockups/figma-make-export/src/components/Notifications.jsMust Have

Description: Users receive push notifications when transactions are created or completed. Notifications stored in DB and viewable in-app.

Acceptance Criteria:

  •  Given authenticated user, when GET /api/notifications, then all user's notifications returned (unread first)
  •  Given new transaction, when completed, then notification record created for relevant user(s)
  •  Given user marks notification as read, when PATCH /api/notifications/[id], then status updated

Dependencies: FR-020, FR-030


3.8 Module: User Profile & Settings

Module Overview

Users view and update their profile information, manage app preferences.


FR-070: User Profile

AttributeValue
ModuleProfile
PriorityShould Have
TraceBR-007
UI Referencemockups/figma-make-export/src/components/Profile.js

Description: Authenticated users view their profile details, update preferences, and initiate account deletion (GDPR right to erasure).

Acceptance Criteria:

  •  Given authenticated user, when GET /api/auth/me, then user profile returned (no password hash)
  •  Given authenticated user, when DELETE /api/user/account, then account deletion initiated per GDPR

Business Rules: RUL-007 (GDPR right to deletion)

Dependencies: FR-002


3.9 Module: Feature Flags

Module Overview

Feature flag system controls access to beta/future features without code deployment.


FR-080: Feature Flag Control

AttributeValue
ModuleFeature Flags
PriorityShould Have
TraceBR-014

Description: 8 feature flags control access to Cards (feature-flagged), Top-up (removed), and other future features. Controlled via environment variables.

Acceptance Criteria:

  •  Given FF_CARDS_ENABLED=false, when user accesses /cards, then 404-equivalent feature gate response
  •  Given FF_CARDS_ENABLED=true, when user accesses /cards, then full cards feature accessible
  •  Given GET /api/feature-flags, when called, then all 8 flags with current values returned

Business Rules: Cards feature requires card partner agreement (RUL-010)

Dependencies: None


4. Use Case Diagrams

4.1 Consumer User Use Cases

graph LR
    A1((Consumer)) --> UC1[FR-001: Register via BankID]
    A1 --> UC2[FR-002: Login]
    A1 --> UC3[FR-020: Send Money Remittance]
    A1 --> UC4[FR-030: Pay via QR Scan]
    A1 --> UC5[FR-040: View Bank Balance]
    A1 --> UC6[FR-050: View Transaction History]
    A1 --> UC7[FR-060: View Notifications]

4.2 Merchant User Use Cases

graph LR
    A2((Merchant)) --> UC1[FR-001: Register]
    A2 --> UC2[FR-031: Register Business + Get QR]
    A2 --> UC3[FR-032: View Dashboard Analytics]
    A2 --> UC4[FR-060: Receive Payment Notifications]

5. System Behavior Specifications

5.1 Error Handling

  • All errors return {error, message, details?} JSON format
  • Validation errors: 422 with details array listing per-field errors
  • Authentication errors: 401 (never reveal if email exists)
  • Rate limit errors: 429 with Retry-After header
  • No stack traces in production responses

5.211. Data Persistence

  • All mutations logged with user_id, ip, timestamp
  • Transaction records are immutable once created (status-only updates)
  • ACID compliance required for financial transactions

5.3 Session & State

  • JWT expiry: 7 days
  • httpOnly cookies (SameSite=Strict) prevent XSS token theft
  • CSRF protection on all state-changing endpoints (POST/PATCH/DELETE)

5.4 Notifications

  • In-app: all transaction events (create, complete, fail)
  • Push: Phase 2 (requires native mobile app)
  • Email: account registration, security alerts

5.5 Security Headers (Required)

  • HSTS, CSP, X-Frame-Options: DENY, X-Content-Type-Options: nosniff
  • Referrer-Policy: strict-origin-when-cross-origin

6. Requirements Summary Table

Data
ID Feature NameRequirement ModuleCategoryTargetImplementation PriorityStatusTrace
FR-001NFR-D01Data retention — user dataRetention User Registrationdata (3-stepdeleted onboarding)within 30 days of account deletion request AuthScheduled deletion job (GDPR Art.17) Must Have ImplementedBR-001, BR-002
FR-002NFR-D02 UserData Loginretention — audit logs AuthRetentionAudit logs: 5 years (AML requirement)Log rotation policy Must Have ImplementedBR-001
FR-003NFR-D03 SessionPII Managementfield + Logoutdocumentation AuthPrivacyAll PII fields identified in DATABASE-SCHEMA.mdData dictionary in docs/backend/ Must Have ImplementedBR-001
FR-010NFR-D04 KYCData Identityanonymisation Verification(non-prod) KYCPrivacyNo real user data in staging/dev environmentsSeed data only; no prod data migration Must Have Mock (prod pending)BR-001
FR-020NFR-D05 SendGDPR Moneydata — Remittanceexport RemittancePortability MustUser Havecan export their data (GDPR Art.20) Implemented BR-003,export BR-005
FR-021Exchange Rates APIRemittanceMust HaveImplementedBR-003
FR-022Recipients ManagementRemittanceMust HaveImplementedBR-003
FR-030QR Payment — ConsumerQR PaymentsMust HaveImplementedBR-004, BR-005
FR-031Merchant Registration + QRQR PaymentsMust HaveImplementedBR-004, BR-006
FR-032Merchant Dashboard AnalyticsQR Paymentsendpoint Should Have ImplementedBR-011
FR-040Bank Account Balance (AISP)Bank AccountsShould HaveMock (AISP pending)BR-010
FR-050Transaction HistoryHistoryShould HaveImplementedBR-009
FR-060Transaction NotificationsNotificationsShould HaveImplementedBR-008
FR-070User Profile + GDPR deletionProfileShould HaveImplementedBR-007
FR-080Feature Flag ControlFeature FlagsShould HaveImplementedBR-014

Requirements Count:

  • Must Have: 7
  • Should Have: 8
  • Could Have: 0
  • Won't Have (this release): Cards virtual/physical (BR-014), Loyalty rewards (BR-012)

7.12. TraceabilityNFR toTesting Business& RequirementsVerification Plan

Objective failed
FRNFR IDCategory FeatureTesting NameMethod Business Requirement (BR ID)Tools BusinessFrequency Pass (BO ID)Criteria
FR-001Performance UserBenchmark Registrationtests + load testing BR-001,api-benchmarks.test.ts, BR-002Lighthouse BO-02,Per BO-05sprint + pre-launchAll NFR-P targets met
FR-002Security UserSecurity Loginaudit + automated tests BR-001validation.test.ts, OWASP ZAP, external pentest BO-02Per sprint + pre-launchScore ≥ 80/100; no critical open
FR-010Availability KYCUptime Verificationmonitoring BR-001,Fly.io BR-007metrics, health endpoint BO-05Ongoing≥ 99.5% monthly
FR-020Compliance RemittanceLegal review + audit BR-003,Manual BR-005+ Sumsub BO-01,Pre-launch BO-02+ annualAll compliance items verified
FR-030Reliability QRUnit Payments+ integration tests BR-004,Vitest BR-005(db.test.ts) BO-01,Per BO-03
FR-031commit MerchantZero Registration BR-004,integrity BR-006BO-03
FR-040Bank Balance (AISP)BR-010BO-02tests

Full traceability matrix: [requirements-traceability-matrix.md](requirements-traceability-matrix.md)


Approval

Role Name Date Signature
Author John (AI Director) 2026-02-23 Approved (AI)
Tech Lead John 2026-02-23 Approved
Product OwnerJohn2026-02-23Approved
AI Director (John) John 2026-02-23 Approved
CEO (Alem) Alem Bašić TBD