Thank you for your replies, the documentation is very vague in my opinion, it is more a bunch of examples (which don't really work). But in the example they give for my situation the data of an example transaction as given in the example as a variable, so they don't retreive it from the transaction itself, but I think I have found a workaround. The way I have done it know is as follows:
By creating the transaction a transaction ID is generated by the Buckaroo system, I put it in a database with another, known, id. After the transaction I'll retreive the transaction ID (since I know the other ID), and with help of this transaction ID I can retreive the data of the transaction (whether it failed or not).
I don't know whether this is the best solution, but it looks like it works. If someone accidentally does know this system and know of a beter way to do this, pleas feel free to tell me how.