Getting Started

Quick Start Guide

Get up and running with Payflo in under 15 minutes.

8 min read

Before you begin

You need a Payflo account and an API key with write access. Keys are created per environment, so the sandbox key you use here will not touch production data.

Everything in this guide runs against the sandbox. Nothing you do will file a return or move money.

  • A Payflo account with the Admin or Developer role
  • A sandbox API key from Settings → Developers
  • Node 18 or later, if you want to follow the code samples

Install the SDK

The SDK wraps the REST API and handles auth, retries, and pagination for you.

npm install @payflo/node
export PAYFLO_API_KEY=sk_sandbox_...

Create your first company

A company is the top-level container for employees, pay schedules, and filings. Most integrations create one company per customer.

import Payflo from '@payflo/node';

const payflo = new Payflo(process.env.PAYFLO_API_KEY);

const company = await payflo.companies.create({
  legal_name: 'Acme Corp',
  ein: '12-3456789',
  address: {
    line1: '100 Market St',
    city: 'San Francisco',
    state: 'CA',
    postal_code: '94103',
  },
});

console.log(company.id); // cmp_8f2a...

Add an employee and run payroll

With a company in place, add an employee and open a payroll run. The run stays in draft until you submit it, so you can inspect the calculated taxes first.

const employee = await payflo.employees.create({
  company_id: company.id,
  first_name: 'Dana',
  last_name: 'Reyes',
  compensation: { type: 'salary', annual_cents: 12000000 },
});

const run = await payflo.payrolls.create({
  company_id: company.id,
  pay_period_start: '2025-01-01',
  pay_period_end: '2025-01-15',
});

console.log(run.totals.employer_taxes_cents);

What to do next

You now have a working end-to-end integration in sandbox. Before going live, configure your tax jurisdictions and connect a funding source.