Get the list of the customer current accounts and delayed debit cards
Use case
This service allows to retrieve the customer accounts list and delayed debit cards list (*).
Each account or card is returned with the links aiming to ease access to the relevant transactions and balances.
The resource ID provided for each account or card will be a parameter for the balances and transactions retrieval requests.
The result may be subject to pagination in case of having too many results. In this case, to make the results easier to read, there will be navigation links to access to the first, the next, the previous or the last page of results.
Access to this method is limited to a maximum of 4 batch accesses per calendar day for one given customer excluding pagination.
This method allows :
- to list all accounts and delayed debit cards linked to this accounts;
- to get the accounts balances;
- to get the delayed debit cards outstandings (*);
- to get the customer ID;
- to get the URI for the "GET /accounts/balances" and "GET /accounts/transactions" methods.
(*) This API covers active delayed cards which have been used at least once in the past two months.
Prerequisite
In order to process this request it 's needed to fill the eligibility and to get the OAUTH2 access token (see the use case "Get your access token").
Request
Request "get/accounts"
See also STET V1.4 / Part II / section 4.1 / page 5
Mandatory or facultative body parameters needed for calling the service
facultative parameter : PSU-IP-ADDRESS => this parameter is mandatory if the customer is connected
Returned result
If you didn't transmit any customer consented account with the PUT /consents method or that all consented accounts have been revoked since the last call of the PUT /consents method:
- This call allows you
to retrieve the customer accounts exclusive list without their balances, without the URI for the GET /accounts/balances and GET /accounts/transactions methods
- This call doesn't allow you
to get the customer identity
If you have transmitted at least one customer consented account with the PUT /consents method and that all consented accounts haven't been revoked following the last call to the PUT /consents method,
- This call allows
to retrieve all customer consented accounts with :
their balances if the account is included in the balances list transmitted with the PUT /consents method
The URI for the GET /accounts/balances method if the account is included in the balances list transmitted with the PUT /consents method
The URI for the GET /accounts/transactions method if the account is included in the transactions list transmitted with the PUT /consents method
to get the list containing all the delayed debit cards (*) linked to the consented accounts with :
their outstandings if the delayed debit card is linked to an account included in the balances list transmitted with the PUT /consents method
The URI for the GET /accounts/balances method if the delayed debit card is linked to an account included in the balances list transmitted with the PUT /consents method
The URI for the GET /accounts/transactions method if the delayed debit card is linked to an account included in the transactions list transmitted with the PUT /consents method
to get the customer identity if the "psuIdentity" field is at TRUE with the PUT /consents method
This call doesn't allow you
to get the accounts and delayed debit cards for the non consented accounts
The result may be subject to pagination in case of having too many accounts or cards in it. In this case, to make the results easier to read, there will be navigation links to access to the first, the next, the previous or the last page of results.
A self link will also be displayed in order to go back to the page obtained right after the request execution.
Access to this method is limited to a maximum of 4 batch accesses per calendar day, for a given customer (pagination not included). On the contrary, when the online customer asks his accounts directly, the accesses number is not limited.
(*) This API covers active delayed cards which have been used at least once in the past two months.
Example without consent registred with PUT /consents
Request
GET /stet/psd2/v1/accounts/
Result
Status code : 200
Body
{ { "_links": { "last": { }, "self": { }, "first": { } }, "accounts": [ { "cashAccountType": "CACC", "accountId": { "iban": "FR7613807008043001965409135" }, "resourceId": "038-CPT30019654091", "product": "COMPTE COURANT", "_links": {}, "usage": "ORGA", "psuStatus": "Account Holder", "name": "Tech-N Co", "bicFi": "CCBPFRPPNAN", "currency": "EUR", "details": "COMPTE COURANT" } ] } |
(data set Tech-N Co's persona - D0999993I0)
Example with two delayed debit cards et consent registred with PUT /consents
Request
GET /stet/psd2/v1/accounts/
Result
Status code : 200
Body
{{ "_links": { "last": { }, "self": { }, "first": { } }, "accounts": [ { "cashAccountType": "CACC", "accountId": { "iban": "FR7613807008063031966574122" }, "resourceId": "038-CPT30319665741", "product": "COMPTE CHEQUE", "balances": [ { "balanceType": "VALU", "name": "Solde en Valeur", "balanceAmount": { "amount": "0.00", "currency": "EUR" }, "referenceDate": "2019-05-17" }, { "balanceType": "CLBD", "name": "Solde Comptable", "balanceAmount": { "amount": "0.00", "currency": "EUR" }, "referenceDate": "2019-05-16" }, { "balanceType": "OTHR", "name": "Solde TP", "balanceAmount": { "amount": "0.00", "currency": "EUR" } } ], "_links": { "balances": { "templated": false, }, "transactions": { "templated": false, } }, "usage": "PRIV", "psuStatus": "Account Holder", "name": "BARDE ADAM", "bicFi": "CCBPFRPPNAN", "currency": "EUR", "details": "COMPTE CHEQUE" }, { "cashAccountType": "CACC", "accountId": { "iban": "FR7613807008063031966574219" }, "resourceId": "038-CPT30319665742", "product": "COMPTE COURANT", "balances": [ { "balanceType": "VALU", "name": "Solde en Valeur", "balanceAmount": { "amount": "-2894.05", "currency": "EUR" }, "referenceDate": "2019-05-17" }, { "balanceType": "CLBD", "name": "Solde Comptable", "balanceAmount": { "amount": "-2894.05", "currency": "EUR" }, "referenceDate": "2019-05-16" }, { "balanceType": "OTHR", "name": "Solde TP", "balanceAmount": { "amount": "-2894.05", "currency": "EUR" } } ], "_links": { "balances": { "templated": false, }, "transactions": { "templated": false, } }, "usage": "ORGA", "psuStatus": "Account Holder", "name": "SARL UNI PICCOLO", "bicFi": "CCBPFRPPNAN", "currency": "EUR", "details": "COMPTE COURANT" }, { "cashAccountType": "CARD", "resourceId": "038-GFCC01WcBfYTK70wJJ5LpsMI3EGQ", "product": "Visa Classic", "_links": { "balances": { "templated": false, "href": "https://www.rs-sandbox.api.89c3.com/stet/psd2/v1/accounts/038-GFCC01WcBfYTK70wJJ5LpsMI3EGQ/balances" }, "transactions": { "templated": false, } }, "usage": "PRIV", "psuStatus": "Account Holder", "linkedAccount": "038-CPT30319665741", "bicFi": "CCBPFRPPNAN", "accountId": { "other": { "identification": "C01WcBfYTK70wJJ5LpsMI3EGQ==", "schemeName": "CPAN", "issuer": "13807" } }, "balances": [ { "balanceType": "OTHR", "name": "Encours", "balanceAmount": { "amount": "0.00", "currency": "EUR" }, "referenceDate": "2019-05-31" }, { "balanceType": "OTHR", "name": "Dernier encours prélevé", "balanceAmount": { "amount": "78.65", "currency": "EUR" }, "referenceDate": "2019-04-30" } ], "name": "M ADAM BARDE XX9351", "currency": "EUR", "details": "CB VISA FACELIA DEBIT DIFFERE" }, { "cashAccountType": "CARD", "resourceId": "038-GFCC01mS9kXqK80z5X19_E7WmZjw", "product": "Visa Classic", "_links": { "balances": { "templated": false, "href": "https://www.rs-sandbox.api.89c3.com/stet/psd2/v1/accounts/038-GFCC01mS9kXqK80z5X19_E7WmZjw/balances" }, "transactions": { "templated": false, } }, "usage": "PRIV", "psuStatus": "Account Holder", "linkedAccount": "038-CPT30319665741", "bicFi": "CCBPFRPPNAN", "accountId": { "other": { "identification": "C01mS9kXqK80z5X19/E7WmZjw==", "schemeName": "CPAN", "issuer": "13807" } }, "balances": [ { "balanceType": "OTHR", "name": "Encours", "balanceAmount": { "amount": "00.00", "currency": "EUR" }, "referenceDate": "2019-05-31" }, { "balanceType": "OTHR", "name": "Dernier encours prélevé", "balanceAmount": { "amount": "156.27", "currency": "EUR" }, "referenceDate": "2019-04-30" } ], "name": "M ADAM BARDE XX4620", "currency": "EUR", "details": "VISA INTERNATIONALE DB DIFFERE" } ], "connectedPsu": "BARDE ADAM" } |
(data set Adam's persona - D0999994I0)
Example with pagination
Request
GET /stet/psd2/v1/accounts?page=1
Result
Status code : 200
Body
{ "accounts": [ { "ressourceId": "038-CPT30019114602", "bicFi": "CCBPFRPPNAN", "accountId": { "iban": "FR7613807008063001911460227", "other": { "identification": "", "schemeName": "", "issuer": "" } }, "name": "Données de commentaire personnel", "details": "COMPTE CHEQUE", "linkedAccount": "", "usage": "PRIV", "cashAccountType": "CACC", "product": "COMPTE CHEQUE", "currency": "EUR", "balances": [ { "name": "Solde en Valeur", "balanceAmount": { "currency": "EUR", "amount": "4986.56" }, "balanceType": "VALU", "lastChangeDateTime": "", "referenceDate": "2018-11-02", "lastCommitedTransaction": "" }, { "name": "Solde TP", "balanceAmount": { "currency": "EUR", "amount": "4986.56" }, "balanceType": "OTHR", "lastChangeDateTime": "", "referenceDate": "", "lastCommitedTransaction": "" } ], "psuStates": "Account Holder", "_links": { "balances": { "href": "v1/accounts/038-CPT30019114602/balances", "templated": false }, "transactions": { "href": "v1/accounts/038-CPT30019114602/transactions", "templated": false } } }, { "ressourceId": "038-CPT31019791961", "bicFi": "CCBPFRPPNAN", "accountId": { "iban": "FR7613807008063101979196195", "other": { "identification": "", "schemeName": "", "issuer": "" } }, "name": "Groupement R00006DZQI", "details": "COMPTE CHEQUE", "linkedAccount": "", "usage": "PRIV", "cashAccountType": "CACC", "product": "COMPTE CHEQUE", "currency": "EUR", "balances": [ { "name": "Solde en Valeur", "balanceAmount": { "currency": "EUR", "amount": "1808.19" }, "balanceType": "VALU", "lastChangeDateTime": "", "referenceDate": "2018-11-02", "lastCommitedTransaction": "" }, { "name": "Solde TP", "balanceAmount": { "currency": "EUR", "amount": "1808.19" }, "balanceType": "OTHR", "lastChangeDateTime": "", "referenceDate": "", "lastCommitedTransaction": "" } ], "psuStates": "Account Holder", "_links": { "balances": { "href": "v1/accounts/038-CPT31019791961/balances", "templated": false }, "transactions": { "href": "v1/accounts/038-CPT31019791961/transactions", "templated": false } } } ], "_links": { "self": { "href": "https://rs-ex-recmoa-89c3api.hpr.f.bbg/stet/psd2/v1/accounts?page=1" }, "first": { "href": "https://rs-ex-recmoa-89c3api.hpr.f.bbg/stet/psd2/v1/accounts" }, "last": { "href": "https://rs-ex-recmoa-89c3api.hpr.f.bbg/stet/psd2/v1/accounts?page=last" }, "next": { "href": "https://rs-ex-recmoa-89c3api.hpr.f.bbg/stet/psd2/v1/accounts?page=2" } } } |
A more complex example of request is given in "Sandbox assembly" use case.
See also STET V1.4.0.47 / Part III / section 5.1 / page 5
Error code
Here is the list of error codes descriptions for each service. There is a red annotation for errors being described in the CFONB codification.
Error | Error description |
AC01 (CFONB) | IncorrectAccountNumber : account number is invalid or missing |
AC04 (CFONB) | ClosedAccountNumber : account has been closed |
AC06 (CFONB) | BlockedAccount : account is blocked, prohibiting posting of transactions against it |
BE05 (CFONB) | UnrecognisedInitiatingParty : the AISP is not recognised |
BADS | BadScope : request with an access token which is not authorized to access to the resource (incorrect CBPII scope, instead of expected AISP scope) |
INTE | InternalError : there was an internal processing error |
INTS | InternalServerError : there was an internal communication error with the information system |
IPGN | InvalidPageNumber : the page number is invalid |
NAAC | No avalaible accounts : absence of eligible or granted accounts |
NGAC | NotGrantedAccount : access to the account has not been granted |
NIMP | NotImplemented : invalid method used (GET method expected) |
TMRQ | TooManyRequest : the maximum number of requests has been exceeded |
IPSU | InvalidPSU : unregistered subscriber number or terminated Cyber subscription |
Acceptation tests
The purpose of these tests is to allow you to practice some tests in order to take charge of the API to access it from your application.
Test description | Dataset |
Retrieve all the accounts of a customer (at least 2 accounts shall be configured in the ASPSP) => Verification of the mandatory hypermedia links (balances, self and transactions) | Persona : Alix - D0999992I0 Prerequisite : scope OAuth2 = aisp Result : response HTTP 200 => OK Retrieval of three accounts and three delayed debit cards |
Retrieve plenty of accounts linked to a customer and verify that the ASPSP uses correctly the pagination mechanism =>Verification of the optional hypermedia links prev, next, last. | Persona : Marc - D0999990I0 Prerequisite : scope OAuth2 = aisp Result : response HTTP 200 => OK return three accounts all on the same page |
Retrieve plenty of accounts and cards linked to a customer and verify that the ASPSP uses correctly the pagination mechanism =>Verification of the optional hypermedia links first, prev, next, last. | Persona : Adam - D0999994I0 Prerequisite : scope OAuth2 = aisp Result : response HTTP 200 => OK return two accounts and two delayed debit cards |
HTTP request with an access token which is not authorized to access to this resource (incorrect scope) | Persona : Marc - D0999990I0 Prerequisite : scope OAuth2 <> aisp Result : response HTTP403 => Access to the resource is not allowed error message : BADS |
HTTP request using POST method | Persona : Marc - D0999990I0 Prerequisite : scope OAuth2 = aisp Result : response HTTP405 => method not allowed |