API Reference

Complete reference documentation for the Payflo API.

API Overview

Base URL

https://api.payflo.dev/v1

Authentication

All API requests require authentication using an API key in the header:

Authorization: Bearer YOUR_API_KEY

Response Format

All responses are returned in JSON format with the following structure:

{
  "status": "success",
  "data": { },
  "meta": { }
}

Endpoints

Employees

GET /employees

List all employees

View details →
POST /employees

Create a new employee

View details →

Payroll

GET /payroll/runs

List all payroll runs

View details →
POST /payroll/runs

Create a new payroll run

View details →

Reports

GET /reports

Generate payroll reports

View details →

Rate Limits

Our API implements rate limiting to ensure stability and fair usage:

  • 100 requests per minute per API key
  • 1000 requests per hour per API key
  • 10000 requests per day per API key

Rate limit information is included in the response headers:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1625097600

Error Handling

The API uses conventional HTTP response codes to indicate the success or failure of an API request:

  • 2xx

    Success response indicating the request was processed successfully

  • 4xx

    Client error response indicating an issue with the request

  • 5xx

    Server error response indicating an issue on our end

Error Response Format:

{
  "status": "error",
  "error": {
    "code": "invalid_request",
    "message": "The request was invalid",
    "details": { }
  }
}