Quickstart: Downloading attachments
You want to export receipts and invoices attached to payments to your application.
The scenario you want to achieve
The bunq user has accepted the authorization request and your application can read the bunq user’s account information.
Your application imports all the transactions and attachments.
The bunq user sees the transactions matched with the receipts and invoices in your application.
Before you start
Call sequence
List the payments of the user
GET
https://public-api.sandbox.bunq.com/v1/user/{userID}/monetary-account/{monetary-accountID}/payment
Path Parameters
Name | Type | Description |
---|---|---|
userID | integer | The ID of the user. |
monetary-accountID * | integer | The ID of the monetary account. |
Headers
Name | Type | Description |
---|---|---|
User-Agent | string | Information about the user agent originating the request. There are no restrictions on the value of this header. |
X-Bunq-Client-Authentication * | string | The token you get in the response of the session-server call. |
Check if the payments have attachments
GET
https://public-api.sandbox.bunq.com/v1/user/{userID}/monetary-account/{monetary-accountID}/payment/{paymentID}/note-attachment
Path Parameters
Name | Type | Description |
---|---|---|
userID | integer | The ID of the user. |
monetary-accountID * | integer | The ID of the monetary account. |
paymentID | integer | The ID of the payment |
Headers
Name | Type | Description |
---|---|---|
User-Agent | string | Information about the user agent originating the request. There are no restrictions on the value of this header. |
X-Bunq-Client-Authentication * | string | The token you get in the response of the session-server call. |
Save the attachment IDs.
Export the raw content of the attachments
GET
https://public-api.sandbox.bunq.com/v1/user/{userID}/attachment/{attachmentID}/content
Path Parameters
Name | Type | Description |
---|---|---|
userID | integer | The ID of the user. |
attachmentID | integer | The ID of the attachment. |
Headers
Name | Type | Description |
---|---|---|
User-Agent | string | Information about the user agent originating the request. There are no restrictions on the value of this header. |
X-Bunq-Client-Authentication * | string | The token you get in the response of the session-server call. |
You can use callbacks to make sure you don’t miss anything happening on the bunq account.
Last updated