Skip to main content
A payroll moves through a series of statuses from creation to completion. This page covers what happens at each stage, the webhook events you’ll receive, and how multi-currency payrolls are handled.

Overview

Only 3 API calls needed — everything after approval is automatic.
1

Create a payroll

Select the worker type (employee/contractor) and create a payroll. POST /v1/payrolls → Webhook: payroll.created
2

Save entries

Provide the pay date, pay period, and compensation for each worker. POST /v1/payrolls/{id}/save → Webhook: payroll.status.updated (saved)
3

Approve

Approve the payroll to trigger fund collection and scheduling. POST /v1/payrolls/{id}/approve → Webhook: payroll.status.updated (approved)
For the full integration walkthrough, see Pay Workers via Payroll.

What Happens After Approval

Once you call POST /v1/payrolls/{id}/approve, the rest is automatic:

Balance Check

Cadana checks whether the business account has sufficient funds to cover the payroll.
  • Sufficient funds — the payroll moves to scheduled and is queued for the payroll date. Webhook: payroll.status.updated (scheduled)
  • Insufficient funds — the payroll moves to awaiting funds. If a bank account is connected, an ACH debit initiates automatically. Once the account is funded, the payroll proceeds — no need to re-approve.

Scheduling

If the payroll date is in the future, the payroll stays in scheduled until that date. If the payroll date is today or in the past, disbursement begins immediately.

Disbursement

On the payroll date, Cadana triggers disbursements for each worker. The payroll moves to processing. Each worker’s payment is handled independently — if one worker’s payment fails, the others continue. Webhook: payroll.status.updated (processing)

Completion

Once all disbursements are confirmed, the payroll moves to completed. Webhook: payroll.status.updated (completed) After completion, the payroll response includes an invoiceId. Fetch the invoice for a detailed breakdown of fees charged for the payroll run.
bash
curl -X GET 'https://api.cadanapay.com/v1/invoices/8dbaa174-b5a0-4396-8c87-77e746b50917' \
  -H 'Authorization: Bearer YOUR_API_KEY'

Status Reference

StatusMeaning
createdEmpty payroll shell, no entries yet
savedEntries added, ready for approval
approvedApproved — Cadana is checking the business balance
awaiting fundsInsufficient balance — payroll proceeds automatically once funded
scheduledFunds collected, queued for the payroll date
processingDisbursements being sent to workers
completedAll disbursements confirmed
deletedPayroll removed before processing started

Deleting a Payroll

You can delete a payroll at any point before it starts processing.
bash
curl -X DELETE 'https://api.cadanapay.com/v1/payrolls/a1b2c3d4-e5f6-7890-abcd-ef0123456789' \
  -H 'Authorization: Bearer YOUR_API_KEY'
Returns 204 on success. The payroll moves to deleted.
Once a payroll reaches processing or completed, it cannot be deleted.

Webhook Events

Cadana emits two payroll webhook event types. Subscribe via the Dashboard or see Webhooks for setup.

payroll.created

Fired when a new payroll is created.
JSON
{
  "id": "e13b9e14-c062-42ea-8563-8fc9223b29b5",
  "workerType": "CONTRACTOR",
  "type": "ONE_OFF",
  "tenantKey": "cad95193904"
}

payroll.status.updated

Fired on every status transition after creation. The status field tells you the new state.
JSON
{
  "id": "e13b9e14-c062-42ea-8563-8fc9223b29b5",
  "status": "completed",
  "tenantKey": "cad95193904"
}
Transitionstatus value
Entries savedsaved
Payroll approvedapproved
Funds collected, payroll queuedscheduled
Disbursements triggeredprocessing
All disbursements confirmedcompleted

Per-Worker Transaction Events

Each worker’s payment fires individual transaction events: transaction.initiated, transaction.succeeded, and transaction.failed. These let you track each worker’s payout independently of the overall payroll status. The transaction’s reference field contains the payrollId, and recipientId contains the worker’s personId (for direct bank payments) or wallet identifier (for Cadana wallet payments).
JSON
{
  "id": "9af0f05e-1efa-407b-be23-8595f89a1b2a",
  "amount": { "currency": "USD", "amount": 100000 },
  "type": "PAYROLL",
  "reference": "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
  "recipientId": "8ef9a712-cdae-4110-b1ea-9ba95abbee6e",
  "tenantKey": "cad95193904"
}
See Events for all event types and payload details.

Multi-Currency Payrolls

When a worker’s salary currency differs from the business’s funding currency (e.g., a US company paying a contractor in BRL), FX conversion is involved.

How It Works

1

FX rates captured at save time

Cadana captures FX rates and calculates the debit amount in the funding currency. Each entry stores its conversion rate individually.
2

Rates may refresh at disbursement time

If there’s a delay between save and disbursement (future payroll date, awaiting funds, etc.), rates may be refreshed with current market rates.
3

Debit amount may change

After a rate refresh, the total debit is recalculated. If the new amount exceeds the business balance, the payroll moves back to awaiting funds.
  1. Poll after save — check the debit amount on the payroll to understand the total cost in your funding currency.
  2. Fund with headroom — if your payroll date is days away, consider funding slightly above the quoted debit to absorb potential rate movement.
  3. Monitor awaiting funds — if a rate refresh causes the debit to exceed your balance, the payroll pauses until you top up.
bash
curl -X GET 'https://api.cadanapay.com/v1/payrolls/a1b2c3d4-e5f6-7890-abcd-ef0123456789' \
  -H 'Authorization: Bearer YOUR_API_KEY'

Edge Cases

Individual Worker Payment Fails

If one worker’s disbursement fails (e.g., invalid bank details), the other workers’ payments continue. The payroll still moves to completed once all disbursements are resolved. Use transaction.failed webhooks to identify which worker’s payment needs attention.

Multiple Payrolls Awaiting Funds

When multiple payrolls are in awaiting funds and the business adds funds, Cadana schedules them in priority order:
  1. Earliest payroll date first
  2. Creation time as a tiebreaker
Only payrolls fully coverable by the available balance move to scheduled. The rest remain in awaiting funds until more funds are added.

Payroll Stuck in Awaiting Funds

The payroll remains in awaiting funds indefinitely until the business account is funded. Once sufficient funds are available, the payroll proceeds automatically. See Fund Your Account for funding options.

Re-saving Before Approval

You can call save multiple times before approving. Each save replaces the previous entries entirely — there is no incremental add/remove of individual entries.

Next Steps