Skip to main content

Callback services

Maxime avatar
Written by Maxime
Updated over 4 months ago

Session status information

A new way of reporting session status has been introduced. Session status is now provided based on two attributes:

  • Stage:

    • Authentication (receiving access token) - SCA phase

    • Accounts - retrieving a list of consented PSU accounts from ASPSP

    • Transactions - retrieving a list of transactions for consented PSU accounts from ASPSP

    • TransactionDetails - retrieving details of transactions for consented PSU accounts from ASPSP

  • Status:

    • Initiated - event send to queue

    • InProgress - the event has been consumed by dedicated of connector

    • Finished - connector provided a response after successful execution of API call(s)

    • Failed- connector provided a response after unsuccessful execution of API call(s) (one or more tasks has been executed with errors)

    • AuthorizationFailed - access token has been rejected when accessing API

In addition, for stages Accounts and Transactions a number of accounts and transactions is provided: e.g. 2/3 ( 2 of 3 accounts were aggregated)

3 new endpoints are available

  • /api/session/status-> current stage and its status

  • /api/session/{stage}/status -> status of given stage

  • /api/session/status/details -> session details

Session status callback

An alternative method for using session polling.

The following JSON can be provided to registered callback address:

{

"bank": {

"id": „<bankId>",,

"secondaryIdentifiers": [

{

"type": "1",

"value": „<swiftCode>",

}

]

},

"bankId": „<bankId>",

"details": null,

"isSca": „<scaflag>",

"sessionExternalId": „<external identifier of session>",

"sessionId": „<sessionId>",

"stage": "Transactions",

"status": "InProgress",

"userId": „<userId>"

}

Callback can be triggered for each change of stage/status values.

Session status callback with list of accounts

When stage=Accounts is completed, the list of retrieved accounts will be provided to callback (as "details")

{

"bank": {

"id": „<bankId>",,

"secondaryIdentifiers": [

{

"type": "1",

"value": „<swiftCode>",

}

]

},

"bankId": „<bankId>",

"details":{

"accounts": [

{

"accountNumber": "BE2345",

"accountType": "CurrentAccount",

"accountRelation": [],

"manualAccountRelation": "Owner"

}]

},

"isSca": „<scaflag>",

"sessionExternalId": „<external identifier of session>",

"sessionId": „<sessionId>",

"stage": "Transactions",

"status": "InProgress",

"userId": „<userId>"

}

Callback can be triggered for each change of stage/status values.

Session status callback with summary of first transaction pages (for all transaction statuses)

For every transaction status, when the first page with transactions is retrieved, the callback will be registered.

{

"accountId": „<accountId>",

"bankId": „<bankId>",

"earliestAccountDate": "2019-02-26T00:00:00.000Z",

"earliestEffectiveDate": "2019-02-26T00:00:00.000Z",

"isSca": „<scaflag>",

"latestAccountingDate": "2019-03-20T00:00:00.000Z",

"latestEffectiveDate": "2019-03-20T00:00:00.000Z",

"sessionExternalId": „<external identifier of session>",

"sessionId": „<sessionId>",

"stage": "Transactions",

"status": "InProgress",

"transactionsCount": 100,

"transactionStatus": „<transactionStatus>",

"userId": „<userId>"

}

PIS Callback

After the initiated payment the response from the callback looks as following:

{"bank":{"id":75,"secondaryIdentifiers":{"swiftBicCode":"BPKOPLPW"}},"paymentExternalId":"test_PISP_1506_sender","paymentId":"1154cb8b-9f81-45b0-b451-c655e519da93","paymentStatus":"Completed","user":{"externalId":"regression_PISP_BPKOPLPW_2020-09-10T11:59:25.293Z","secondaryIdentifiers":{}}}

Status is from the list:

public enum PaymentStatusEnum
{
Created = 1,
InProgress = 2,
Completed = 3,
Rejected = 4,
NotSupported = 5,
Cancelled = 6,
Expired = 7
}

Did this answer your question?