Skip to main content
Closed beta: We’re still testing this API and it can change. If anything is unclear, let us know through your Kombo contact or support.
With the Write Deductions API you send deductions straight into your customers’ payroll tools. You schedule a batch with Kombo. Kombo saves it right away and tells you which pay run and deduction code each deduction will use. Kombo then writes the deductions to the payroll tool with its next regular sync. Until then, you can see every queued deduction and cancel the ones you don’t want anymore. After that, you can follow each deduction until a pay run has processed it.

How it works

1

Set up once in the dashboard

Create your deduction types, map them to deduction codes for each connection.
2

Schedule deductions

Call POST /payroll/one-time-deductions/schedule with up to 1,000 deductions. Kombo checks each one, saves it as , and tells you right away which pay run it goes into.
3

Kombo writes them with the next sync

With its next regular sync, Kombo writes each queued deduction into the pay run it picked. Each status changes to show the result, up to once a pay run picked it up.
4

Check and clean up

List your deductions to see what’s queued, written, processed, or failed. Cancel queued deductions you don’t want anymore, before Kombo writes them.
The whole flow, from your app through Kombo to the payroll tool:
Your app schedules deductions with Kombo and gets a result per item right away. With the next sync Kombo writes each queued deduction to the payroll tool. You list deductions to see their status and cancel the ones still queued or failed.

Step 1: Set up deduction types

You do this once in the Kombo dashboard, before you schedule anything.
  1. Create deduction types (once per environment). Add a fixed set of deduction types that match your product, each with a stable key, for example gym_membership. The keys are the same for all your customers. If your customer sets up their mapping that way, the payroll tool shows the label you give each type as the deduction’s description.
  2. Map them to deduction codes (per connection). For each connection, pick the deduction code in your customer’s payroll tool that each type should use, for example GYM01. The mapping also decides the currency.
  3. Choose if HR has to approve deductions (per connection). Some tools, like UKG, write deductions as pending, so HR approves them before payroll runs. Others, like DATEV, apply them right away. Kombo only shows this setting if the connected tool supports both.

Step 2: Schedule deductions

POST /payroll/one-time-deductions/schedule Send a list of items, with 1 to 1,000 items per request. Each item is one deduction for one employment. One request can mix employees from different pay groups and pay schedules: you never send a pay group, Kombo takes it from the employment. If you have more than 1,000 deductions, split them over several requests. The API reference has the full request with code samples.

The response

Kombo checks every item against what it already knows: the request format, the deduction type mapping, the employment, and your earlier origin_id values. Then it answers with one result per item, each with the origin_id you sent. The results don’t have to come back in the order you sent them, so match them by origin_id. Each result has either data or an error:
  • data is the saved deduction, in the same shape as the list endpoint. A new one is , already with its deduction_code and planned pay_run.
  • error means nothing was saved for this item, and the code says why (see Deduction errors). The other items in the request are still saved.
data means Kombo has your deduction, not the payroll tool. Kombo writes it with the next sync, and it can still fail there, for example if the payroll tool rejects it. Check the status afterwards (Step 4).

Avoiding double deductions

A deduction is real money taken from someone’s salary, and it’s hard to undo once payroll has run. That’s why every deduction needs an origin_id: your own stable ID for it, for example your invoice line per employee and month. Kombo matches origin_id per integration.
Safe to retry. If a request times out or you’re not sure it went through, send it again. Deductions Kombo already has come back as they are, so nothing is saved or written twice.
As long as it’s , cancel it and schedule it again with the new values. You can reuse the same origin_id, because the cancelled deduction was never deducted.
A deduction keeps its origin_id. Sending it again with the same values only returns the failed deduction, and with other values you get PAYROLL.ORIGIN_ID_CONFLICT. So cancel it first, then schedule it again with the same origin_id. Or use a new origin_id, and the failed one stays in the list as it is.
Use a new origin_id each month, for example inv-2026-11-emp-123 for November and inv-2026-12-emp-123 for December.

Step 3: Kombo writes them with the next sync

Kombo writes deductions with its regular sync, the same one that reads data from the payroll tool, by default every 3 hours. Each sync takes all deductions of the connection and writes them to the payroll tool. Kombo handles the tool’s rate limits and retries, so you don’t have to spread out your requests. After that, Kombo keeps reading each written deduction back with every sync until it’s processed, declined, or failed. Want them out sooner, for example right after your monthly billing run? Call POST /hris/force-sync to start a sync now. The sync doesn’t care which request a deduction came from. Say you send three requests with 100 deductions each: if all 300 are queued when the next sync starts, that one sync writes all 300. Deductions you schedule while a sync is already running wait for the next one. No deduction is written twice. Only one sync runs per connection at a time. While a sync writes, it locks the deductions it picked up, so they can’t be cancelled or picked up again halfway through. Everything you schedule waits as until the next sync. That’s your window to check the list and cancel anything that shouldn’t go out, before it reaches the payroll tool.

Deduction statuses

A deduction starts as QUEUED in Kombo. With the next sync it becomes PENDING_APPROVAL or PENDING in the payroll tool, or FAILED if the tool rejects it or Kombo misses the cutoff. PENDING_APPROVAL becomes PENDING when HR approves it or DECLINED when HR declines it. PENDING becomes PROCESSED after the pay run, or FAILED if HR removed it or the employee left. A QUEUED or FAILED deduction becomes CANCELLED when you cancel it with POST cancel.
How does Kombo know? The tool answers the write with an ID or an error, which gives , or . For everything after that, Kombo keeps reading the item back, for example a processed pending pay item in UKG. means a pay run picked the deduction up, not that the full amount was taken: if the employee didn’t earn enough, the payroll tool handles the rest, for example as arrears. In tools where Kombo can’t read this status, the deduction stays .
If Kombo can’t log in to the payroll tool, the sync fails and your deductions stay . They go out with the first sync after your customer reconnects, as long as their pay run’s cutoff hasn’t passed. Keep an eye on deductions that stay after a sync ran.

How Kombo picks the pay run

Pay schedules differ per pay group and per tool, and dates shift with month lengths and holidays. So you don’t send a date or a pay run. You send a rule, NEXT_AVAILABLE_PAY_RUN, and Kombo tells you in pay_run which pay run that is. Kombo picks it once, when you schedule, and never changes it afterwards. NEXT_AVAILABLE_PAY_RUN puts the deduction into the employee’s next regular pay run that still takes deductions. Off-cycle runs are never picked, so a deduction never lands on a bonus or correction run by accident.
  1. Kombo takes the pay group from the employment.
  2. From that pay group’s pay schedule, Kombo picks the next regular pay run.
  3. If that pay run is already past its cutoff, Kombo uses the one after it.
Kombo does this when it accepts the deduction, so pay_run shows the planned pay run right away. When the sync writes the deduction, Kombo only checks that this pay run still takes deductions. If it doesn’t, the deduction fails with PAYROLL.CUTOFF_MISSED instead of moving (see The cutoff). Every deduction gets its own pay run, so a request with employees on monthly and biweekly schedules just works.

The cutoff

The cutoff is the last day a pay run still takes deductions. Kombo takes it from the payroll tool, or from the connection settings if the tool doesn’t have one. Kombo makes sure it writes each deduction before the cutoff of its pay run. If the next regular sync would come too late, Kombo syncs earlier. Kombo never moves a deduction to another pay run on its own: pay_run stays what Kombo told you when you scheduled it.
The December pay run takes deductions until its cutoff on December 26. A deduction scheduled on December 14 is written with the next sync and goes into December. A deduction scheduled on December 28 is past the cutoff, so Kombo plans it for January right away.
If Kombo still can’t write it in time, for example because it can’t log in to the payroll tool until after the cutoff, the deduction becomes with PAYROLL.CUTOFF_MISSED. Nothing is taken. Cancel it and schedule it again: Kombo then plans it for the next pay run.

Step 4: Check and clean up

List deductions

GET /payroll/one-time-deductions See where your deductions are. Results are paginated like other Kombo list endpoints. Filters that take a list accept comma-separated values.

Cancel deductions

POST /payroll/one-time-deductions/cancel Cancel 1 to 1,000 deductions by origin_id. You can cancel a deduction that never got into a pay run: one that’s still , or one that . A cancelled deduction won’t be written, gets the status , and stays in the list. Its origin_id is free again. Like when scheduling, each result has either data (the deduction, now cancelled) or an error.
Once a deduction is , , , or , it’s in the payroll tool and Kombo can’t cancel it. That item comes back with an error with the code PAYROLL.DEDUCTION_ALREADY_WRITTEN. Ask your customer’s HR team to remove it in the payroll tool.
Safe to retry. Cancelling a deduction that’s already cancelled returns it in data again, still .
You can’t cancel while a sync is writing a deduction. The sync locks the deductions it’s writing, so that item comes back with PAYROLL.DEDUCTION_LOCKED. List the deduction once the sync is done: if it , you can cancel it then.

Errors

Rejected items and failed deductions carry an error with a code to build your logic on. Deduction errors lists every code, when you see it, and what to do.

Coming later: payslip checks

is the last status in the beta. Later, Kombo will also check the amount on the employee’s payslip. Payslip checks shows how that will work.

Schedule deductions

The full endpoint reference with every field.

Pay runs

See the pay runs and their pay periods.

Deduction errors

Every error code, when you see it, and what to do.