<aside> 🔁 Synced from GitHub #785457f04c1f. Edit in the paidhr-system-docs repository, not here: changes made in Notion are overwritten.

</aside>

Accounts, subaccounts & billing

Status: Live

💡 In plain words

An account is a customer company on PaidHR. A group of companies can have one main account with subaccounts under it, one for each company in the group.

Each subaccount has its own staff, payroll and settings, but they all sit together. An admin who's allowed can hop between the group's companies without signing out. Each account is on a plan, and PaidHR bills it. If a company doesn't finish setting up or doesn't pay, it's warned first and then paused.

Think of a block of flats. The building is the main account, each flat is a subaccount with its own residents and bills, and the caretaker (an allowed admin) holds keys to every flat.

Who's involved: the company (customer), its admins (run the account), and PaidHR (sets up plans and bills).

In one paragraph

A customer on PaidHR is an account, stored as an organisation in the membership database. An organisation can have subaccounts: child organisations for the other companies in a group, each with its own employees, payroll and settings, living in the same tenant database as the parent. Admins who are allowed to can switch between the companies in their group without signing out. Each organisation has a plan and billing settings, PaidHR invoices it, and accounts that don't finish setup or don't pay are warned and then suspended. "Account" also has two narrower meanings at PaidHR: an employee's bank account for salary, and a company's payout subaccount at a payment partner. All three are explained here.

Key ideas

Term Meaning
Organisation The customer account in membership: name, legal name, contacts, status, type, plan, billing, HostDatabaseId (where its data lives), SecretKey (selects that database at sign-in), CompanyId (its record in the tenant), AgentId (its white-label brand), EwaId, WalletId
Organisation type 1 Demo · 2 Host · 3 Client
Organisation status 1 Trial · 2 Active · 3 Inactive · 4 Suspended. Only Trial and Active can sign in
Parent organisation ParentOrganisationId links a subaccount to its parent. Children lists a parent's subaccounts
Subaccount A child organisation: a separate company in the same group
Account switching AdminsCanSwitchOrganisations: whether a group's admins may move between its companies
Module flags Per organisation: IsHrisEnabled, IsPayrollEnabled, IsTimeAndAttendanceEnabled, IsPerformanceEnabled, IsAtsEnabled, IsHiringV2Enabled, HasWallet, DataPipelineEnabled (whether the account's data is copied to the reporting data pipeline)
Plan 1 Standard · 2 Enterprise · 3 Custom, with an amount per plan
Flex account A Custom-plan account billed per payroll run (CustomPlanPayrollBilling)
Billing Mode (1 Postpaid · 2 Prepaid), frequency (1 Monthly · 2 Quarterly · 3 Annually), discount, VAT and WHT flags, trial days, an employee threshold
Managed account IsManaged: run on the customer's behalf (for example by PaidHR or a partner)

How an account is created

sequenceDiagram
  participant P as Prospect
  participant Core as core-backend
  participant Staff as PaidHR staff (control panel)
  participant M as Membership
  participant T as Tenant DB
  P->>Core: Register (AccountRegistrationRequest)
  Staff->>Core: Control/Registrations: review, Update, Invite
  Core-->>P: invitation email (registration code)
  P->>Core: set password, sign in
  Core->>M: Organisation (Trial), host database chosen
  Core->>T: Company, GlobalConfigSettings, default payslip fields, default allowances, tax act
  P->>Core: company setup wizard (Company_Onboarding)
  P->>Core: submit setup for approval
  Staff->>Core: Control/Accounts SaveSetupReview → approved
  Core->>M: Active

Flex-account nudges and suspension

For flex accounts whose setup is still New (not submitted for approval), the daily routine emails the account's admins on days 1, 4, 8 and 13, sends a warning on day 7, and on day 14 suspends the company with a "Your PaidHR Account Has Been Suspended – Here's How to Reactivate" email. For a subaccount, the emails go to the parent organisation's users.

Subaccounts

flowchart TB
  PARENT["Parent organisation<br/>Acme Group"] --> C1["Subaccount<br/>Acme Nigeria"]
  PARENT --> C2["Subaccount<br/>Acme Ghana"]
  subgraph Tenant["Same tenant database"]
    CO0[Company: Acme Group]
    CO1[Company: Acme Nigeria]
    CO2[Company: Acme Ghana]
  end
  PARENT -.-> CO0
  C1 -.-> CO1
  C2 -.-> CO2

There are two ways to add a company to a group:

  1. Self-service (Admin/Company/Add_New): an admin creates a new business in their group (needs Can create new businesses). The new organisation is provisioned at once.
  2. Request and review: the customer submits a subaccount registration request (company name, legal name, country, whether admins can switch). PaidHR staff review it in Control/Registrations (SelectSubaccountRequests, ReviewSubaccountRequest, CreateSubaccount). Statuses: 3 New · 1 Approved · 2 Declined · 4 Created.