POST /v1/funds-confirmations
Request header
Attribute |
Type |
Condition |
Description |
X-Request-ID |
UUID |
Mandatory |
ID of the request, unique to the call, as determined by the initiating party (TPP). |
Authorization |
String |
Mandatory |
The oAuth2 Bearer token obtained from the performed SCA performed prior to this request. |
TPP-Redirect-URI |
String |
Mandatory |
URI of the TPP, where the transaction flow shall be redirected to after a Redirect. |
Consent-ID |
UUID |
Mandatory |
The consent ID of the related AIS consent. |
Request body
Attribute |
Type |
Condition |
Description |
account |
Mandatory |
Reference to an account by IBAN or masked PAN. The masked PAN should apply to pattern 123456xxxxxx1234 The IBAN should apply to pattern [A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30} |
|
instructedAmount |
Object |
Mandatory |
|
amount |
String |
Mandatory |
The amount given with fractional digits, where fractions must be compliant to the currency definition. Up to 14 significant digits, Negative amounts are signed my minus. The decimal separator is a dot. Pattern: -?[0-9]{1,14}(\.[0-9]{1,3})? |
currency |
String |
Mandatory |
ISO 4217 Alpha 3 currency code. Pattern: [A-Z]{3} |
Response Code
HTTP Response Code 200 (OK).
Response headers
Attribute |
Type |
Condition |
Description |
X-Request-ID |
UUID |
Mandatory |
ID of the request, unique to the call, as determined by the initiating party (TPP). |
Location |
String |
Mandatory |
Location of the created resource. |
ASPSP-SCA-Approach |
String |
Mandatory |
REDIRECT. |
Response body
Attribute |
Type |
Condition |
Description |
fundsAvailable |
Boolean |
Mandatory |
Equals true if sufficient funds are available at the itme of the request, false otherwise. |
Example
Request
curl -X POST \
https://mp-psd2-api.mypos.com/v1/funds-confirmations \
-H 'API-Key: aGDmxHAmpMWUL1txqCsjEcOS' \
-H 'Authorization: Bearer oqeeWzoYfqkf1RsfyaB3hyNiLvY7GNAV6Kta7sGa9X' \
-H 'X-Request-ID: a552babc-7081-44e7-9361-61eb17e0bfd9' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Consent-ID: 3c7816ee-3d51-4bf5-8ced-ece2af35d431' \
-d 'accountNumber=01234567890&amount=1.99¤cy=EUR'
import requests
url = "https://mp-psd2-api.mypos.com/v1/funds-confirmations"
payload = dict(
accountNumber="01234567890",
amount=1.99,
currency="EUR"
)
headers = {
'API-Key': "aGDmxHAmpMWUL1txqCsjEcOS",
'X-Request-ID': "a552babc-7081-44e7-9361-61eb17e0bfd9",
'TPP-Redirect-URI': "https://test.com",
'Authorization': "Bearer oqeeWzoYfqkf1RsfyaB3hyNiLvY7GNAV6Kta7sGa9X",
'Consent-ID': "3c7816ee-3d51-4bf5-8ced-ece2af35d431",
'Content-Type': "application/x-www-form-urlencoded"
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
var request = require("request");
var options = { method: 'POST',
url: 'https://mp-psd2-api.mypos.com/v1/funds-confirmations',
headers: {
'Authorization': 'Bearer Xs9224bd2LxadKGEEuj8jtbq8b9uuPsRqFb99K5RHq',
'Content-Type': 'application/x-www-form-urlencoded',
'Consent-ID': '3c7816ee-3d51-4bf5-8ced-ece2af35d431',
'X-Request-ID': 'b1cfd34c-ea54-4ee2-85d7-d43531b65112',
'API-Key': 'aGDmxHAmpMWUL1txqCsjEcOS' },
form: {
accountNumber: '50553500971',
amount: '1.99',
currency: 'EUR'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
<?php
$request = new HttpRequest();
$request->setUrl('https://mp-psd2-api.mypos.com/v1/funds-confirmations');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders(array(
'Authorization' => 'Bearer Xs9224bd2LxadKGEEuj8jtbq8b9uuPsRqFb99K5RHq',
'Content-Type' => 'application/x-www-form-urlencoded',
'Consent-ID' => '3c7816ee-3d51-4bf5-8ced-ece2af35d431',
'X-Request-ID' => 'b1cfd34c-ea54-4ee2-85d7-d43531b65112',
'API-Key' => 'aGDmxHAmpMWUL1txqCsjEcOS'
));
$request->setContentType('application/x-www-form-urlencoded');
$request->setPostFields(array(
'accountNumber' => '50553500971',
'amount' => '1.99',
'currency' => 'EUR'
));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
Response
{
"fundsAvailable": true
}