Client SDK
The Client SDK is the primary toolset for Automators — developers who automate payroll workflows, build tooling, and extend the platform. Typical Automators include DevOps engineers, tool builders, and automation specialists integrating PayrollEngine into CI/CD pipelines or LLM workflows.
The SDK is a .NET client library that wraps the REST API and provides higher-level abstractions for common tasks.
What You Can Do
| Task | Tool | Example |
|---|---|---|
| Import/export payroll data | Exchange | JSON and Excel regulation import |
| Run and validate payrun calculations | Test runners | Case-Test, Payrun-Test, Report-Test |
| Automate bulk operations | Bulk API + CLI | Load test setup, mass employee creation |
| Preview payrun results | Preview API | Single-employee calculation without persistence |
| Build custom CLI tools | CLI Extensions | Custom commands with .pecmd scripts |
| Integrate with LLM pipelines | SDK + CLI | Regulation generation, review automation |
| Develop and debug scripts | Scripting Runtime | Local C# script development |
SDK Components
| Component | Purpose |
|---|---|
Model |
API object model (based on Swagger schema), copyable and comparable, extensible by inheritance |
Service |
Typed access to all API endpoints, extensible by inheritance |
Exchange |
JSON and Excel import/export of payrolls and regulations |
Test |
Test runners for cases, payruns, and reports |
Function |
Templates for scripting function development |
Runtime |
Local scripting runtime for development and debugging |
Service API |
HTTP communication layer with the backend |
Runtime API |
Communication bridge between scripting runtime and Service API |
NuGet Packages
Packages are available on NuGet.org (recommended, no auth required) and GitHub Packages (requires GitHub PAT):
| Package | Purpose |
|---|---|
PayrollEngine.Client.Core |
Core client library |
PayrollEngine.Client.Services |
Client services for API access |
PayrollEngine.Client.Scripting |
Scripting runtime for local development |
PayrollEngine.Client.Test |
Test runner framework |
See Repositories for package source configuration.
Payroll Engine CLI
The Payroll Engine CLI (PayrollConsole) exposes SDK functionality as console commands and supports batch execution via .pecmd command files.
See Payroll Console for the full command reference, file type registration, and Docker usage.
Exchange Model
The Exchange Model contains all API objects for data exchange:
The exchange supports both full and partial payroll models. Processing classes handle the import/export sequence and provide direct object access.
Exchange Formats
| Format | Import | Export | Use Case |
|---|---|---|---|
| JSON | ✓ | ✓ | Full payroll exchange, regulations, test data |
| YAML | ✓ | ✓ | Human-readable alternative to JSON |
| Excel | ✓ | — | Regulation import (cases, wage types, lookups, etc.) |
| CSV | ✓ | — | Text table import |
Automation Patterns
CI/CD Integration
Use the Payroll Console in build pipelines to validate regulations on every commit:
PayrollConsole PayrunTest MyRegulation.pt.json
Load Testing
The built-in load test workflow scales any regulation template for performance testing:
1. LoadTestGenerate — create scaled exchange files
2. LoadTestSetup — bulk-import employees
3. LoadTestSetupCases — bulk-import case changes
4. PayrunLoadTest — execute and measure (outputs CSV with client and server timing)
LLM Pipeline
Combine SDK access with LLM capabilities for regulation automation: 1. LLM generates regulation JSON and C# scripts 2. SDK imports the regulation via Exchange 3. Test runners validate against expected results 4. Regulator reviews and approves
Docker
Pre-built Linux containers are available for Backend, PayrollConsole, and WebApp:
ghcr.io/payroll-engine/backend
ghcr.io/payroll-engine/payrollconsole
ghcr.io/payroll-engine/webapp
Pre-release images skip the :latest tag.
Web Application
The web application provides browser-based access to tenant, regulation, payrun, and report management.
See Web Application for features, configuration, and Docker usage.
Next Steps
- API Overview — all four APIs at a glance
- Testing — detailed test documentation
- Technical Integration — integration patterns
- Regulations — regulation object model
- Examples — payroll examples and demos
- Articles — blog posts and technical articles