Getting Started

1Pick a language

2Try It!

LoadingLoading…
Response
Click Try It! to start a request and see the response here!

FlowPayroll API Integration Guide

Welcome to the FlowPayroll API integration guide! This document provides an overview of the system, key workflows, and instructions for integrating with the FlowPayroll API. The API allows you to manage payroll configurations, employees, clients, payroll uploads, and payslip generation.

Table of Contents

Overview

The FlowPayroll API enables developers to automate payroll management tasks, including:

  • Creating and managing payroll configurations.
  • Uploading payroll data.
  • Generating and locking payslips.
  • Managing employees and clients.
  • Calculating gross-to-net pay.

The API follows RESTful principles and uses JSON for request and response payloads.

For the full documentation, visit FlowPayroll API Docs.

Key Concepts

1. Organisation

  • An organisation is automatically created when you start using the API.
  • All resources (payroll configurations, employees, clients) are tied to an organisation.

2. Payroll Configuration

  • A payroll configuration centralizes general settings for payroll processing.
  • Key attributes:
    • Pay Frequency: Weekly, Fortnightly, Monthly, etc.
    • Pension/Benefits/Integrations and other configurations: Future support for pension, benefits and other configurations will be centralised in the payroll config.

3. Employees

  • Employees are individuals who receive payments.
  • Each employee is associated with a payroll configuration.

4. Clients

  • Clients represent entities (e.g., companies) that employ workers.
  • Used for billing and reporting purposes.

5. Payroll Upload

  • Payroll data is uploaded as lines, specifying details like hours worked, pay rates, if it's taxable/non taxable, payable/deductible/information in order to keep it as generic and easy to integrate as possible.
  • Data is processed to generate payslips.

6. Payslips

  • Payslips can be previewed at any given time, even with a different frequency as the configured one.
  • After the period has been locked, payslips are generated with the "Final" status

Tags

FlowPayroll uses a flexible tagging system to allow for custom aggregation and reporting. Tags can be used for various classifications, such as:

  • Departments
  • Cost centers
  • Custom categories (e.g., projects, regions, business units)

Tags facilitate easy reporting, and a dedicated reporting API will be available soon.

API Workflow

Step 1: Create a Payroll Configuration

  • Use the POST /payrollconfig endpoint to create a payroll configuration.
  • Specify the pay frequency and other settings.

Step 2: Add Employees and Clients

  • Use the POST /employee endpoint to add employees.
  • Use the POST /client endpoint to add clients.

Step 3: Upload Payroll Data

  • Use the POST /payroll/upload endpoint to upload payroll lines.
  • Each line includes details like employee ID, hours worked, and pay rate.

Step 4: Preview Payslips

  • Use the GET /payslip/data/{employeeId}/{year}/{period} endpoint to preview payslips for a specific period.

Step 5: Lock Payroll and Generate Final Payslips

  • Use the POST /payroll/{payrollConfigId}/{year}/{period}/lock endpoint to lock the payroll for a specific period.
  • This triggers the generation of final payslips.

Step 6: Hear the Results with Webhooks

  • Instead of polling, register a webhook endpoint with POST /v1/webhooks/endpoints and subscribe it to payslip.finalised and rti.fps_accepted.
  • Your system is told as each happens. See the Webhooks quickstart.

Authentication

The API uses API keys for authentication:

  • Include the x-auth-token header in all requests.
  • Optionally, include the User-Id header for audit or tracing purposes.

Example:

GET /payrollconfig
x-auth-token: YOUR_API_KEY
User-Id: YOUR_USER_ID

Default Response Format

All API responses follow a consistent format, ensuring predictable and structured data for integration:

{
  "message": {
    "text": "Operation completed successfully",
    "token": "operationCompletedSuccessfully"
  },
  "content": { 
    "data": { ... },
    "metadata": {
        "dataFormat": "yyyy-MM-dd",
        "dateTimeFormat": "yyyy-MM-dd'T'HH:mm:ss.fffZ",
    },
  }
}

Errors follows the same structure:

{
  "message": {
    "text": "Operation Failed",
    "token": "operationFailed",
    "tokenArguments": [
        {
            "name": "argumentName",
            "value": "argumentValue"
        }
    ]
  },
}

Three refusals come from checking who is calling: insufficient_permissions (403), field_not_writable (400) and access_check_unavailable (503, with a Retry-After header). Permission errors shows an example of each and what to do.

What Sets FlowPayroll Apart

FlowPayroll offers unique features that differentiate it from other payroll platforms:

  • Flexible Tagging System: Use tags to categorize data for custom aggregation and easy reporting.
  • Customer IDs for Seamless Integration: Simplify integrations with your unique identifiers for entities.
  • Payslip Preview at Any Time: View payslips based on real data at any given moment, regardless of payroll frequency.
  • Real-time Gross-to-Net Calculation: Instantly calculate gross-to-net pay using real-time data.
  • Payroll Processing in Seconds: Handle payroll processing for any company size in seconds, not hours.

Endpoints

Payroll Configuration

  • Create: POST /payrollconfig
  • Read All: GET /payrollconfig
  • Read One: GET /payrollconfig/{payrollConfigId}
  • Update: PUT /payrollconfig/{payrollConfigId}
  • Delete: DELETE /payrollconfig/{payrollConfigId}

Employees

  • Create: POST /employee
  • Read: GET /employee/{employeeId}
  • Update: PUT /employee/{employeeId}
  • Delete: DELETE /employee/{employeeId}

Clients

  • Create: POST /client
  • Read: GET /client/{clientId}
  • Update: PUT /client/{clientId}

Payroll Upload

  • Upload: POST /payroll/upload

Payslips

  • Preview: GET /payslip/data/{employeeId}/{year}/{period}
  • Lock Payroll: POST /payroll/{payrollConfigId}/{year}/{period}/lock

Calculator

  • Gross to Net Calculation: POST /calculator/grosstonet

Webhooks

  • Register an endpoint: POST /v1/webhooks/endpoints
  • Send a test event: POST /v1/webhooks/endpoints/{endpointId}/test-deliveries
  • Delivery log: GET /v1/webhooks/deliveries?endpointId={endpointId}
  • Every call and every event is in the Webhooks API reference; start with the Webhooks overview.

Support

For questions or issues, contact [email protected].

This guide should help developers get started with integrating the FlowPayroll API. For the full documentation, visit FlowPayroll API Docs. Let us know if you need further assistance!

Popular Endpoints
Last 24 Hours
LoadingLoading…

Did this page help you?