A contract map for engineering: distinguish compensation definitions, preview records, committed payroll and downstream payments before choosing an endpoint.

Data ownership

Store Payroll responsibility
TenantDb Compensation configuration, employee assignments/history, runs, items, changes, exemptions, reviews and payment schedules. Resolve organisation and company before querying.
MembershipDb Shared currencies, banks, providers and statutory organisations; not the employee payroll ledger.
WarehouseDb Denormalised reporting stores, including PayrollItemSummaryStore and PaymentScheduleItemStore. Synchronisation can lag; use tenant records for transactional investigation.

Entity relationships

Layer Records and contract
Definition Payband groups paygrades. Allowance, StatutoryBenefit and TaxRelief define reusable components. The UI requires a parent payband while backend PaybandId is optional in the copied contract; reconcile before enforcing a new rule.
Grade configuration PaygradeAllowance links allowance, BasisId, Value, IsNet, PayrollScheduleId and optional PayrollRemittanceId. PaygradeStatutoryBenefit carries DeductionValue, ContributionValue and VoluntaryDeductionAmount; PaygradeTaxRelief carries BasisId and Value. Preserve catalogue-versus-attachment differences noted in chapter 02.
Person assignment Person references the assigned grade; EmployeePaygradeHistory records effective windows. Do not substitute today's grade for an earlier period without the documented history rules.
Run Payroll owns type, status and distinct period/cut-off/run/pay dates; base or custom schedule identifies cadence. PayrollExemption records skipped people for that run.
Preview TempPayrollItem and TempPayrollItemSummary hold prepared lines and person totals. Prepare also changes working/Clone values, monitor and audit state; it is not a read-only operation.
Committed results PayrollItem contains an amount/type for a person; PayrollItemSummary rolls up gross, payables, deductions, tax, statutory, contributions and net per person/run. PayrollReview is separate from payment-schedule review.
Adjustments PayrollChange identifies person/group, type, status, frequency, payable/deduction catalogue and recurring schedule where applicable. PayrollChangeReview owns its approval trail. PayrollItem can reference originating EmployeeRequest or PaymentReversal.
Execution PaymentSchedule and its items carry downstream payment work. A payroll's status does not prove bank receipt. ConfirmationPayrollItem records the documented confirmation backfill path, whose activation remains unresolved.

Routine amounts are scheduled; Qualified amounts reflect eligibility/proration. *Clone columns are saved/display calculation values, not a complete historical evidence model. Exact nullability, precision, keys and unique constraints require the entity/EF definitions; this chapter does not invent a full schema.

Integers and flags

Catalogue Source values
Basis 1 percentage of gross; 2 fixed. OnDemandAllowanceBasis 1 instead means percentage of allowance.
Pay type / tax PayType 1 Salaried, 2 Time-based; TaxType 1 PAYE, 2 WHT. Preserve code spelling Witholding when matching identifiers.
Run type 1 Regular, 2 Off-cycle, 3 On-demand.
Payroll status New 1; Cancelled 2; Declined 3; Submitted 4; Approved 5; Processed 6; Processing 7. Code class: PayrollStatuParams. The isolated “3 Prepared” narrative is inconsistent, not an additional enum.
Change type 1 Bonus; 2 Deduction; 3 Payable; 4 Reimbursement; 5 PILON. Older PFPP type 6 processing exists but public creation is disabled in the documented model.
Change status / frequency Approved 1, Declined 2, New 3; One-off 1, Recurring 2. Do not reuse run status values.
On-demand scope 1 All Employees; 2 Specific Employees; 3 Confirmed Employees; 4 Unconfirmed Employees.

IsTaxExempted, IsIndependent, IsAmortized, IsNet and IsConfirmationDependent have separate effects; none is shorthand for all the others. Chapter 02 owns their calculation meaning.

HTTP surface

Routes below are relative to the API base recorded in the original reference, not an assertion of a current deployment URL.

Controller Verified route examples / responsibility
Admin/Payrolls POST Prepare, Submit, Cancel; POST Check_OnDemand_Payroll, Create_OnDemand_Payroll, Delete_OnDemand_Payroll.
Admin/Payrolls reads GET GetCurrentStatus, SelectPayrollRecords, GetPersonCount; SelectPayrollItemTakeHomeSummary and SelectPayrollItemCompanyCostSummary; corresponding explicitly documented Temp variants read preview totals.
Admin/Payrolls changes GET SelectPayrollChanges, SelectDeductionTypes, View/PayableTypes, SelectSkippedEmployees; POST CreatePayrollChangeFromPayroll. Template reads include View/Download_Bulk_Change_Upload_Form and View/Download_Bulk_Exemption_Upload_Form. Do not guess the matching import route.
Admin/Company Configuration, not run execution: SelectPaybands, GetPayband, Configure_Payband, Add_Payband, Update_Payband; SelectPaygrades, GetPaygrade, Update_Paygrade_Configuration, GetPaygradeSetupStatus. Analogous naming is not proof of every entity's exact route.
Admin/Payment_Schedules Process_Payment_Schedule, Retry_Failed_Payment(s), review and reversal families belong to ‣. Wildcard/plural shorthand in the source is not an exact callable signature.
Employee/Payslips GET View/Index, View/Consolidate_Payslips, GetPayrollYears. Payroll_Items exposes View/Payslip and explicitly listed admin/multiple variants.
Other controllers Payrolls provides non-admin reads; Payment_Schedules provides approver work; Admin/Benefits owns benefit enrolment.

Report routes include GET Admin/Payrolls/View/Report, Report_Preview, Report_Summary, Report_Variance and Download_Report. “What Employees Take Home” and “What Company Pays” are different summary views, not interchangeable totals.

Mutation and failure boundaries

Prepare dispatches regular/off-cycle processing into Temp; on-demand has its own path. Submit dispatches committed processing. Older prose describes a Temp-to-live copy, while the procedure catalogue describes calculation phases again: verify current input re-reading and preview acceptance before promising identical results. Cancel is not an undo of money already received.

PayrollMonitor serialises company-level prepare/submit work. Source SP codes commonly use positive success, 0 no-op, −2 busy and −3 no eligible people; negative codes remain procedure-specific and are not HTTP status codes. ApiResponseModel mapping, DTOs, validation fields, pagination, retry keys, concurrency behaviour and complete grants are not fully specified by the endpoint map. All mapped controllers use Authorize; employee/company row-level access still needs verification.

Contract checks still open

Resolve contradictory action/status guards, Submit semantics, tax-function signatures and review triggers, retro processor activation, confirmation/backfill, capping priorities, partial deduction recovery, cross-currency/time-based behaviour and safe import/retry contracts. Never infer idempotency or a legal tax rate from an example.

Sources and related chapters

Payroll — API reference (controller inspection recorded 2026-07-17); Payroll — glossary & data dictionary; Payroll — technical / engineering documentation. Source warnings remain applicable; this port did not execute endpoints or verify current production schemas.