Accounts CZ API Flow

Onboarding your user

Before your first call to account information services API your user should authorize you to access user's personal data.

  1. Giving consent from your user to you to access his/her personal banking data

    1) Your application initiates the flow by directing your user browser to the authorization endpoint. Initiation is carried out by making a GET /oauth2/authorize request.

    2) The bank authenticates your user and establishes whether the user grants or denies your access request.

    3) Assuming your user grants access, the bank server redirects the user browser back to your application using the redirection URI provided during your application registration. The redirection URI includes an authorization code.

    4) Your application requests an access token from the bank server's token endpoint by including the authorization code received in the previous step. The authorization code exchange is carried out by making a POST /oauth2/token request.

    5) The bank server authenticates your application, validates the authorization code, and ensures that the redirection URI received matches the URI used to redirect your application in step 3. If it is valid, the bank server responds back with an access token and a refresh token. Issued refresh token expires after 90 days, when new authorization has to be completed by client.

    After token revocation

    Issued token can be revoked by your user or after time period - 90 days for PSD2 AISP APIs by default. In this case the bank server responses with HTTP 401 Unauthorized to your API call. In this case you need to get the consent by starting the consent flow again from Step 1.

  2. Get Consented Accounts List

    1) Your application initiate GET /accounts request with valid access token.

    2) The bank server validates access token and returns consented list of current and credit card accounts.

  3. Get Account Balances

    1) To provide your user with balance information about account your application initiates GET /accounts/{id}/balance request with valid access token.

    2) The bank server validates access token and returns account's detail and balances.

  4. Get Account Transactions History

    1) Your application requests account transaction history by GET /accounts/(id)/transactions with valid access token.

    2) The bank server validates access token and returns a page with account's transactions.

    Pagination

    Your application can provide a paginated response for transactions history that returns multiple transaction records. For a paginated responses, please ensure that the number of transaction records on a page (value of pageSize request parameter) are within reasonable limits - a minimum of 10 records (except on the last page where there are no further records) and a maximum of 100 records.

  5. Get Account Transactions History older than 90 days

    If parameter "dateFrom" is used in the request and is older than 90 days from the current date, fresh OAuth2 token is required, so you have to complete Step 1 again, otherwise you receive unauthirized error.

  6. Get List of the Standing Orders

    1) Your application initiate GET /standingorders request with valid access token.

    2) The bank server validates access token and returns list of all active standing orders on the customer’s current accounts for which is consent valid

    Standing orders list supports pagination.

    Standing orders list is filtered based on the currency of the source account. Standing orders setup on the default currency bucketd are sent if this parameter is not used. List can’t be filtered based on the date.

  7. Get Details of Standing Order

    1) Your application initiate GET /standingorders/(transactionIdentification) request with valid access token.

    2) The bank server validates access token and returns details of the requested standing order

  8. Refresh Expired Access Token

    When an access token obtained through an authorization code grant expires, your application should attempt to get a new access and refresh token by calling POST /oauth2/token using refresh token. For more information see Section 6 Refreshing an Access Token in of the OAuth 2.0 specification.
    OAuth 2.0 specification

    If your application fails to get an access token using a refresh token, your application would have to request new token by starting the flow from Step 1.