Overview
The Onboarding Init API provides the PFM WebRD for initiating the user onboarding process. This API sets up the initial configuration including the redirection URL where users will be redirected after completing the onboarding process. It’s the first step in the PFM user journey and prepares the system for subsequent PFM operations.Example Request
Authentication
This API requires Bearer token authentication using a JWT token:| Header | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | JWT Bearer token for API authentication |
Content-Type | string | Yes | Must be set to application/json |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
redirection_url | string | Yes | The URL where users will be redirected after completing the onboarding process. Must be a valid HTTPS URL. |
Response
Success Response (200 OK)
When the onboarding initialization is successful, the API returns configuration details:| Field | Type | Description |
|---|---|---|
status | string | Status of the API call. Will be SUCCESS for successful requests. |
onboarding_url | string | The complete URL to redirect users to for starting the onboarding process. Contains an access token as a query parameter. |
Error Responses (400 Bad Request / 401 Unauthorized)
When the request fails due to authentication or validation issues, the API returns specific error responses:| Field | Type | Description |
|---|---|---|
status | string | Status of the API call. Will be FAILED for failed requests. |
message | string | Human-readable error message explaining what went wrong. |
status_code | string | Machine-readable error code for programmatic error handling. |
Error Handling
| Error Code | HTTP Status | Description | Resolution |
|---|---|---|---|
no_redirect_url | 400 Bad Request | The redirection URL is missing or empty in the request body | Provide a valid redirection URL in the request body |
invalid_session_token | 401 Unauthorized | The provided authorization token is invalid, expired, or malformed | Obtain a new valid JWT token for API authentication |
Usage Flow
- Initialize Onboarding: Call this API with your redirection URL to get the link to PFM WebRD
- Redirect User: Use the returned
onboarding_urlto redirect users to the PFM onboarding flow - Handle Completion: Users will be redirected back to your
redirection_urlwhen they close the WebRD. The redirection URL will include a query parameterjourney_statuswith the following values:journey_status=success: At least one consent was approved by the user and was successfuljourney_status=failure: No consents were successfully approved
- Continue Flow: Use the session details to proceed with subsequent PFM operations
Security Considerations
- HTTPS Only: Always use HTTPS for redirection URLs to ensure secure data transmission
- Token Security: Handle JWT tokens securely and avoid logging them
- Session Expiry: Monitor session expiry times and implement appropriate timeout handling
- URL Validation: Validate that redirection URLs belong to your domain for security
- Encryption Support: This API supports encryption. When encryption is enabled for your integration, both request and response payloads will be encrypted. See API Encryption Guide for details.
