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 inPayrollModel.cs/SystemModel.cs.⚠️ VERIFYmarks items to confirm.
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.
Initiating a payout:
InitiateEmployeeBankPayout — send to a bank account (via provider).InitiateEmployeeWalletPayout — send to a Pade wallet.CreatePayrollPaymentSchedule, CreateCustomPaymentSchedule, plus Bulk{Retry,Reset,Reverse,Unreverse,Refresh,Review,UpdateDetail}PaymentScheduleItem.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:
FlutterwavePayoutNotification, Paystack payout notification (webhooks; the IntegrationController also has commented provider notification routes — active handling is in PaymentService).TransferStatuParams: successful / failed.Status model (PayrollModel.cs): PaymentScheduleStatu, PaymentScheduleState, PaymentScheduleItemStatu, PaymentScheduleItemType — the staging→live item lifecycle (see payroll/payment-pipeline).
WalletProductParams): Payout, Withdrawal, Invoice payment, Statutory payment, EWA repayment, Subscription, External Loan Repayment, Subscription VAT — the purpose of a wallet movement.WalletBeneficiaryTypeParams): individual / company.