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 document explains the flow of events related to the Event Notification APIs v3.1.2.
Before you begin:
You need to configure and deploy the Event Notification APIs v3.1.2.
- Step 1 - Sign up as a TPP
- Step 2 - Sign in to the Developer Portal as the TPP
- Step 3 - Create an application
- Step 4 - Subscribe to API
- Step 5 - Create and upload certificates
- Step 6 - Generate keys
- Step 7 - Generate application access token
- Step 8 - Create an event-subscription resource
- Step 9 - Generate application access token
- Step 10 - Invoke Aggregated Event Polling API
Step 1 - Sign up as a TPP
In this step, the TPP registers its TPP application in the WSO2 Open Banking Developer portal.
Step 2 - Sign in to the Developer Portal as the TPP
Users can sign in to WSO2 Open Banking Developer portal with the authentication details created during sign up.
Step 3 - Create an application
The TPP with an application needs to create an application using WSO2 Open Banking Developer portal. The application created via the Developer portal allows to observe statistics of APIs, subscribe to APIs, and access the subscribed APIs.
Step 4 - Subscribe to API
The TPP user needs to subscribe to both Event Notification Subscription API and Aggregated Event Polling API to complete the Even Notification flow. Once subscribed, the users can access all the supported services of these API resources.
Step 5 - Create and upload certificates
The TPP user needs to create certificates to validate whether the TPP is registered in a governing entity. It is verified in the TPP Onboarding process. There are two types of certifications that can be added to the client trust stores of the WSO2 Open Banking Identity and Access Management and WSO2 Open Banking API Management modules.
- Root and issuer certificates obtained from Open Banking Implementation Entity.
- eIDAS issuer certificates obtained from the Qualified Trust Service Providers.
See eIDAS Implementation for PSD2 Compliance to find out more information on the two approaches.
In order to support eIDAS or OB certificates in WSO2 Open Banking, you need to update the client trust stores.
Step 6 - Generate keys
The TPP user requires a Client ID(Consumer Key) to access the subscribed APIs.
Step 7 - Generate application access token
When invoking the Event Notification Subscription API 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 API.
Step 8 - 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 9 - Generate application access token
When invoking the Aggregated Event Polling API 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 API.
Step 10 - 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
.