Keep your own records, not ours
Most payroll APIs make you store their IDs, track their pay periods, and remember which run is open before you can send anything. Flow Payroll does that work for you.Use your own IDs
Send the identifier your system already uses. You never need a lookup table from your IDs to ours.
The only Flow Payroll ID you send on every request is the organisation ID in
X-Org-Id (see Authentication). Look it up from your own externalId when you need it. Pay elements are the only other set-up you map once: each line names the pay element it pays through.
Send a date, not a pay run
A pay line carries adate, not a pay run, period number or tax year. Flow Payroll works out which pay run the line belongs to:
- A date in an open period lands in that period’s pay run.
- A date in a period that is already locked lands on the day after the last locked period, so it is paid in the next open run instead of being rejected.
- The response gives the date Flow Payroll used as
payrollDate, so you can see where each line went.
POST /payroll/line/{employeeId}
canEdit: false makes a line yours. Only the integration that created it can change it. Nobody else can, in the app or through the API.
Open the next pay run in one call
POST /payroll/{payrollConfigId}/next opens the next pay run for a pay schedule, picking the period that follows the last one. Send paymentDateOverride to move the pay day for that run. Subscribe to payroll_run.opened to hear when a run opens, whoever opened it.
Send it again safely
Integrations retry, so the API is built for it:- A pay line sent again with the same
idreplaces the earlier version. If its period is already locked, the request answers409and nothing is written. PUT /employees/{employeeId}/working-schedulemerges rota weeks by week-commencing date, so sending the same week twice does not duplicate it.POST /organisationsandPOST /organisations/bulkaccept anIdempotency-Keyheader, so a retry after a lost response cannot create a second organisation.
Listen instead of polling
Webhooks tell your system the moment a payslip is created or finalised, an employee changes, a pay run locks, or HMRC accepts an FPS. One account-wide endpoint covers every organisation you manage.Use only the modules you need
Flow Payroll is modular. Pay, salary, statutory pay, pensions, court orders, holiday, payments, journals, reports and webhooks each have their own API, listed in the introduction. Start with one and add others later, or keep doing some of the work in your own system and send the result as pay lines. Each module takes your own data and settings:- Pay elements you define, for any pay or deduction your business has.
- Pay lines your system owns, with tags carried onto the payslip.
- Roles of your own for each person and token.
- Report definitions for any question about your data.
- Your brand, email wording and support desk.
Integration patterns
Pick the pattern closest to your product. You can combine them, for example an HR system that owns employee records alongside a rota tool that sends hours.1. CSV with saved mappings
No code. Export from any system as-is and import in one click.
2. HR system of record
Your HR platform owns people and salaries. Payroll can’t overwrite them.
3. Shifts, agencies and workforce management
Send each shift as it happens and see pay update throughout the period.
4. Embedded payroll
You own the interface. Flow Payroll runs underneath, under your brand.
1. CSV with saved mappings
For: teams without developers, systems without an API, and moving from another payroll provider. Export a file from your HR platform, rota tool or old payroll software exactly as it comes out. The CSV importer maps your columns to Flow Payroll’s fields. Save the mapping once and every later export from the same system is recognised automatically.
- Import employees, payments, pay elements, journal templates and statutory payments with the same wizard.
- Moving payroll provider? The onboarding data templates and a parallel run take you through it.
- Move to the API one area at a time later. CSV and API data live side by side.
2. HR system of record
For: HR and people platforms that want payroll to follow their data, never the other way round. Your platform stays the single source of truth for people, salaries and working patterns. Flow Payroll runs payroll from what you send, and payroll staff can’t change the details you own.1
Create organisations and people from your platform
Add each customer with
POST /organisations, setting your own externalId and an Idempotency-Key. Give people access with POST /users or provision them from your identity provider through SCIM, each with your externalId. If your account signs people in through your identity provider, they sign in with single sign-on.2
Connect with an HR integration token
Issue an API token with the HR integration role. It adds new starters and keeps employee details, payroll details, working patterns, organisation details and people up to date. Use HR sync for a token that shouldn’t manage people.
3
Send employees under your own IDs
Create each employee with
POST /employees, using your employee ID as id. Record pay changes with PUT /employees/{employeeId}/salary, effective-dated so mid-period changes are pro-rated. Record leavers with PUT /employees/{employeeId}/leaver. If you only hold HR details, save the employee without a payrollConfigId. They wait until the payroll team adds the payroll details.4
Stop details being changed in Flow Payroll
Give payroll staff a role of your own that has
employee:read but not employee:write. They still run payroll and keep tax codes and NI up to date, but names, salaries, bank details and other employee details can only change from your platform. Send pay lines with canEdit: false so only your integration can change them.5
Get payroll results back
Subscribe to
payslip.finalised to put payslips in your employee portal. Each event links the payslip PDF in metadata.documentUrl.3. Shifts, agencies and workforce management
For: rota and time-and-attendance tools, staffing agencies, and gig or shift platforms. Hours change daily, so this pattern sends pay as it happens rather than as one batch at the end of the period.- Send each shift as a pay line with its own
idand the date it was worked. Flow Payroll puts it in the right pay run. Fix a shift by sending it again with the sameid, or remove it withDELETE. - Bill clients from the same line. Agencies set
clientId,chargeRateandchargeUnitson the line, and Flow Payroll invoices the client at the charge rate, separately from what the worker is paid. See clients and invoices. - Push the rota with
PUT /employees/{employeeId}/working-schedule, one week or many. Holiday and statutory pay then work from the hours you rostered. - See pay before pay day.
GET /payslip/data/{employeeId}/{year}/{period}returns the payslip as it stands at any point in the period, with tax, NI and pension worked out. Subscribe topayslip.createdandpayslip.updatedto hear when it changes. For a quote before any shift is worked, use the gross-to-net calculator,POST /calculator/grosstonet.
4. Embedded payroll
For: software platforms that sell payroll as part of their own product. You build the interface. Flow Payroll does the calculations, HMRC filing, pensions and payslips through the API, so your customers stay in your product.- Run the whole cycle by API. Add employees, post pay lines, preview payslips, lock with
POST /payroll/{payrollConfigId}/{year}/{period}/lock, and submit the FPS withPOST /rti/fps/{payrollConfigId}/{taxYear}/{period}. A typical payroll run walks through it. - One account, many customers. Each of your customers is an organisation with your
externalId. One API token can reach all of them, and you pick the organisation per request withX-Org-Id. - Your brand everywhere Flow Payroll shows. White label puts your name, logo, colours, fonts, web address and sending domain on the app, emails and payslips. Customers who open the app see your product, and the support panel shows your own help desk there too.
- Single sign-on and provisioning. People sign in through your identity provider, and SCIM keeps their access in step with your directory.
- Build safely. Build against the sandbox, which is isolated from live data. See Build and test your integration.
Build and test your integration
Whichever pattern you choose, build it against the sandbox first. Sandbox data is isolated from live, so you can create, change and delete anything. The slow part of testing payroll is setting up the scenario: an organisation, employees with the right tax codes and pay elements, a pay run in the right period. Flow Payroll publishes two MCP servers so an AI assistant such as Claude Code or Cursor can do that for you.
Connect both and describe the scenario you want in plain English:
- “Add five monthly employees, one with a student loan and one starting maternity leave this month.”
- “Post a week of night shifts for each of them, then show me their payslips.”
- “Make one of them a leaver and show me what changes on the FPS preview.”
api.sandbox.flowpayroll.ai and rejects any other host, so it can never touch live data, whatever credentials it is given.
To import the whole API into a client instead, use Use in Postman.