Get a List of Payment Accounts
➤ Principle
Using this service, you can get access various data from a payment account authorized by the customer :
list all eligible online accessible payment accounts ;
retrieve accounting balance ;
get URI for the GET /end-user-identity method ;
get URI for GET /accounts/balances and GET /accounts/transactions methods.
Access to this method is limited to a maximum of 4 batch per day for one given TPP and PSU (except if the PSU is connected and has requested this operation).
➤ Prerequisites
In order to proceed, TPP needs to fulfill all eligibility criteria and to present a valid OAUTH2 Authorization token (see use case "Get your token").
➤ Request
Method "GET /accounts"
See also STET V1.4.2.17 / Part II / section 4.2 page 27
➤ Returned result
IF YOU USE THIS METHOD FOR THE FIRST TIME
(therefore if you didn't send previously any information using PUT /consents, OR if all granted accounts have not been revoked using PUT /consents - see use case "Forward customer's consent") :
This call allows you to list all eligible online accessible authorized payment accounts from our customer (without balances, URI or ressourceID) for the following methods GET /accounts/balances, GET /accounts/transactions and GET /end-user-identity.
IF YOU HAVE ALREADY FORWARDED AT LEAST ONE CONSENT FROM THE CUSTOMER
(therefore if you have used previously PUT /consents request, OR if all granted accounts have not been revoked using PUT /consents - see use case "Forward customer's consent") : this call allows you to retrieve all eligible online accessible authorized payment account with the following additional data :
Accounting balance if this account is flagged in the "balances" parameter in PUT /consents method
- URI for the GET /accounts/balances method if this account is flagged in the "balances" parameter in PUT /consent
URI for the GET /accounts/transactions method if this account is flagged in the "transactions" parameter in PUT /consent
Get payment account holder identity if the field "psuIdentity" has been setup at TRUE value in the PUT /consents.
Note
The « currency » paramater is now inserted in « accountId » field
➤ Example
You can find an example of this request in section "Test our API" and then "Use our sandbox".
➤ Acceptance tests
The purpose of these tests is to ensure that the API complies with the STET standard. They should be validated before any application deployment.
Description | Test data |
Get all PSU payment accounts | PSU Persona : CLAIRE PSU context = BY-AISP scope OAuth2 = aisp
Result: message HTTP 200 => OK with 2 accounts returned |
HTTP request with non autorized access token for this resource (wrong scope) => check if HTTP 403 is returned (access refused)
| PSU Persona : LEA PSU context = BY-AISP scope OAuth2 <> aisp
Result : Error message HTTP 403 returned |
Use a non authorized request (POST) => check if HTTP 405 is returned
| PSU Persona : LEA PSU context = BY-AISP scope OAuth2 = aisp Result : Error message HTTP 405 returned |