Linking PayFit as a source

Let AI connect your sources for you

Skip the manual setup — run this in your project and the wizard auto-detects your databases and APIs and connects them to PostHog.

PostHog Wizard hedgehog

The PayFit connector syncs collaborators, contracts, absences, meal vouchers, health insurance and provident fund contracts, and more into the PostHog data warehouse, so you can analyze them alongside your product data.

Prerequisites

Credentials that can read the data you want to sync. PostHog only reads data, so read access is enough.

Adding a data source

  1. In PostHog, go to the Sources tab of the data pipeline section.
  2. Click + New source and click Link next to this source.
  3. Enter your credentials (see Configuration below) and click Next.
  4. Select the tables you want to sync, choose a sync method and frequency, then click Import.

Once the syncs are complete, you can start querying this data in PostHog.

Enter your PayFit API key to pull your HR and payroll data.

You can create an API key from the API access tab on the integrations page of your PayFit admin account. Grant it all the scopes below so every table can sync:

ScopeTables
collaborators:readcollaborators
contracts:readcontracts
time:readabsences, contracts_worked_time
contracts:payslips:readpayslips
accounting:readaccounting_entries
collaborators:meal-vouchers:readmeal_vouchers
health-insurance:readhealth_insurance_contracts, provident_fund_contracts

The company and payroll_status tables don't need a scope.

The accounting_entries, contracts_worked_time, meal_vouchers, health_insurance_contracts, and provident_fund_contracts tables are only available for companies in France.

You'll be asked for:

  • API key

Sync modes

Each table can be synced in one of several modes, depending on what the source supports:

  • Webhook (when available) – the source pushes changes to PostHog in real time. Fastest freshness, lowest ongoing cost, and the only mode that reliably captures updates and deletes.
  • Incremental – only new or updated rows are synced on each run, using a cursor field (such as an updated_at timestamp). Cheaper than a full refresh, but deletes aren't captured.
  • Append only – new rows are appended using a cursor field; existing rows are never updated. Ideal for immutable, append-only tables like event logs.
  • Full refresh – the whole table is reloaded on every sync. Use it when a table has no reliable cursor or when you need deletions reflected.

See sync methods for a full explanation of how each mode works and how to choose between them.

The payroll_status, contracts_worked_time, and meal_vouchers tables support incremental sync on month. All other PayFit tables are full refresh only. Each full refresh sync replaces the contents of the table.

Configuration

OptionTypeRequired
API keypasswordYes

Supported tables

TableDescriptionSync methodIncremental fieldPrimary key
collaborators

An employee (collaborator) of your company in PayFit, including admins.

Full refresh——
contracts

An employment contract in your company in PayFit.

Full refresh——
absences

An absence (leave) registered against a contract in PayFit. All statuses are synced, including pending, declined, and cancelled absences.

Full refresh——
payslips

A payslip issued to a collaborator for a given month in PayFit.

Full refresh——
company

The company the PayFit API key belongs to.

Full refresh——
payroll_status

The payroll status of the company for one pay period.

Incremental, Full refreshmonth—
contracts_worked_time

The time worked on each contract for one pay period. Only available for French companies.

Incremental, Full refreshmonth—
accounting_entries

Payroll accounting entries of the company for one pay period, matching the accounting exports. Only available for French companies.

Full refresh——
meal_vouchers

Meal vouchers each collaborator is entitled to for one pay period. Only available for French companies.

Incremental, Full refreshmonth—
health_insurance_contracts

Health insurance contracts of the company, with the employee contracts affiliated to each. Only available for French companies.

Full refresh——
provident_fund_contracts

Provident fund contracts of the company, with the employee contracts affiliated to each. Only available for French companies.

Full refresh——

Troubleshooting

  • If the connection fails with an authorization error, the API key is wrong, expired, or has been revoked. Create a new one, then reconnect the source.
  • If a table syncs no rows, the credential may not have access to that data. Check its permissions, then reconnect the source.
  • If your company isn't in France, the accounting_entries, contracts_worked_time, meal_vouchers, health_insurance_contracts, and provident_fund_contracts tables can sync no rows or fail. The error can say that the API key is missing a scope, even when it has all the scopes. Turn off sync for these tables. A new API key doesn't fix this.

If your sync is failing or data looks wrong, see the Data warehouse troubleshooting guide. If that doesn't help, contact support – we're happy to help.

Still have questions?

Was this page useful?