Use and check funds availability
Use case
This call allows to check if a given amount can be covered by the liquidity that is available on a PSU (Payment Service User) cash account or payment card.
Prerequisite
In order to process this request some eligibility prerequisites are needed, like to get the OAUTH2 access token (see use case "Retrieve your access token") and to provide the body parameters.
Request
post/funds-confirmations
Mandatory or facultative body parameters needed for this service call
paymentCoverageRequestId - mandatory : Payment request ID
payee - facultative : The merchant where the card is accepted as information to the PSU
instructedAmount - mandatory : The structure embedding the amount and the currency to be used
⇒ currency - mandatory : The currency of the amount
⇒ amount - mandatory : Amount of money to be moved between the debtor and creditor, before deduction of charges, expressed in the currency as ordered by the initiating party
accountId - mandatory : Unique and unambiguous identification for the account between the account owner and the account servicer.
⇒ iban - facultative : International Bank Account Number (IBAN)
⇒ other - facultative : Unique identification of an account, a person or an organisation, as assigned by an issuer
=> identification - mandatory : API Identifier
=> schemeName - mandatory : Name of the identification scheme (BANK, COID, SREN, SRET, NIDN, OAUT, CPAN)
=> issuer - facultative : Entity that assigns the identification
Result returned
The structure of the returned result embeds the original request and the result of the availability as a Boolean.
A self link will also be displayed in order to go back to the page obtained right after the request execution.
Example
Request
POST http://localhost:8080/v1/funds-confirmations
Body
{ "paymentCoverageRequestId" : "MyCoverage123456", "instructedAmount" : { "currency" : "EUR", "amount" : "123.45" }, "accountId" : { "iban" : "FR7613807008043001965405158" } } |
Result
Status code : 200
Body
{ "result": true, "request": { "accountId": { "iban": "FR7613807008043001965405158" }, "paymentCoverageRequestId": "MyCoverage123456", "instructedAmount": { "amount": "123.45", "currency": "EUR" } }, "_links": { "self": { "href": "https://www.rs-sandbox.api.89c3.com/stet/psd2/v1/funds-confirmations" } } } |
(data set Marc's persona -D0999990I0)
Acceptation 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.
Test description | Dataset |
Nominal case: payment can be covered | Persona : Marc -D0999990I0
Prerequisite : scope OAuth2 = piisp
Amount : Amount lower than à 459€ accountId : FR7613807008043001965405255 Currency : EUR Result : positive response :
|
Error case :payment cannot be covered due to insuffient funds | Persona : Marc -D0999990I0
Prerequisite : scope OAuth2 = piisp
Amount : Amount higher than 4 179€
accountId : FR7613807008043001965405158 Currency : EUR
Result : Negative response :
|
HTTP Request using the GET method | Persona : Marc -D0999990I0
Prerequisite : scope OAuth2 = piisp
Result : response HTTP code 405 => method not allowed |
HTTP request with an IBAN not present or not valid as a body parameter | Persona : Marc -D0999990I0
Prerequisite : scope OAuth2 = piisp Amount : Amount of 4 179€ accountId : FRXXXX807008043001965405158 Currency : EUR Result : response HTTP code 400 => bad request error message : AC01 |
HTTP request with a structure of amount/currency not present or not valid as a body parameter | Persona : Marc -D0999990I0
Prerequisite : scope OAuth2 = piisp accountId : FR7613807008043001965405158 Result : response HTTP code 400 => bad request error message : FF01 |
HTTP request with an amount not present or not valid as a body parameter | Persona : Marc -D0999990I0
Prerequisite : scope OAuth2 = piisp
Amount : accountId : FR7613807008043001965405158 Currency : EUR Result : response HTTP code 400 => bad request error message : FF01 |
HTTP request with a currency not present or not valid as a body parameter | Persona : Marc -D0999990I0
Prerequisite : scope OAuth2 = piisp
Amount : amount higher to 4 179€ accountId : FR7613807008043001965405158 Currency : Result : response HTTP code 400 => bad request error message : FF01 |
HTTP request a payment request identifier not present or not valid as a body parameter | Persona : Marc -D0999990I0
Prerequisite : scope OAuth2 = piisp
Amount : amount higher to 4 179€
accountId : FR7613807008043001965405158
Currency : EUR Result : réponse HTTP code 400 => bad request error message : FF01 |