bunq API Documentation
SDK'sPostman Collection
  • Getting Started
    • Welcome to the bunq API documentation
    • Tools
      • Software Development Kits (SDKs)
        • PHP
          • Usage
          • Tests
          • Exceptions
        • Java
          • Usage
          • Tests
          • Exceptions
        • Python
          • Usage
          • Tests
          • Exceptions
        • C#
          • Usage
          • Tests
          • Exceptions
      • Postman
      • Android Emulator
      • Developers Portal
  • Basics
    • bunq API Objects
      • User
      • Monetary Account
      • Payment
      • RequestInquiry
      • Card
      • Attachment and Note Attachment
    • API Context, Device Installation and Session
    • Authentication
      • API Keys
      • OAuth
    • Pagination
    • Errors
    • Rate Limits
    • Response body formatting
    • Moving to production
    • Headers
  • NOT SO BASICS
    • Signing
      • Python Code Example
        • Full main.py
        • Full bunq_lib.py
        • Full signing.py
      • PHP Code Example
    • Callbacks (Webhooks)
  • PSD2
    • Are you a Third Party Provider (TPP)? Start here!
      • Register as a TPP
      • Change your avatar
    • Account Information Service Provider (AISP)
    • Payment Initiation Service Provider (PISP)
    • Card-Based Payment Instrument Issuer (CBPII)
  • Support
    • FAQ
    • bunq status page
    • Terms and Conditions
  • TUTORIALS
    • Your first payment
      • Introduction
      • Creating a sandbox user and getting an API key
      • Creating the API Context
        • Creating the Installation
        • Device Registration
        • Start a Session
      • Setting up a sandbox user
        • Retrieving my user details
        • Getting sandbox money on the user account
        • Sandbox version of the bunq app
      • First Payments
    • Receiving payments on your website using bunq.me
    • How to manage your cards
      • Introduction
      • Ordering a card
      • Setting the card Limit and changing the PIN code
  • API Reference
    • Start here
    • Additional Transaction Information Category
    • Additional Transaction Information Category User Defined
    • Attachment
    • Attachment Public
    • Avatar
    • Billing Contract Subscription
    • bunqme
      • bunqme Tab
      • bunqme Fundraiser Profile
      • bunqme Tab Response
      • bunqme Fundraiser Result
    • Callback URL OAuth
    • Cards
      • Card
      • Card-Batch
      • Card Credit
      • Card Debit
      • Card Name
      • Card Replace
  • Confirmation Of Funds
  • Content and Exports
  • Currency Cloud
    • Currency cloud Benificiairy
    • Payment Quote
  • Currency Conversion
    • Convert
    • Quotes
  • Customer Statements
  • Devices
  • Draft Payment
  • Event
  • Exports
    • Export Annual Overview
    • Export RIB
    • Export Statement Card
  • Generated CVC2
  • Ideal Merchant Transaction
  • Insights
  • Installation
  • Invoice
  • Invoice Export
  • Legal Name
  • Limit
  • Mastercard Action
  • Monetary Account
    • Monetary Account Bank
    • Monetary Account Card
    • Monetary Account External
    • Monetary Account External Savings
    • Monetary Account Joint
    • Monetary Account Savings
    • Monetary Account Savings External
  • Name
  • Note Text & Attachment
    • Adyen Card Transaction
    • Switch Service Payment
    • bunqme fundraiser result
    • Draft Payment
    • Ideal Merchant Transaction
    • Mastercard Action
    • Open Banking Merchant
    • Payment Batch
    • Payment Delayed
    • Payment
    • Request Inquiry Batch
    • Request Response
    • Schedule Payment
    • Schedule Request
    • Sofort
    • Whitelist Result
  • Notification Filter
    • Notification Filter Email
    • Notification Filter Failure
    • Notification Filter Push
    • Notification Filter URL
  • OAuth
  • Payment
    • Payment
    • Payment Auto Allocate
    • Payment Batch
  • Payment Auto Allocation
  • Payment Service Provider
    • Payment Service Provider Credential
    • Payment Service Provider Draft Payment
    • Payment Service Provider Issuer Transaction
  • Request
    • Request Inquiry
    • Request Inquiry Batch
    • Request Response
  • Sandbox Users
  • Schedule
    • Schedule Instance
    • Schedule Payment
    • Schedule Payment Batch
  • Server Error
  • Server Public Key
  • Session
  • [deprecated] Share Invite Monetary Account Inquiry
  • Share Invite Monetary Account Response
  • Sofort Merchant Transaction
  • Statement
  • Switch Service Payment
  • Token QR Request Sofort
  • Transferwise
    • Transferwise Currency
    • Transferwise Quote
    • Transferwise Recipient
    • Transferwise Recipient Requirement
    • Transferwise Transfer
    • Transferwise Transfer Requirement
    • Transferwise User
  • Tree Progress
  • User
    • User Person
    • User Company
    • User Payment Service Provider
  • Whitelist SSD
    • Whitelist SSD One Off
    • Whitelist SSD Recurring
  • Content
Powered by GitBook
On this page
  • OAuth Authentication
  • How OAuth Works
  • Getting Started with OAuth
  • OAuth Scopes & Permissions
  • OAuth Authorization Request
  • Exchanging the Authorization Code for an Access Token
  • Making API Calls with OAuth

Was this helpful?

  1. Basics
  2. Authentication

OAuth

PreviousAPI KeysNextPagination

Last updated 7 days ago

Was this helpful?

Important Note If you, as a developer, intend to access data belonging to other bunq users (e.g., account information, transaction history, or initiate payments on their behalf), you must ensure that you:

  • ✅ Fully comply with for API usage.

  • ✅ Obtain explicit user consent as required.

  • ⚖️ May be subject to , including registration as an AISP (Account Information Service Provider) or PISP (Payment Initiation Service Provider) with your national competent authority.

Misuse or non-compliance may lead to access being revoked or legal consequences.

OAuth Authentication

OAuth 2.0 is an industry-standard protocol that allows third-party applications to securely access bunq user accounts without exposing credentials. This method enables seamless authorization while maintaining user control over permissions.

How OAuth Works

OAuth lets your app request access to a bunq user’s account. If the user grants permission, your app receives an access token, which functions similarly to an API key but with predefined scopes. Depending on your use case, you may need a PSD2 permit to access sensitive financial data or initiate payments on behalf of users.

Getting Started with OAuth

To integrate OAuth authentication, follow these steps:

  1. Register an OAuth Client – Create an app in bunq Developer and add at least one Redirect URL.

  2. Get OAuth Credentials – Retrieve your client_id and client_secret from the app settings in bunq Developer.

  3. Redirect Users to Authorize Your App – Send users to the OAuth authorization URL.

  4. Handle the Authorization Code – If the user grants access, they are redirected to your redirect_uri with an authorization code.

  5. Exchange the Code for an Access Token – Use the token endpoint to retrieve an access token.

  6. Use the Access Token – Authenticate API calls with the received access token, similar to an API key.

OAuth credentials and redirect URLs can also be managed via API endpoints for automated setup.

OAuth Scopes & Permissions

By default, bunq OAuth grants access to: ✔ Read and create Monetary Accounts ✔ Read Payments & Transactions ✔ Create Payments within a user’s accounts ✔ Create Draft-Payments (approval required in the bunq app) ✔ Assign a Monetary Account to a Card ✔ Read, create, and manage Cards ✔ Read and create Request-Inquiries ✔ Read Request-Responses

PSD2-licensed developers have scope limitations based on their regulatory role.

OAuth Authorization Request

Your web or mobile app must redirect users to the following authorization URL:

https://oauth.bunq.com/auth

With the following parameters:

Parameter
Description

response_type

Set to code for authorization code grant (required)

client_id

Your OAuth Client ID from bunq Developer (required)

redirect_uri

The URL users are redirected to after authorization (must be registered) (required)

state

Unique string for request validation (optional)

For sandbox testing, use:

https://oauth.sandbox.bunq.com/auth

Example Authorization Request

https://oauth.bunq.com/auth?response_type=code
&client_id=YOUR_CLIENT_ID
&redirect_uri=https://yourapp.com/callback
&state=unique_string

If the user grants access, they are redirected with an authorization code:

https://yourapp.com/callback?code=AUTHORIZATION_CODE&state=unique_string

Exchanging the Authorization Code for an Access Token

To obtain an access token, make a POST request to:

https://api.oauth.bunq.com/v1/token

With the following parameters:

Parameter
Description

grant_type

Must be authorization_code (required)

code

The authorization code received (required)

redirect_uri

The same redirect URL used in the authorization request (required)

client_id

Your OAuth Client ID (required)

client_secret

Your OAuth Client Secret (required)

For sandbox testing, use:

https://api-oauth.sandbox.bunq.com/v1/token

Example Token Exchange Request

https://api.oauth.bunq.com/v1/token?grant_type=authorization_code
&code=AUTHORIZATION_CODE
&redirect_uri=https://yourapp.com/callback
&client_id=YOUR_CLIENT_ID
&client_secret=YOUR_CLIENT_SECRET

Successful Token Response

{
    "access_token": "ACCESS_TOKEN",
    "token_type": "bearer",
    "state": "unique_string"
}

Use the access_token for authenticated API requests.

Making API Calls with OAuth

Once you receive an access token, use it like an API key to open a session or interact with the API.

Example request using OAuth access token:

GET https://api.bunq.com/user/{userApiKey's userId}/monetary-account/{grantedByUser's monetary-accountId}/payment

When fetching user details, you will receive a UserApiKey object, referencing both the requesting app and the user who granted access.

bunq’s Terms and Conditions
PSD2 regulations