phpFinTS icon indicating copy to clipboard operation
phpFinTS copied to clipboard

Credit card statements

Open mw108 opened this issue 1 year ago • 6 comments

Is it possible to use this library to get statements of credit cards linked to your bank account?

mw108 avatar Nov 24 '24 13:11 mw108

Anybody on this?

I have a Sparkasse BusinessCard, which is separated from my main account.

getAccounts() only gets the main account back, not the one for BusinessCard.

vielhuber avatar Jan 21 '25 15:01 vielhuber

Well - I would suggest asking the bank (Sparkasse) If Credit Card transactions from cards linked to bank accounts can be accessed via their fints APIs.

It is quite possible that the bank is not offering this data via their APIs...

peukerjonathan avatar Jan 21 '25 16:01 peukerjonathan

No one at the bank is competent to give me any information about FinTS. If getAccounts() only returns the main account, I can be sure that it won't work, right?

Do you know of any other banks that also return the credit card in getAccounts()?

vielhuber avatar Jan 21 '25 16:01 vielhuber

Unfortunately I do not use any such credit cards so I can personally not comment on that. But I would recommend to hand in your request in written form with the request to escalate your inquiry tp the IT department if necessary. Worked for me any time I had specific questions regarding fints with the Sparkasse.

peukerjonathan avatar Jan 21 '25 16:01 peukerjonathan

The people over at python fints https://github.com/raphaelm/python-fints/issues/73 read the accounts from the initial udp segment which should be returned when logging in. One is very certain that it is the correct way to query the accounts but I have no clue of the specification.

Is it possible to access the UDP data somehow from the login response?

michaelklopf avatar Mar 27 '25 14:03 michaelklopf

Yes it's possible, in fact we move that data into the persistent state anyway (at least for users who call persist() like they should). It's currently behind a private field, you could play around with it by making it public: $fints->upd->hiupd. Type-wise, you'll get HIUPD (which is quite a slim interface today), but in reality you'll get HIUPDv4 or HIUPDv6, which should contain the data you're interested in.

If this is useful data, let's add a facade like $fints->getAccounts() that returns this data in a more suitable format (not a BaseSegment subclass).

Philipp91 avatar Mar 27 '25 22:03 Philipp91