Audience: backend engineers. How payments execute, how providers confirm, and how the wallet is modelled.

Companion: business.md, surface-map.md, payroll/payment-pipeline.md.

From PaymentService.cs (6,479 lines), the provider services, wallet services, and enums in PayrollModel.cs / SystemModel.cs. ⚠️ VERIFY marks items to confirm.


1. Architectural shape

flowchart TB
  PIPE[Payment Schedules<br/>payroll disbursement] --> PS[PaymentService<br/>6,479 lines]
  WAL[WalletService / Employee / Admin / Control] --> PS
  PS --> PROV{Provider}
  PROV --> FW[Flutterwave]
  PROV --> PST[Paystack]
  PROV --> MON[Monnify]
  PROV --> VFD[VFD]
  PROV --> PADE[Pade Wallet]
  FW & PST -. webhook .-> HOOK[PayoutNotification handlers]
  HOOK --> PS
  PS --> REC[Reconciliation / status sync workers]

PaymentService orchestrates: build a payout → call the provider → persist a staging item → await the provider's webhook → mark success/failure → reconcile.

2. Payment execution

Initiating a payout:

Providers (PaymentProviderParams): Flutterwave (1), Paystack (2), Monnify (3), VFD (4). Each has a service (FlutterwaveService, PaystackService, PadeWalletService). Provider keys are configured as Direct Deposit Integration Settings (Secret Key / Public Key).

Confirmation is asynchronous — providers call back:

Status model (PayrollModel.cs): PaymentScheduleStatu, PaymentScheduleState, PaymentScheduleItemStatu, PaymentScheduleItemType — the staging→live item lifecycle (see payroll/payment-pipeline).

3. The wallet model