Account Owner Guide
Login

Account Owner Guide

Overview

Using Credfin's iframe endpoint you can quickly and easily integrate the Account Owner check into your existing workflow. Not all payload fields (see payload below) can be retrieved from all institutions. Other common causes of failure to retrieve are scenarios such as when the customer has not registered for eStatements, their account profile hasn't been completed (new account) or the institution is simply not providing any data. In cases where no data can be retrieved, a failure message will be provided along with the payload.

One-line example in HTML:

1<iframe src="https://credfin.io/i/{VENDOR_LABEL}/{VENDOR_SPECIFIC_ID}?collect=account_owner" />

In order to request multiple services, simply specify the collect flag again. For example, in order to request an analysis in addition to account owner information, you may use something like:

By default, only the analysis option is enabled when creating a profile. This behaviour can be overridden by specifying collection query parameters. When including a collection query parameter in your iframe URL, only the specified services will be enabled.

1<iframe src="https://credfin.io/i/{VENDOR_LABEL}/{VENDOR_SPECIFIC_ID}?collect=account_owner&collect=analysis" />

For example, in order to only request account owner information for the client, you may use something like this:

This service is intended to be used through an iframe embedded in your page, however the URL can also be sent as a link directly to clients via e-mail, SMS or any text-based messaging system you already integrate with.

Required Parameters

The following URL paramaters are required, if they are missing or incorrect the client will receive a "Page Not Found" error:

NameDetails
VENDOR_LABELLabel that uniquely identifies your vendor account.
Provided to you by Credfin when your account is provisioned.
VENDOR_SPECIFIC_IDID that uniquely identifies the active client.
This is used primarily for correlating data you receive from Credfin against your own system's records, generally the UUID for this client in your own system would be used.
?collect=account_ownerThe flag to instruct the iFrame to only collect the account owner information. Additional flags can be supplied if additional features are required.

Customising Collection Services

The full list of options is available below. For even more options refer to the iFrame Guide; however for Account Owner only the account_owner owner options is required.

NameFlag
Balancescollect=balances
Transactionscollect=transactions
Interimscollect=interims
Estatementscollect=estatements
Analysiscollect=analysis
Account Ownercollect=account_owner

Prefilling Details

The client's personal details can be pre-filled with data from your own system via the following query string parameters:

NameDescription
firstNameClient's first name
lastNameClient's last name (including any middle names)
phoneNumberClient's phone number
emailClient's email address

For example:

1<iframe src="https://credfin.io/i/{VENDOR_LABEL}/{VENDOR_SPECIFIC_ID}?firstName=Mickey&lastName=Mouse&email=mickey@disney.com&phone=04123128321" />

Deep Linking

Parts of the process can be skipped by deep-linking with any required information provided via query string parameters:

PathOutcome
/i/{VENDOR_LABEL}/{VENDOR_SPECIFIC_ID}Standard application flow, beginning with asking for client's details.
/i/{VENDOR_LABEL}/{VENDOR_SPECIFIC_ID}/banksSkip client details & informational prelude steps, going directly to the bank selection step.
REQUIRED: Customer Details must be provided via query string paramaters.
/i/{VENDOR_LABEL}/{VENDOR_SPECIFIC_ID}/{BANK_ID}Skip customer details & informational prelude steps plus the bank selection step, directly pre-selecting the specified bank and prompting the customer to log in.
REQUIRED: Customer Details must be provided via query string paramaters.

Events

The iframe emits postMessage events in response to certain actions, you can listen to these events in order to enable your own website or system to react to changes in the ongoing Credfin application.

Each event will contain an event.data.type field which specifies the type of event being fired, from this you can determine your desired behaviour for that given event.

NOTE

DO NOT rely on these events or any client-side behaviour for important business logic as their execution in the browser can never be guaranteed. Only webhooks should be used for mission-critical processes.

Resizing

An event of type resize is fired when the content changes size, you can listen to this and resize the iframe's external dimensions accoridngly so the iframe automatically expands to present all content, avoiding nested scrolling:

1window.addEventListener('message', function (event) {
2  if (event.data.type === 'resize') {
3    document.querySelector(
4      'iframe#credfin',
5    ).style = `height: ${event.data.height}px`;
6  }
7});

In this case event.data contains the following fields:

1type Resize = {
2  height: number;
3  width: number;
4};

An event of type loaded is fired when the client progresses to another step which completes loading, generally in response to this you would scroll them to the top of the page since navigating inside the iframe does not reset their scroll to the top as a full page load usually does.

1window.addEventListener('message', function (event) {
2  if (event.data.type === 'loaded') {
3    window.scrollTo({top: 0, behavior: 'smooth'});
4  }
5});

In this case event.data contains a single property page which may be any value in the following enum type:

1enum Pages {
2  loading = 'loading',
3  userDetails = 'userDetails',
4  prelude = 'prelude',
5  banks = 'banks',
6  crawler = 'crawler',
7}

Client Details

An event of type clientDetails is fired when the client completes submission of their personal details, this information can also be retrieved via the Profile API, however to avoid unnecessary network requests you can simply listen to this event.

Typically you would use these client details to personalize the presentation of your application form or pre-fill/skip asking the client for this data again in your own subsequent account registration form.

1window.addEventListener('message', function (event) {
2  if (event.data.type === 'clientDetails') {
3    document.querySelector('input.email').value = event.data.email;
4  }
5});

In this case event.data contains the following fields:

1type ClientDetails = {
2  firstName: string;
3  lastName: string;
4  phoneNumber: string;
5  email: string;
6  title: string;
7};

Example Account Owner payload

1{
2  "account_id": 123456789,
3  "account_owner_info": {
4    "bsb": "001001",
5    "number": "123456789",
6    "address": [
7      {
8        "addressLine1": "21 Sesame STR",
9        "addressLine2": "Some Town QLD 4000",
10        "streetNumber": "21",
11        "streetName": "Sesame",
12        "streetType": "STR",
13        "townSuburb": "Some Town",
14        "state": "QLD",
15        "postCode": "4000",
16        "country": "AU"
17      }
18    ],
19    "owners": [
20      "Mickey Mouse"
21    ],
22    "email": ["mickey@disney.com"],
23    "phone": ["0412123123"]
24  },
25  "vendor_specific_id": "vendors-unique-customer-id",
26  "nickname": "Account Reference Name",
27  "bsb": "001001",
28  "number": "123456789",
29  "vendor_label": "vendor123",
30  "crawler": {
31    "profile": 12345,
32    "uuid": "crawler-uuid",
33    "application": 1234567,
34    "application_id": 1234567,
35    "bank_id": 1,
36    "timestamp": "2021-08-25T16:43:20.025141+10:00",
37    "status": "COMPLETED",
38    "vendor_tag": null
39  },
40  "vendor_tag": null
41}
Subscribe to our newsletters

Subscribe to our newsletter and stay up to date with the latest news about Credfin.

FDATA