Event Subscription - v3.1.2

  1. Overview
  2. Endpoints
    1. Endpoints
      1. POST /event-subscriptions
      2. GET /event-subscriptions
      3. PUT /event-subscriptions/{EventSubscriptionId}
      4. DELETE /event-subscriptions/{EventSubscriptionId}
  3. Data Model
    1. Event Subscription - Request
      1. UML Diagram
      2. Notes
      3. Data Dictionary
    2. Event Subscription - Response
      1. UML
      2. Data Dictionary
    3. Event Subscriptions - Response
      1. UML
      2. Data Dictionary
  4. Usage Examples
    1. Create Event Subscription
      1. POST Event Subscription Request
      2. POST Event Subscription Response
    2. Get Event Subscriptions
      1. GET Event Subscription Request
      2. GET Event Subscription Response

Overview

The Event Subscription resource is used by a TPP to subscribe to events with an ASPSP.

This resource description should be read in conjunction with a compatible Event Notification Subscription Profile.

Endpoints

A TPP will set up and maintain its event subscription details (URL, event types and version number) using the event-subscription resource.

Endpoints

ResourceHTTP OperationEndpointMandatory ?ScopeGrant TypeMessage SigningIdempotency KeyRequest ObjectResponse Object
event-subscriptionPOSTPOST /event-subscriptionsOptionalaccounts
payments
fundsconfirmations
Client CredentialsSigned Request

Signed Response
NoOBEventSubscription1OBEventSubscriptionResponse1
event-subscriptionGETGET /event-subscriptionsMandatory (if resource POST implemented)accounts
payments
fundsconfirmations
Client CredentialsSigned ResponseNon/aOBEventSubscriptionsResponse1
event-subscriptionPUTPUT /event-subscriptions/{EventSubscriptionId}Mandatory (if resource POST implemented)accounts
payments
fundsconfirmations
Client CredentialsSigned Request

Signed Response
NoOBEventSubscriptionResponse1OBEventSubscriptionResponse1
event-subscriptionDELETEDELETE /event-subscriptions/{EventSubscriptionId}Mandatory (if resource POST implemented)accounts
payments
fundsconfirmations
Client Credentialsn/aNon/an/a

POST /event-subscriptions

The API endpoint allows the TPP to ask an ASPSP to create a new event-subscription resource.

  • The POST action allows the TPP to register an event subscription for a TPP to access event notifications.
  • The ASPSP creates the event-subscription resource and responds with a unique EventSubscriptionId to refer to the resource.
  • An ASPSP must respond with a 409 error if an event-subscription exists for that TPP.

GET /event-subscriptions

The API endpoint allows the TPP to ask an ASPSP to retrieve its event-subscription resource.

  • The ASPSP retrieves the event-subscription resource and responds with the resource.

PUT /event-subscriptions/{EventSubscriptionId}

The API endpoint allows the TPP to ask an ASPSP to update an event-subscription resource.

  • The PUT action allows the TPP to update an event subscription for a TPP to access event notifications.
  • The ASPSP updates the event-subscription resource and responds with the updated resource.

DELETE /event-subscriptions/{EventSubscriptionId}

The API endpoint allows the TPP to ask an ASPSP to delete an event-subscription resource.

  • The ASPSP deletes the event-subscription resource.

Data Model

Event Subscription - Request

The OBEventSubscription1 object will be used for the call to:

  • POST /event-subscriptions

UML Diagram

OBEventSubscription1

Notes

For the OBEventSubscription1 object:

  • EventTypes usage:
    • TPPs may provide a list of event types to subscribe to specific events.
    • TPPs may omit this field to subscribe to all supported events.

Data Dictionary

NameOccurrenceXPathEnhancedDefinitionClassCodesPattern
OBEventSubscription1 OBEventSubscription1 OBEventSubscription1  
Data1..1OBEventSubscription1/Data OBEventSubscriptionData1  
CallbackUrl0..1OBEventSubscription1/Data/CallbackUrlCallback URL for a TPP hosted service. Will be used by ASPSPs, in conjunction with the resource name, to construct a URL to send event notifications to.xs:anyURI  
Version1..1OBEventSubscription1/Data/VersionVersion for the event notification.Max10Text  
EventTypes0..nOBEventSubscription1/Data/EventTypesArray of event types the subscription applies to.OBEventType1Code  

Event Subscription - Response

The OBEventSubscriptionResponse1 object will be used for a response to a call to:

  • POST /event-subscriptions
  • PUT /event-subscriptions/{EventSubscriptionId}

The OBEventSubscriptionResponse1 object will also be used for the call to:

  • PUT /event-subscriptions

UML

OBEventSubscriptionResponse1

Data Dictionary

NameOccurrenceXPathEnhancedDefinitionClassCodesPattern
OBEventSubscriptionResponse1 OBEventSubscriptionResponse1 OBEventSubscriptionResponse1  
Data1..1OBEventSubscriptionResponse1/Data OBEventSubscriptionResponseData1  
EventSubscriptionId1..1OBEventSubscriptionResponse1/Data/EventSubscriptionIdUnique identification as assigned by the ASPSP to uniquely identify the callback URL resource.Max40Text  
CallbackUrl0..1OBEventSubscriptionResponse1/Data/CallbackUrlCallback URL for a TPP hosted service. Will be used by ASPSPs, in conjunction with the resource name, to construct a URL to send event notifications to.xs:anyURI  
Version1..1OBEventSubscriptionResponse1/Data/VersionVersion for the event notification.Max10Text  
EventTypes0..nOBEventSubscriptionResponse1/Data/EventTypesArray of event types the subscription applies to.OBEventType1Code  

Event Subscriptions - Response

The OBEventSubscriptionsResponse1 object will be used for a response to a call to:

  • GET /event-subscriptions

UML

OBEventSubscriptionsResponse1

Data Dictionary

NameOccurrenceXPathEnhancedDefinitionClassCodesPattern
OBEventSubscriptionsResponse1 OBEventSubscriptionsResponse1 OBEventSubscriptionsResponse1  
Data1..1OBEventSubscriptionsResponse1/Data OBEventSubscriptionsResponseData1  
EventSubscription0..nOBEventSubscriptionsResponse1/Data/EventSubscription OBEventSubscriptionResponseData1  
EventSubscriptionId1..1OBEventSubscriptionsResponse1/Data/EventSubscription/EventSubscriptionIdUnique identification as assigned by the ASPSP to uniquely identify the callback url resource.Max40Text  
Url0..1OBEventSubscriptionsResponse1/Data/EventSubscription/UrlCallback URL for a TPP hosted service. Will be used by ASPSPs, in conjunction with the resource name, to construct a URL to send event notifications to.xs:anyURI  
Version1..1OBEventSubscriptionsResponse1/Data/EventSubscription/VersionVersion for the event notification.Max10Text  
EventTypes0..nOBEventSubscriptionsResponse1/Data/EventSubscription/EventTypesArray of event types the subscription applies to.OBEventType1Code  

Usage Examples

Create Event Subscription

POST Event Subscription Request

POST /event-subscriptions HTTP/1.1
Authorization: Bearer 2YotnFZFEjr1zCsicMWpAA
x-jws-signature: TGlmZSdzIGEgam91cm5leSBub3QgYSBkZXN0aW5hdGlvbiA=..T2ggZ29vZCBldmVuaW5nIG1yIHR5bGVyIGdvaW5nIGRvd24gPw==
x-fapi-interaction-id: 86ebcd82-8e38-4f2d-a79c-965b41d15865
Content-Type: application/json
Accept: application/json
{
  "Data": {
	"CallbackUrl": "https://tpp.com/open-banking/v3.1/event-notifications",
	"Version": "3.1"
  }
}

POST Event Subscription Response

HTTP/1.1 201 Created
x-jws-signature: V2hhdCB3ZSBnb3QgaGVyZQ0K..aXMgZmFpbHVyZSB0byBjb21tdW5pY2F0ZQ0K
x-fapi-interaction-id: 86ebcd82-8e38-4f2d-a79c-965b41d15865
Content-Type: application/json
{
	"Data": {
		"EventSubscriptionId": "CB-101",
		"CallbackUrl": "https://tpp.com/open-banking/v3.1/event-notifications",
		"Version": "3.1"
	},
	"Links": {
		"Self": "https://api.alphabank.com/open-banking/v3.1/event-subscriptions/CB-101"
	},
	"Meta": {}
}

Get Event Subscriptions

GET Event Subscription Request

GET /event-subscriptions HTTP/1.1
Authorization: Bearer 2YotnFZFEjr1zCsicMWpAA
x-fapi-interaction-id: 86ebcd82-8e38-4f2d-a79c-965b41d15865
Accept: application/json

GET Event Subscription Response

GET/1.1 200 OK
x-jws-signature: V2hhdCB3ZSBnb3QgaGVyZQ0K..aXMgZmFpbHVyZSB0byBjb21tdW5pY2F0ZQ0K
x-fapi-interaction-id: 86ebcd82-8e38-4f2d-a79c-965b41d15865
Content-Type: application/json
{
	"Data": {
		"EventSubscription": [{
			"EventSubscriptionId": "CB-101",
			"CallbackUrl": "https://tpp.com/open-banking/v3.1/event-notifications",
			"Version": "3.1"
		}]
	},
	"Links": {
		"Self": "https://api.alphabank.com/open-banking/v3.1/event-subscriptions/"
	},
	"Meta": {}
}