This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Event Notification API v3.1.2
This is available only as a WUM update and is effective from June 10, 2020 (06-10-2020). For more information on updating WSO2 Open Banking, see Updating WSO2 Products.
This document explains the flow of events related to the Event Notification API v3.1.2.
Before you begin:
You need to configure and deploy the Event Notification APIs.
- Step 1 - Sign up as a TPP
- Step 2 - Approve the TPP
- Step 3 - Sign in to the API store as the TPP
- Step 4 - Create an application
- Step 5 - Subscribe to API
- Step 6 - Create and upload certificates
- Step 7 - Generate keys
- Step 8 - Approve Production Key generation
- Step 9 - Generate application access token
- Step 10 - Create an event-subscription resource
- Step 11 - Invoke Aggregated Event Polling API
Step 1 - Sign up as a TPP
In this step, the TPP registers its TPP application in WSO2 API store.
Step 2 - Approve the TPP
Now that you have signed up as a TPP, an admin who overlooks all TPP sign-up forms must approve it.
It is not mandatory to include the approval step for approving the TPP. In order to add this step, you need to configure workflows in the WSO2 Open Banking solution.
Step 3 - Sign in to the API store as the TPP
Step 4 - Create an application
Step 5 - Subscribe to API
The TPP user needs to subscribe to both Event Notification Subscription and Aggregated Event Polling APIs to complete the Even Notification flow. Once subscribed, the users can access all the supported services of these API resources.
Step 6 - Create and upload certificates
The TPP user needs to create certificates to validate whether the TPP is registered in a governing entity.
You can also create a self-signed certificate the following instructions given below and try out the API flow:
Once you create a self-signed certificate, upload it to the client trust stores of WSO2 OB APIM and WSO2 OB KM.
- Locate the client trust stores in WSO2 OB APIM and WSO2 OB KM in the following directory paths:
<WSO2_OB_APIM_HOME>/repository/resources/security/client-truststore.jks
<WSO2_OB_KM_HOME>/repository/resources/security/client-truststore.jks
Use the following command to upload the self-signed certificate:
keytool -import -alias <alias> -keystore cacerts -file <PEMFileName>.pem
Step 7 - Generate keys
The TPP user requires a Client ID(Consumer Key) and a Client secret(Consumer Secret) to access the subscribed APIs.
Step 8 - Approve Production Key generation
This step includes instructions to an Approver user to review and approve a request to generate production keys for an application.
It is not mandatory to include the approval step for the Production Key generation. In order to add this step, you need to configure workflows in the WSO2 Open Banking solution.
Step 9 - Generate application access token
When invoking APIs in the Event Notification flow, application access tokens must be generated using the client credential grant type. The generated application access token is used to invoke the APIs.
Step 10 - Create an event-subscription resource
POST /event-subscriptions
The TPP requests the ASPSP to create a new event-subscription resource using this API endpoint. On successful creation, the ASPSP responds with a unique EventSubscriptionId
to refer to the resource. The TPP uses this resource to access event notifications.
Step 11 - Invoke Aggregated Event Polling API
POST /events
The endpoint allows a TPP to poll for, acknowledge, and receive event notifications. The TPPs communicate their polling parameters and event notification acknowledgements using this endpoint. The ASPSP responds accordingly, sending event notifications as indicated by the TPP's polling parameters.
The TPPs are able to perform the following using the POST
/events
endpoint using different payloads:
- Poll for events
- Acknowledge the received events
- Poll for new events and acknowledge the received events at once
The TPPs send two polling parameters to indicate the polling behaviours:
returnImmediately
: Indicates whether an ASPSP should return a response immediately or provide a long poll.Long polling is currently not supported by WSO2 Open Banking. Therefore, the value of
returnImmediately
is alwaystrue
.maxEvents
: The maximum number of events to be returned. A value of zero indicates the ASPSP should not return events even if available. The upper bound value of the parameter depends on the size of the payload and the connection. IfmaxEvents
is not defined in the payload, the ASPSP sets the value according to the<NumberOfSetsToReturn>
configuration in<WSO2_OB_KM_HOME>/repository/conf/finance/open-banking.xml
.
Given below is a sample request where the TPP is requesting for a response immediately, only to make sure there are events available.
The TPP confirmed that there are events. For example, if there are 5 events available with the ASPSP and the TPP wants to receive only 3 events, the request looks as follows:
Now the TPP acknowledges the received events (both positive and negative acknowledgements) while accepting more events. As per the response, there are more events available with the ASPSP. The TPP continues requesting for events until there are no more events and the value of moreAvailable
is false
.