Apiture Developers Apiture Developers

Menu

  • Explore API Banking
    • API Digital Banking
    • Embedded Banking
    • Contact Us
  • Developers
    • Quick Start Guide
    • Embedded Banking
    • Events Reference
    • Authenticated Portal
  • API Documentation
    • Reference
Log In / Register
Apiture Developers Apiture Developers
Log In / Register
Apiture Developers

Menu

  • Explore API Banking
    • API Digital Banking
    • Embedded Banking
    • Contact Us
  • Developers
    • Quick Start Guide
    • Embedded Banking
    • Events Reference
    • Authenticated Portal
  • API Documentation
    • Reference

Embedded Banking

  • folder icon closed folder iconGetting Started
  • folder icon closed folder iconConcepts
    • Overview
    • Managing User Credentials
    • Components
    • Registering your Application
    • Terminology
    • Encryption and Authentication
  • folder icon closed folder iconGuides
    • Component Customization
    • Customization Examples
    • Initializing Components
    • Event Handling and Data Processing
  • folder icon closed folder iconRelease Notes
    • EB v1.0 Release Notes
    • EB v1.2.2 Release Notes
    • EB v1.3 Release Notes
    • Developer Portal 1.0 Update

Initializing Components

  • folder icon closed folder iconAPI Documentation
    • Getting Started
    • Concepts
      • API Keys
      • Authorization and Authentication
      • Access Tokens
      • Resources and URI Structure
      • Resource Collections
      • Resource Sets
      • Scopes & Entitlements
      • Error Responses
      • Error Types
      • Dry Runs
      • Markdown
      • Idempotent Operations
      • Collection Pagination
      • Collection Filtering
      • Transfers
      • Business Transfers
      • Cutoff Times
      • Identity Challenges
    • Guides
      • Authenticate Users in your App using OpenID Connect with PKCE
      • Authenticate using OAuth 2.0 Client Credentials Flow
      • Getting a List of Accounts
      • Listing the Balances for Accounts
      • Using Pagination
      • Creating a One-Time Transfer
      • Listing Transfers
      • Retrieving Business Transfer Information
      • Completing an Identity Challenge
    • API Reference
    • Release Notes
  • folder icon closed folder iconAuthenticated Portal
    • Getting Started
      • Registration
      • Profile
    • Concepts
      • Environments
      • Products
    • Managing your Applications
      • Creating Applications
      • Creating Data Direct: Real-Time Webhooks
      • Editing Applications
      • Application Owners
      • Getting Application Keys and IDs
      • Continue your Project
    • Release Notes
      • Developer Portal 1.0
      • Developer Portal 1.1
  • folder icon closed folder iconEmbedded Banking
    • Getting Started
    • Concepts
      • Overview
      • Managing User Credentials
      • Components
      • Registering your Application
      • Terminology
      • Encryption and Authentication
    • Guides
      • Component Customization
      • Customization Examples
      • Initializing Components
      • Event Handling and Data Processing
    • Release Notes
      • EB v1.0 Release Notes
      • EB v1.2.2 Release Notes
      • EB v1.3 Release Notes
      • Developer Portal 1.0 Update
  • folder icon closed folder iconEvents
    • Introduction
    • Guides
      • General Structure
      • Field Annotations
      • Customer Onboarding Data Direct: Real-Time
    • Data Delivery
      • Flat File Delivery
      • Snowflake Delivery
      • Event History API
      • Real-time / Webhooks

Initializing Components

Embedded banking components can be displayed in any HTML application. Some Javascript or a JavaScript-based framework is necessary for component to work properly.

Read the conceptual article on Authentication before continuing; concepts such as setting a component to use allowAuthentication and silent authentication are uncommon authentication patterns outside of embedded banking.

Note: Encryption keys must be used appropriately for each request and response. For details, see the Event Response and Data Encoding article. This article discusses the component setup rather than sending data request and response.

Allowing Authentication

At least one Embedded Banking component on the page must be marked to allow authentication. The easiest way to do this is to write the allow-authentication attribute in the HTML of the component:

<web-component app-id="{{ appId }}" id="accounts" route="account-balances" allow-authentication></web-component>

This can alternatively be done via Javascript, as described later in this article in Multiple Components on the Same Page.

Note: The HTML attribute includes a hyphen, when the configuration parameter name does not.

Client-Side Event Functions

Three event handler functions are necessary for the embedded banking component to connect to the FI, authenticate the user and disconnect from the FI.

initializeConnect

The initializeConnect event is triggered by the component set to allowAuthentication when the EB Application initiates connecting the Partner User’s Identity to an Financial Institution User’s Identity. The payload of this event allows the partner application to store the association of the Partner User’s Identity with the Financial Institution User’s Identity, and to complete the Auth Flow.

Javascript:

component.addEventListener('initializeConnect', connectHandler);

Angular:

<web-component (initializeConnect)="connectHandler($event)"></web-component>

initializeAuthenticate

The initializeAuthenticate event is triggered by triggered by the component set to allowAuthentication when the EB Application needs to establish a security context for the current user. The payload of this event is used to determine whether the user that is currently logged into the partner app has previously connected to online banking.

Javascript:

component.addEventListener('initializeAuthenticate', authenticateHandler);

Angular:

<web-component (initializeAuthenticate)="authenticateHandler($event)"></web-component>

initializeDisconnect

The initializeDisconnect event can be triggered by any of the Embedded Banking Components on the page and is not limited to the one set to allowAuthentication. The payload of this event is used by the Partner to verify the request is authentic before discarding any stored link between the user’s Financial Institution’s Identity User and the Partner User’s Identity.

Javascript:

component.addEventListener('initializeDisconnect', disconnectHandler);

Angular:

<web-component (initializeDisconnect)="disconnectHandler($event)"></web-component>

Event Payloads

Authentication events contain a payload property containing the authorization parameter to be used by the Partner to complete the flows. Details on processing payloads, including decryption, storing data, and encrypting requests are discussed in the Event Response and Data Encoding article.

{   
"payload": "encoded auth parameter"
}

Initializing Components

Embedded banking components can be integrated into any HTML-based application that uses Javascript. To integrate components into a page, you need to include the embedded banking script library either on the page or in a corresponding page template:

<script type="module" src="embedded-banking.js"></script>

The library contains wrappers that allow the content to be visible in your application. The actual implementation of the content and data within the components is provided by Apiture servers. The data displayed to the end user inside the component cannot be accessed directly by your application or the page the component resides on. Data that must be passed to the component is passed through parameters where the web component is placed on the page. The parameters include:

  • The app-id matches the Application ID you received from Apiture when the application was created within the Developer Portal.

  • The route specifies the Embedded Banking Component to be shown, such as account-balances, transactions or transfers.

  • The (initialize...) functions register the authentication event handlers in the Partner’s application. On every page, there needs to be one component instance that allows the Partner User’s Identity to connect with their Financial Institution’s User Identity.

One Embedded Banking Component on every page must be built with the following syntax:    

<web-component app-id="YourAppId" id="webComponent" route="account-balances" (initializeConnect)="connectionHandler($event)" (initializeAuthenticate)="authHandler($event)" (initializeDisconnect)="disconnectHandler($event)"></web-component>

Multiple Banking Components on the Same Page

To embed multiple components on the same page, some additional configuration is needed. You can apply this configuration using your UI Framework’s HTML Attribute Bindings, or by setting it directly against the HTML Element

				
					// obtain references to the web-component elements

const primaryComponent = document.getElementById('primary-component-id');

const secondaryComponent = document.getElementById('secondary-component-id');

 
// set the configurations

primaryComponent.configuration = { allowAuthentication: true };

secondaryComponent.configuration = { allowAuthentication: false };				
			

The configuration property allowAuthentication indicates which specific component should be used for authentication when there are multiple components.

Only one component may be configured to allowAuthentication  set to true when multiple are loaded concurrently. This can also be done with the HTML attribute allow-authentication as described earlier in this document.

The other components are not required to explicitly have allowAuthentication set to false. The configuration parameter may be excluded. However, the component will be treated like it is set to false.

Warning: Setting more than one component to allowAuthentication will cause breaking race conditions.

For the single Embedded Banking Component configured to allowAuthentication, the initializeConnect, initializeAuthenticate, initializeDisconnect properties and corresponding handlers are required, as documented in the section above.

All components require the initializeDisconnect property and handler. The initializeConnect and initializeAuthenticate are not required when allowAuthentication is false.

Any additional Embedded Banking Components that do not allowAuthentication can use the following syntax:

<web-component app-id="YourAppId" id="webComponent" route="account-balances" (initializeDisconnect)="disconnectHandler($event)"></web-component>

How can we help?

Get support for your issues.

Explore API Banking

  • API Digital Banking
  • Embedded Banking
  • Contact Us

Developers

  • Get Started Guide
  • API Reference
  • Embedded Banking

More

  • Apiture.com

Privacy Policy

© 2023 Apiture Inc.   |   All Rights Reserved