MichaelRookie
How can I get attachements from a payment or statement?
$statement->getAttachment() return an empty array.
The web-app is using a differnt endpoint .../note which is not accessible on api.bunq.com
How can I get attachements from a payment or statement?
$statement->getAttachment() return an empty array.
The web-app is using a differnt endpoint .../note which is not accessible on api.bunq.com
Hey there, @Michael-Cyan-Cheetah-708247055#282916 👋
Thank you for posting your question here! If you don't receive a response from our bunq community members, don't hesitate to contact our API support team. They are ready to assist you promptly. You can reach them by sending an email to apipartner@bunq.com 🌈
@Michael-Cyan-Cheetah-708247055#282916 Normally you can use the listing method from the NoteAttachmentMasterCardAction class to get the card payment attachments. But it looks like there is a bug in this method, because it returns an error.
I've created a workaround for this issue:
https://gist.github.com/basst85/eaed1e8b23fd718efaa22a118aea56cb
Btw, If you want to create a statement (with all transactions for a card) you can use the create and get methods from the ExportStatementCardCsv class.
@Bastiaan#282961 btw, you can create a statement export for a payment event this way:
//Create export statement for an event (id from Event::listing())
$export = ExportStatementPayment::create($eventId, $monetaryAccount->getId());
//get content of the statement export
$exportStatementContent = ExportStatementPaymentContent::listing($eventId, $export->getValue(), $monetaryAccount->getId());// returns the raw content of the statement in PDF format
var_dump($exportStatementContent->getValue())