Confirmation of Funds Service (COF)

POST /v1/funds-confirmations

Request Header

AttributeTypeConditionDescription
X-Request-IDUUIDMandatoryID of the request, unique to the call, as determined by the initiating party (TPP).
AuthorizationStringMandatoryThe oAuth2 Bearer token obtained from the performed SCA prior to this request.
TPP-Redirect-URIStringMandatoryURI of the TPP, where the transaction flow shall be redirected after a Redirect.
Consent-IDUUIDMandatoryThe consent ID of the related AIS consent.

Request Body

AttributeTypeConditionDescription
accountCard AccountMandatoryReference to an account by IBAN or masked PAN.
The masked PAN should match pattern 123456xxxxxx1234
The IBAN should match pattern [A-Z]2[0-9]2[a-zA-Z0-9]30
instructedAmountObjectMandatory
   amountStringMandatoryThe amount with fractional digits, compliant to the currency definition. Up to 14 significant digits, negative amounts are signed with minus. Decimal separator is a dot.
Pattern: -?[0-9]14(.[0-9]3)?
   currencyStringMandatoryISO 4217 Alpha 3 currency code. Pattern: [A-Z]3

Response Code

HTTP Response Code 200 (OK).

Response Headers

AttributeTypeConditionDescription
X-Request-IDUUIDMandatoryID of the request, unique to the call, as determined by the initiating party (TPP).
LocationStringMandatoryLocation of the created resource.
ASPSP-SCA-ApproachStringMandatoryREDIRECT.

Response Body

AttributeTypeConditionDescription
fundsAvailableBooleanMandatoryEquals true if sufficient funds are available at the time of the request, false otherwise.

Example

Request

cURL

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&currency=EUR'

Python

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)

Node.js

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

<?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
}