Data dictionary. Source: the Ewa* entities (MembershipDb), EwaApiModel.cs, EwaService, plus the live /v1/* surface.
| Term | Definition |
|---|---|
| Earned Wage Access (EWA) | Drawing wages already earned in the current period, before payday. Not a loan against future work. |
| Earned-to-date | The wages accrued so far this period — the ceiling on any withdrawal. |
| Withdrawal | A single early draw against earned wages, carrying a fee. |
| Fee payer | Who bears the fee — employee or employer. |
| Withdrawal stop day | Day of month after which withdrawals close, so payroll can compute a stable recovery. |
| Threshold | The share of earned wages a policy allows (e.g. 100% of earned wages). |
| Registered / Unregistered | Whether an employee is enrolled with the provider. Needs bank details. |
| Recovery | Deducting the advance from the next payroll run. |
| Employer invoice | The monthly bill to the company for withdrawals + fees. |
| Entity | Purpose | Key fields |
|---|---|---|
EwaConfigSetting |
The company's EWA enrolment + rules | EwaId (external), OrganisationId, CompanyId, EwaConfigSettingStatusId, RegisteredName, RegistrationNumber, TaxIdentificationNumber, Email, Phone, FullAddress, CanEmployeesWithdraw, WithdrawalStopDay, IsApprovalRequired, IsTermsAccepted |
EwaConfigSettingStatus |
Application status lookup | EwaConfigSettingStatusId, Description |
EwaApprover |
Named withdrawal approver | EwaConfigSettingId, FirstName, LastName, Email |
EwaInitialization |
An employee enrolment pending push | EwaId, UserKey, CompanyKey, Status, IsSynchronized |
EwaWithdrawal |
A withdrawal pulled back from the provider | ReferenceNumber, UserKey, CompanyKey, Amount, Fee, FeePayer, IsSynchronized, CreatedAt |
UserKey/CompanyKeyare cross-system correlation keys (not FK ids) — use them when debugging against the provider.IsSynchronizedis the local↔provider contract; a stuck flag is the first thing to check.
EwaApiModel.cs)CreateEwaEmployerRequest:
| Group | Fields |
|---|---|
| user | firstName, lastName, email, gender, phoneNumber, padeUserId |
| company | name, address, withdrawalPercent, rcNumber, tinNumber, employeesCanWithdraw, phoneNumber, payrollDayOfMonth, stopWithdrawalDayOfMonth, withdrawalFeePayer, approvalRequired, padeCompanyId, padeParentCompanyId |
| employee | the enrolling employee |
Response: CreateEwaEmployerResponse { success, code, message, data }.
| Where | Values |
|---|---|
| Withdrawal | pending · declined (+ approved/paid on the happy path) |
| Invoice | Pending · Paid |
| Employee | Registered YES/NO · Status Active |
| Host | Serves |
|---|---|
ewa-*.paidhr.com |
The EWA product — /v1/employees, /v1/employer/withdrawals, /v1/employer/withdrawals/analytics, /v1/employer/invoices, /v1/group-policies, /v1/employers/companies, /v1/integration/{host}. Also hosts /v1/ats/* for Hiring. |
| core-backend (this repo) | Integration client, config, control-panel approval, sync workers, payroll hook |
| Component | Owns |
| --- | --- |
EwaService (147) |
Outbound calls — CreateEmployer, CreateEmployee, CreateBulkEmployees, UpdateBulkEmployees, CreateExternalLoanRequest, PayrollLedgerSync, SettleInvoice, UpdateEwaWithdrawalApproval, Payroll_Status |
ControlEwaService (297) |
Select, Get_Details, Approve, Decline, SetUp, Initialize, Sync, Update |
EwaEmployeeSynchronizationService (118) |
30s worker — push enrolments |
EwaWithdrawalSynchronizationService (118) |
30s worker — pull withdrawals |
| Screen | Route |
|---|---|
| Analytics · Employees · Withdrawals · Payment · Policy Management | /dashboard/ewa/{analytics,employees,withdrawals,invoice,policy-management} |
| Employee side | wallet/earned-wage-access/{overview,withdrawal,pin,transactions} |
(/dashboard/earned-wage-access 404s — label ≠ route.)
JWT claims ewaid, companyewaid; EWA Admin = admin tier 157. See Identity.