Overview
The SDK mounts a secure iframe into a host element on your page and handles two-way communication between your app and the Payroll Integrations platform using thepostMessage API.
Installation
Note: This package has not yet been published. Installation instructions will be added once it is available.
Usage
- Add a host element to your page:
- Call
bootstrapwith theonboardingLinkobtained from the Create Employer Invite Session endpoint:
Configuration
A configuration object must be provided to thebootstrap function. It has the following properties:
onboardingLink (required)
Link retrieved from the Create Employer Invite Session endpoint
Type: string
selector
CSS selector for the element to mount the iframe into
Type: string
Default: #pi-host
callbacks.success
Called when onboarding completes successfully
Type: (value: string) => unknown
callbacks.error
Called when an error occurs
Type: (value: string) => unknown
callbacks.message
Called for outbound debug messages sent from the iframe
Type: (value: string) => unknown
frameHost
Intended for development only. Overrides the iframe host URL.
Type: string
Default: https://secure.payrollintegrationsapp.com