Skip to content

How Friendly Payroll works

Friendly Payroll lets your customers run payroll without leaving your product. You don’t build payroll screens, store bank details or file taxes. You create Sessions on your server and render Screens in your frontend.

  1. Your server creates a Session. It calls POST /v1/sessions with your secret key. The request says who is looking (an Employer, or one of its Workers) and which Screens they may see. The response contains a clientSecret.
  2. Your frontend renders a Screen. Pass the clientSecret to the <friendly-payroll> component, or to <FriendlyPayroll> in React. The component shows the Screen in an iframe hosted by Friendly Payroll.
  3. Friendly Payroll handles the rest. The Screen loads, stays signed in for the life of the Session, and tells your page what happened through events.

Your secret key never leaves your server, and sensitive payroll data never touches your frontend code.

Term Meaning
Partner You: the company integrating Friendly Payroll.
Employer One of your customers: a business that runs payroll. You refer to it by your own ID, its External ID.
Worker Someone an Employer pays, either a W-2 employee or a 1099 contractor. Also referred to by your External ID.
Session A short-lived grant for one person to view certain Screens for one Employer or one Worker.
Screen One piece of payroll UI: onboarding, the payroll dashboard, a Worker’s paystubs and so on. See Screens.
Mode Sandbox or Prod. Each has its own keys, Employers and API base URL. See Sandbox and Prod.
  • IDs: Use your own IDs everywhere. The first time a Session mentions an Employer or Worker, Friendly Payroll creates it. After that, your ID is enough.
  • Permissions: Each Screen implies the access it needs, and Friendly Payroll grants exactly that. You decide which Screens a person may see, not which role they have.

Next: Quickstart.