Showcase walkthrough
The showcase is a complete partner application built on this API and these packages, in the open, so you can read working code for every guide. Two deployments:
| URL | Mode | Who | |
|---|---|---|---|
| Demo | https://payroo-embedded-demo.vercel.app | mock: the whole contract runs in your browser, no network, no login | anyone |
| Sandbox showcase | announced to partners in onboarding | staging: real sessions against the sandbox API for synthetic companies | partners and Payroo |
Source: payroo-group/payroo-embedded-showcase (Next.js). Ask Payroo for access.
What to look at
The partner portal (/portal/<partner>): one partner's view of its client companies, skinned to that partner. Overview, Setup, Employees, Pay runs, Calendar, Super, each a page that mounts one component, with a Native / Frame switch so you can compare the two shells on the same session. The company switch at the top changes the employerId the session route mints for.
The session route (src/app/api/session/route.ts): the one server file every partner needs. It holds the credential, decides components and scopes per page, forwards the user's identity and the company, and passes Payroo's answer to the page unchanged. Refresh and bootstrap go through the same route.
Server-side reads (src/lib/partner-server.ts): how to call /employers/{id}/status and /audit from your server for the companies you may act for, and nothing else, so your server never becomes an open proxy for the credential.
Provisioning (/provision, src/lib/provision-server.ts): the eight-step walkthrough with a visible operation panel, resume on failure, and a signed cookie that remembers which companies this browser created.
Onboarding a company from the portal (/portal/<partner>/payroll/onboard): the same provisioning in the partner's skin, then "Open this company" into its payroll.
Events (/events): every page event of the session as it happens, from both shells. Theme (/theme): type tokens, see the components restyle, and see which pairs fall back for contrast.
Developer docs inside the portal (/portal/<partner>/developers): what a partner's own developer page can look like, with the integration options side by side.
Run it yourself
git clone https://github.com/payroo-group/payroo-embedded-showcase
cd payroo-embedded-showcase
NODE_AUTH_TOKEN=<your GitHub token with read:packages> npm ci
npm run dev # mock mode on http://localhost:3000
For staging mode set SHOWCASE_MODE=staging, NEXT_PUBLIC_SHOWCASE_MODE=staging, LOCAL_API_ORIGIN=https://sandbox.payroo.com.au/api, NEXT_PUBLIC_LOCAL_API_ORIGIN the same, and your sandbox LOCAL_PARTNER_KEY, LOCAL_EMPLOYER_ID and LOCAL_EXTERNAL_USER_ID as server environment variables. The page that mounts components must be served from an origin on your partner record.
What it is not
A product. It has no accounts of its own (a shared access code gates the live modes), no persistence beyond cookies, and its styling is deliberately generic so the partners' own skins show through. Copy the patterns, not the pages.