Links
Comment on page

Quickstart: Downloading attachments

You want to export receipts and invoices attached to payments to your application.

The scenario you want to achieve

  1. 1.
    The bunq user has accepted the authorization request and your application can read the bunq user’s account information.
  2. 2.
    Your application imports all the transactions and attachments.
  3. 3.
    The bunq user sees the transactions matched with the receipts and invoices in your application.

Before you start

  • Make sure that you have opened a session
  • Make sure you pass the session Token in the X-Bunq-Client-Authentication header in all the following requests of the session.

Call sequence

get
https://public-api.sandbox.bunq.com/v1
/user/{userID}/monetary-account/{monetary-accountID}/payment
List the payments of the user
get
https://public-api.sandbox.bunq.com/v1
/user/{userID}/monetary-account/{monetary-accountID}/payment/{paymentID}/note-attachment
Check if the payments have attachments
Save the attachment IDs.
get
https://public-api.sandbox.bunq.com/v1
/user/{userID}/attachment/{attachmentID}/content
Export the raw content of the attachments
You can use callbacks to make sure you don’t miss anything happening on the bunq account.