• Developers API
  • API getting attachments from payment, statement or mastercard

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

    @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())

        Write a Reply...