•Obtaining authorization and issuing access/refresh tokens are mandatory preliminary steps to use the AIS and CAF APIs.
•The scope of the authorization (AIS or CAF) should be indicated as a parameter when calling GET /consent-uri API.
•Issuing access/refresh tokens is necessary for payment initiation cancellation and retrieving payment initiation details. Once issued the tokens can also be used when initiating or cancelling another payment.
Note that Belfius/Banx only supports one access/refresh token per scope. If the tokens are refreshed, the previous tokens will not be usable anymore.
The API GET /consent-uris starts the authentication flow, it will return a redirection URL. This URL should be used to perform the PSU authentication. If the PSU authentication is successful, the call-back URL will return an authorization code. This authorization code can then be used in a second API POST /token to obtain an access token and a refresh token, which are required in the AIS PSD2 APIs.
Only version 4 of the GET /consent-uris API and version 3 of the POST /token API should be used for scope AIS. No account is required in input of the GET /consent-uris API and no logical-ID will be returned by the POST /token API. To retrieve the IBAN and logical-ID of the account(s) authorized by the PSU, the GET /accounts API should be called as explained in the flow section of the AIS API.
Note when the POST /token is called with "authorization_code" as grant_type, an “SCA token” will also be returned. This token can be used to retrieve the full transaction history as explained in the Flows section of the AIS API.
The steps are as follows:
The API GET /consent-uris starts the authentication flow, it will return a redirection URL. This URL should be used to perform the PSU authentication. If the PSU authentication is successful, the callback URL will return an authorization code. This authorization code can then be used in a second API POST /token to obtain an access token, a logical-ID and a refresh token, which are required in the CAF PSD2 APIs.
Note that version 4 of the GET /consent-uris and version 3 of the POST /token API cannot be used for CAF. This means that an account is always necessary in input of the GET /consent-uris API.
The steps are as follows:
To cancel a payment or retrieve payment details, an access token is required.
If the payment initiation was done without using a token, the TPP will receive an authorization code in the callback URL. This code can be used to retrieve access and refresh tokens. This is done by calling the POST /token API using the authorization code received and with “authorization_code” as grant_type. The API will return access and refresh tokens.
After expiration of the access token (valid for a period of 1 hour), the TPP can refresh the tokens received through the POST /token API.
This is done by recalling the POST /token API with the valid refresh token and “refresh_token” as grant_type.
The API will return new access and refresh tokens. The logical-ID communicated before in case of CAF flow is unchanged by this request.