Example configurations

View examples of configurations that implement common use-cases.

This page contains example configuration objects for Smart UI. To include these examples in your own code, pass the example configuration object as the value of the config field. Do not pass the example configuration directly to the intialiseOnboardingWidget() method.

Correct:

frankieFinancial.initialiseOnboardingWidget({
  ffToken: "TOKEN",
  applicantReference: "YOUR_CUSTOMER_REFERENCE",
  width: "AUTO",
  height: "AUTO",
  config: {
    // example configuration here
  } 
});

Incorrect:

frankieFinancial.initialiseOnboardingWidget({
  // example configuration here
});

Accept passports from countries different to address

The documentTypesconfiguration field supports specifying document types as objects, where you can define the specific countries accepted for that document type.

An array of acceptable countries can be specified for documentTypes and requestAddress separately.

{
  "documentTypes": [
    {
      "type": "PASSPORT",
      "acceptedCountries": ["NZL"], 
    {
      "type": "NATIONAL_ID",
      "acceptedCountries:" ["IDN"]
    }
  ],
  "requestAddress": {
    "acceptedCountries": ["BRA"]
  }
}

If neither is specified the top-level acceptedCountries configuration field will be used.

{
  "acceptedCountries": ["NZL", "IDN", "BRA"]
}

You can specify the string "ALL" in place of an array to accept documents from any country.

{
  "documentTypes": [
    {
      type: "PASSPORT",
      acceptedCountries: "ALL"
    }
  ]
}

Capture Social Security Number (United States)

We do not support an explicit SSN field, but you can tailor the “National ID” document type to appear as an SSN field.

Specify a custom document type as well as customising the label text.

{
  "documentTypes": [
    "PASSPORT",
    {
      "type": "NATIONAL_ID",
      "label": "Social Security Number",
      "subtitle": "Citizen or Green Card holder"
    }
  ],
  "phrases": {
    "national_id_input_screen": {
        "title": "Your Social Security Number",
        "title_loop": "Check your Social Security Number"
    },
    "document": {
        "type_national_id": {
            "identification_number": "Social Security Number",
            "name": "Name as shown on card",
            "nationality": "Nationality"
        }
    }
  }
}

Did this page help you?