Appearance
5. Set for payment
Committing is where editing stops and paying starts:
- Every calculation in the payroll, and the payroll itself, moves to
paymentStarted. - Salaxy generates the invoices — you never create them. The worker's
netinvoice is released to the payment channel asunread; the periodictaxandunioninvoices are prepared aspreview. - From here the payment moves on in the payment channel, and you follow it through statuses — step 6.
Examples use the test environment (test-secure.salaxy.com); see Environments for demo and production.
The endpoints
| Method | Endpoint | Does |
|---|---|---|
POST | /v03/api/payroll/validate | Pre-check: returns per-calculation validation errors |
POST | /v03/api/invoices/create-for-payroll/{channel}/{payrollId} | Commits the whole payroll. Returns the generated invoices |
POST | /v03/api/invoices/create-by-id/{channel} | Commits only some calculations — body: an array of calculation ids, e.g. to re-submit one after a cancellation |
channel— the payment channel code:palkkausManualin this guide; a real integration uses the channel provisioned for it.- Prefer
create-for-payrollfor the normal case:create-by-iddoes not validate or stamp dates on the payroll as a whole.
The commit returns the generated invoices, trimmed here — the worker's net invoice released to the channel, and a periodic tax invoice in preview:
json
[
{
"id": "<invoice id>",
"header": { "type": "net", "status": "unread", "payrollId": "<payroll id>" }
},
{
"id": "<invoice id>",
"header": { "type": "tax", "status": "preview", "payrollId": "<payroll id>" }
}
]Save for the next step
- The calculation ids from step 4 — the calculation is what you follow in step 6, not the invoice.
- If you run the payment channel yourself, the invoices are what it pays: see Payroll lifecycle and statuses.
What can be committed
- The payroll must validate. Every calculation must be ready for payment —
info.isReadyForPaymentistrueon the saved payroll. If it is not, the commit returns 400 witherrorandmessageHtml(localised texts). Validate first:payroll/validategives the per-calculation errors that the 400 body does not. - Calculations commit from their editable statuses:
draft,payrollDraft,proDraft,waitingApproval,sharedApproved. ApaymentStartedcalculation cannot be committed again, and apaymentSucceededone is never paid twice — corrections to paid salaries go through Salaxy support.
For the whole flow after this point — invoices, timings, cancelling — see Payroll lifecycle and statuses.
Check
- You validated the payroll before committing.
- After the commit, the payroll and its calculations are
paymentStarted, and the response lists the generated invoices. - Your code never commits the same payroll twice without checking its status first.
Runnable sample
The interactive version of this step — sign in and run it against your test account — is on the current developer site: set for payment. The runnable samples stay there; the steps and endpoints are here.

