Sice jsem to zatím nedělal (když jsem to v minulosti potřeboval, šlo o transparentní účet který má historii veřejně na webu) ale v dokumentaci to nevypadá nepřekonatelně.
Zkus začít tady (premium API umí stáhnout historii 90 dní zpět):
https://rbi-merlin.apiconnect.ibmcloud.com/rbcz/prod15/productMají tam i testovací prostředí.
"Description
Before making a call to Premium API, you need to register your app at our Developer portal. You need to get an invitation first. At Developer Portal you obtain ClientID and ClientSecrete that your app must send in the request as X-IBM-Client-Id and X-IBM-Client-Secret respectively. These are your keys that grant your app access to the API. However, this is not enough, for a successful call your app needs to use mTLS. Thus, you not only need https but also a client certificate issued by us. Each bank client/user can issue several certificates. Each certificate can permit different sets of operations (http methods) on different bank accounts. All this must be configured in Internet Banking first by each bank client/user (bank clients need to look under Settings and do not forget to download the certificate at the last step). The certificate is downloaded in PKCS#12 format as *.p12 file and protected by a password chosen by the bank client/user. Yes, your app needs the password as well to get use of the *p12 file for establishing mTLS connection to the bank.
Client certificates issued in Internet Banking for bank clients/users have limited validity (e.g. 5 years). However, each year certificates are automatically blocked and bank client/user must unblock them in Internet Banking. It is possible to do it in advance and prolong the time before the certificate is blocked. Your app should be prepared for these scenarios and it should communicate such cases to your user in advance to provide seamless service and high user-experience of your app.
Note: Be aware, that in certain error situations, API can return different error structure along with broader set of http status codes, than the one defined below"Example Request:
curl --request GET \
--url 'https://mtlsapi-rbi-merlin.apiconnect.ibmcloud.com/rbcz/prod15/rbcz/premium/api/accounts/REPLACE_ACCOUNTNUMBER/REPLACE_CURRENCYCODE/transactions?from=REPLACE_THIS_VALUE&to=REPLACE_THIS_VALUE&page=REPLACE_THIS_VALUE' \
--header 'PSU-IP-Address: REPLACE_THIS_VALUE' \
--header 'X-IBM-Client-Id: REPLACE_THIS_VALUE' \
--header 'X-IBM-Client-Secret: REPLACE_THIS_VALUE' \
--header 'X-Request-Id: REPLACE_THIS_VALUE' \
--header 'accept: application/json'
Example Response:
Definition
GET https://mtlsapi-rbi-merlin.apiconnect.ibmcloud.com/rbcz/prod15/rbcz/premium/api/accounts/{accountNumber}/{currencyCode}/transactions
Response
{
"lastPage": true,
"transactions": {
"transaction": [
{
"entryReference": 3887196517,
"amount": {
"value": -1668.59,
"currency": "CZK"
},
"creditDebitIndication": "DBIT",
"bookingDate": "2007-10-28T13:12:29.568Z",
"valueDate": "2021-07-22T13:51:43.968Z",
"bankTransactionCode": {
"code": "10000401000"
},
"entryDetails": {
"transactionDetails": {
"references": {
"endToEndIdentification": "EBGTF015477198"
},
"instructedAmount": {
"value": 61,
"currency": "EUR",
"exchangeRate": 0.03656
},
"chargeBearer": "SHAR",
"paymentCardNumber": "547872XXXXXX9475",
"relatedParties": {
"counterParty": {
"name": "Firma Ltd.",
"postalAddress": {
"street": "Na dlouhém lánu 35",
"city": "Praha 6",
"country": "CZ"
},
"organisationIdentification": {
"name": "Firma Ltd.",
"bicOrBei": "KOMBCZPP",
"bankCode": "0100",
"postalAddress": "ERROR_MAXDEPTH"
},
"account": {
"iban": "CZ0801000000192000145399",
"accountNumberPrefix": "000019",
"accountNumber": "2000145399"
}
},
"intermediaryInstitution": {
"name": "Komerční banka, a.s.",
"bicOrBei": "KOMBCZPP",
"bankCode": "0100",
"postalAddress": {
"street": "Na příkopě 969/33",
"city": "Praha 1",
"shortAddress": "Na příkopě 969/33, Praha, CZ",
"country": "CZ"
}
},
"ultimateCounterParty": {
"name": "CZ0801000000192000145399",
"postalAddress": {
"street": "Na dlouhém lánu 35",
"city": "Praha 6",
"country": "CZ"
}
}
},
"remittanceInformation": {
"unstructured": "61 EUR;FIRMA LTD;12345678 RADEK DVA RADEK TRI RADEK CTYRI",
"creditorReferenceInformation": {
"variable": "1234567890",
"constant": "558",
"specific": "1234567890"
},
"originatorMessage": "naše platba"
}
}
}
},
{
"entryReference": 3887196517,
"amount": {
"value": -1668.59,
"currency": "CZK"
},
"creditDebitIndication": "DBIT",
"bookingDate": "2006-11-16T16:08:48.355Z",
"valueDate": "2002-11-03T15:29:49.155Z",
"bankTransactionCode": {
"code": "10000401000"
},
"entryDetails": {
"transactionDetails": {
"references": {
"endToEndIdentification": "EBGTF015477198"
},
"instructedAmount": {
"value": 61,
"currency": "EUR",
"exchangeRate": 0.03656
},
"chargeBearer": "SHAR",
"paymentCardNumber": "547872XXXXXX9475",
"relatedParties": {
"counterParty": {
"name": "Firma Ltd.",
"postalAddress": {
"street": "Na dlouhém lánu 35",
"city": "Praha 6",
"country": "CZ"
},
"organisationIdentification": {
"name": "Firma Ltd.",
"bicOrBei": "KOMBCZPP",
"bankCode": "0100",
"postalAddress": "ERROR_MAXDEPTH"
},
"account": {
"iban": "CZ0801000000192000145399",
"accountNumberPrefix": "000019",
"accountNumber": "2000145399"
}
},
"intermediaryInstitution": {
"name": "Komerční banka, a.s.",
"bicOrBei": "KOMBCZPP",
"bankCode": "0100",
"postalAddress": {
"street": "Na příkopě 969/33",
"city": "Praha 1",
"shortAddress": "Na příkopě 969/33, Praha, CZ",
"country": "CZ"
}
},
"ultimateCounterParty": {
"name": "CZ0801000000192000145399",
"postalAddress": {
"street": "Na dlouhém lánu 35",
"city": "Praha 6",
"country": "CZ"
}
}
},
"remittanceInformation": {
"unstructured": "61 EUR;FIRMA LTD;12345678 RADEK DVA RADEK TRI RADEK CTYRI",
"creditorReferenceInformation": {
"variable": "1234567890",
"constant": "558",
"specific": "1234567890"
},
"originatorMessage": "naše platba"
}
}
}
},
{
"entryReference": 3887196517,
"amount": {
"value": -1668.59,
"currency": "CZK"
},
"creditDebitIndication": "DBIT",
"bookingDate": "2006-06-09T11:27:33.914Z",
"valueDate": "2013-01-07T18:51:07.983Z",
"bankTransactionCode": {
"code": "10000401000"
},
"entryDetails": {
"transactionDetails": {
"references": {
"endToEndIdentification": "EBGTF015477198"
},
"instructedAmount": {
"value": 61,
"currency": "EUR",
"exchangeRate": 0.03656
},
"chargeBearer": "SHAR",
"paymentCardNumber": "547872XXXXXX9475",
"relatedParties": {
"counterParty": {
"name": "Firma Ltd.",
"postalAddress": {
"street": "Na dlouhém lánu 35",
"city": "Praha 6",
"country": "CZ"
},
"organisationIdentification": {
"name": "Firma Ltd.",
"bicOrBei": "KOMBCZPP",
"bankCode": "0100",
"postalAddress": "ERROR_MAXDEPTH"
},
"account": {
"iban": "CZ0801000000192000145399",
"accountNumberPrefix": "000019",
"accountNumber": "2000145399"
}
},
"intermediaryInstitution": {
"name": "Komerční banka, a.s.",
"bicOrBei": "KOMBCZPP",
"bankCode": "0100",
"postalAddress": {
"street": "Na příkopě 969/33",
"city": "Praha 1",
"shortAddress": "Na příkopě 969/33, Praha, CZ",
"country": "CZ"
}
},
"ultimateCounterParty": {
"name": "CZ0801000000192000145399",
"postalAddress": {
"street": "Na dlouhém lánu 35",
"city": "Praha 6",
"country": "CZ"
}
}
},
"remittanceInformation": {
"unstructured": "61 EUR;FIRMA LTD;12345678 RADEK DVA RADEK TRI RADEK CTYRI",
"creditorReferenceInformation": {
"variable": "1234567890",
"constant": "558",
"specific": "1234567890"
},
"originatorMessage": "naše platba"
}
}
}
}
]
}
}