Canonical documentation for Earned Wage Access — letting employees draw wages they have already earned before payday, with the advance recovered from the next payroll run and the employer invoiced for it.

Source of truth: core-backend-service source plus a live pass (Playwright, "Pade Demo" tenant, 2026-07-20; screenshots) including a network capture that establishes the service boundary.

⚠️ Read this first — the EWA product runs in a separate service

Every data call from every EWA admin screen goes to ewa-*.paidhr.com/v1/*:

Concern Service
Withdrawals, employees, invoices, policies, analytics EWA service (/v1/employer/*, /v1/employees, /v1/group-policies)
Enrolment config, control-panel approval, sync workers, payroll hook core-backend (this repo)

This repo's contribution is an integration client (EwaService, 147 lines — every method is an outbound call), the EwaConfigSetting record, an internal approve/decline flow, and two 30-second sync workers.

That same service also hosts the ATS (/v1/ats/*) — see Hiring RFD-001. Despite the name, ewa-*.paidhr.com is a multi-module "extended platform" service. (RFD-001)

Start with surface-map.md §1.


The documents

Doc Audience What it answers Status
surface-map.md Everyone Inventory, service split, routes, screens ✅ Done 2026-07-20
business.md PMs, QA, Support, HR What EWA is — enrolment, policies, withdrawal, recovery ✅ Done 2026-07-20
technical.md Engineers The split, entities, sync workers, payroll hook ✅ Done 2026-07-20
configuration.md Admins, Implementation Enrolment, policies, thresholds, approval ✅ Done 2026-07-20
glossary.md Everyone Data dictionary ✅ Done 2026-07-20
api-reference.md Engineers Endpoints per service + the external contract ✅ Done 2026-07-20
user-journey.md PMs, UX, Support Employer onboarding, employee withdrawal, payroll recovery ✅ Done 2026-07-20
how-to.md Admins Enable EWA, set policies, review withdrawals, pay invoices ✅ Done 2026-07-20
knowledge-base.md End users FAQ — how much can I take, fees, PIN ✅ Done 2026-07-20
runbook.md On-call / Ops Stuck sync, unenrolled employees, payroll blocked ✅ Done 2026-07-20
onboarding.md New engineers Ramp in — and where the code actually is ✅ Done 2026-07-20
rfds/ Engineers Design decisions ✅ Done 2026-07-20 (3 records)

The one-paragraph model

An organisation applies for EWA; the record is an EwaConfigSetting (MembershipDb) carrying the company's legal details and its withdrawal rules — can employees withdraw, the withdrawal stop day, whether approval is required, and who pays the fee. PaidHR staff approve or decline it from the internal control panel, then Set Up / Initialize pushes an employer record into the EWA service via EwaService.CreateEmployer. Employees are enrolled as EwaInitialization rows that a 30-second background worker pushes across; enrolled employees appear on the Employees screen with their bank account. An employee then withdraws against earned-to-date wages, bounded by an EWA policy (the General Policy allows 100% of earned wages with auto-approval; custom policies override it per group) — confirming with a PIN and paying a fee. Withdrawals flow back into EwaWithdrawal via the second 30-second worker, are recovered from the next payroll run (PayrollLedgerSync, Payroll_Status), and the employer is invoiced monthly (SettleInvoice).


Verification log

2026-07-20 — Code inventory + live pass (live pass ran first)

Established by network capture: every EWA admin screen's data comes from ewa-dev.paidhr.com — /v1/employer/withdrawals, /v1/employer/withdrawals/analytics, /v1/employees, /v1/employer/invoices, /v1/group-policies, /v1/employers/companies, /v1/integration/{host}. Nothing EWA-related was served by core-backend during the pass.

Route correction caught before writing: the nav label is Earned Wage Access but the routes are /dashboard/ewa/*; the intuitive /dashboard/earned-wage-access 404s.

Verified live: all five admin screens with real tenant data — Analytics (734 total / 18 registered employees, ₦268,561 withdrawn), Employees (registered vs unregistered, bank accounts), Withdrawals (statuses pending/declined, One Week/One Month/Custom filters), Invoice (Pending/Paid), and Policy Management (General Policy = All Employees, 100% of earned wages, Auto-Approval).