Create a pay run
const url = 'https://api.usepayloom.com/api/v1/pay_runs';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"jurisdiction":"GH","period_start":"2026-04-15","period_end":"2026-04-15","pay_date":"2026-04-15","as_of_date":"2026-04-15"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.usepayloom.com/api/v1/pay_runs \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "jurisdiction": "GH", "period_start": "2026-04-15", "period_end": "2026-04-15", "pay_date": "2026-04-15", "as_of_date": "2026-04-15" }'Requires the payruns.run scope. The run is created in draft.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”A client-generated unique string (a UUID works). Retrying with the same key and body replays the original response instead of acting twice.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Example
GHThe date whose statutory rules price the run. Defaults to period_end.
Responses
Section titled “Responses”Created
object
Lifecycle is draft → (calculating →) calculated → approved → paid;
volume runs price in the background and read calculating
meanwhile. A paid run is
immutable; later corrections arrive as retro adjustments on the next
open run rather than by rewriting history.
The date whose statutory rules priced this run.
object
object
Integer amount in the currency’s minor unit. 50000 GHS = 500.00.
object
Integer amount in the currency’s minor unit. 50000 GHS = 500.00.
object
Integer amount in the currency’s minor unit. 50000 GHS = 500.00.
Sits ON TOP of gross — do not add it into gross.
object
Integer amount in the currency’s minor unit. 50000 GHS = 500.00.
Example
{ "object": "pay_run", "status": "draft", "totals": { "gross": { "currency": "GHS" }, "net": { "currency": "GHS" }, "employee_deductions": { "currency": "GHS" }, "employer_cost": { "currency": "GHS" } }}Missing, invalid, revoked or expired key.
object
object
object
Example
{ "error": { "code": "missing_token" }}The key is valid but lacks the required scope.
object
object
object
Example
{ "error": { "code": "missing_token" }}A request with this Idempotency-Key is still in progress.
object
object
object
Example
{ "error": { "code": "missing_token" }}Headers
Section titled “Headers”Validation failed, or the Idempotency-Key was reused for a different
request (idempotency_key_reuse).
object
object
object
Example
{ "error": { "code": "missing_token" }}