Prepare a pay run
Creates the draft run for period and computes one line per person who is active, on_leave (paid)
or starting on or before the pay date. People starting after the pay date are not included; people whose
start date falls in the period are included but included: false by default, so you decide. Lines use
current pay items and enabled deductions; drafts are recomputed whenever those change.
A pay run creates a money-moving object, so Idempotency-Key is required. 409 duplicate_resource if a
run for that period already exists and is not canceled.
Error codes: invalid_api_key, parameter_invalid, parameter_missing, scope_missing, csrf_token_invalid, idempotency_key_reused, duplicate_resource, schedule_in_past, net_pay_negative, rate_limited.
Authorizations
Server API key, scoped. pk_test_ keys hit the sandbox tenant.
Headers
Required on money-moving POSTs. Same key + same body replays the first response; same key + different body returns 409 idempotency_key_reused. Kept 7 days.
1 - 255Optional client correlation id, up to 128 characters. It is not echoed: the response's X-Request-Id is always
our own req_… id. We log your value with the request as client_request_id, so support can find a request by
either id. A longer value is refused with 400 parameter_invalid.
128Body
Response
The draft run with its lines.
A month's pay run (run_…).
run_…
Always pay_run.
"pay_run"RFC 3339, UTC.
"2026-10-27T08:41:00Z"
RFC 3339, UTC.
"2026-10-27T08:41:00Z"
Pay month.
^\d{4}-\d{2}$"November 2026 pay run".
Calendar date, interpreted in Africa/Lagos.
"2026-11-07"
CONVENTIONS §8 lifecycle: draft → pending_approval (second approver) → scheduled (waits for pay day)
→ processing → completed | failed; rejected by the second approver; canceled from draft,
pending_approval or scheduled. UI: completed → "Paid". Pay runs are never reversed.
draft, pending_approval, scheduled, processing, completed, failed, rejected, canceled, reversed pay_day: pays on pay_date once approved. now: pays as soon as it is fully approved.
pay_day, now Narration on every salary transfer ("Salary Nov 2026").
One of the business's own PanoFlow accounts (owned by the Accounts service).
Totals over included lines. gross − deductions = net, always.
Net is above second_approval_threshold.
Approve by this time to pay on pay_date ("26 Nov, 4pm").
"2026-10-27T08:41:00Z"
Sub-state.
awaiting_second_approval, awaiting_pay_day, awaiting_execution, changed_after_approval, some_lines_failed, rejected_by_approver Deduction totals by type, with where each goes. Stays in the source account; PanoFlow does not remit them.
Whether the source account covers the run, worked out at read time. Absent once executing.
An amount in minor units (kobo, cents) with its currency. Never a decimal.
The pending or decided approval (kind is pay_run), when one was needed.
Everyone who approved, in order ("Approved by Adaeze Okafor and Tolu Martins").
Who did something. Shown in activity, approvals and the audit log.
RFC 3339, UTC.
"2026-10-27T08:41:00Z"
RFC 3339, UTC.
"2026-10-27T08:41:00Z"
One per person. Returned by getPayRun and run actions; omitted from lists.