bunq API Anatomy: Programmable Bank Cards

bunq
bunq Developers’ Corner
3 min readJul 17, 2019

bunq allows you to programmatically order, activate, read, manage, and deactivate all the supported types of banks cards. 💪While this sounds cool and clear, the devil is in the details. bunq releases cards that both do and don’t require a bank account, supports virtual cards, Google and Apple Pay; not to mention we allow Tap & Pay. What works with what and if through the bunq API? Let’s find out!

bunq cards 101

bunq supports four kinds of cards: debit, online, Tap & Pay, and Travel. Cards are separate objects independent of monetary accounts. Monetary accounts are assigned to cards and not vice versa. A card must have a monetary account linked to it.

What differentiates the kinds of cards on the level of API is the following:

  • Object type:
  1. CardDebit
  2. CardCredit
  • Card type:
  1. MAESTRO
  2. MASTERCARD
  3. MAESTRO_MOBILE_NFC
  4. MASTERCARD_VIRTUAL

It is set in the type field of the card object. You must set this field when ordering a bunq card via the API.

  • Card sub-type:
  1. WILDCARD (free; included in the membership)
  2. NONE (paid; added when the membership limit has been exceeded)

It is set in the sub_type field and indicates whether the card is free as a part of the Premium subscription. You are only allowed to read card sub-types.

All cards share programmable settings; however, unlike physical cards, online cards do not have the allowed countries setting. The shared writable settings include the following:

  • Card spend limits
  • Card ATM withdrawal limits
  • Country permissions
  • Pin code
  • CVC2 code
  • Status
  • Fallback monetary account (ID of the monetary account to be used as a fallback for this card in case of insufficient balance)

It is possible to read and manage cards programmatically using the following endpoints:

  • /user/{userID}/card/
  • /user/{userID}/card/{itemId}
  • /user/{userID}/card-batch
  • /user/{userID}/card-credit
  • /user/{userID}/card-debit
  • /user/{userID}/card-name (read only)
  • /user/{userID}/card/{cardID}/generated-cvc2
  • /user/{userID}/card/{cardID}/generated-cvc2/{itemId}
  • /user/{userID}/monetary-account/{monetary-accountID}/mastercard-action/
  • /user/{userID}/monetary-account/{monetary-accountID}/mastercard-action/{itemId} (read only)

Not all types of bunq cards work with Apple Pay and Google Pay. For those that do, it is impossible to see if the card is linked to a Google or Apple Pay wallet by reading or listing the cards of the users. However, because users can change the description of the card, sometimes it is possible to learn if a card is used with Apple or Google Pay by reading the description of the card that contains a mention of it.

Debit Cards 💳

Both Maestro and Mastercard bunq debit card types are technically compatible for use with Apple Pay and Google Pay. The MasterCard <> Apple Pay connection, however, does not work in stores that do not accept MasterCard.

Response example

Online Cards 💻💸

Online cards of a user share settings, which means that if the limit of a card is updated, it applies to all the other online cards too.

bunq does not support app provisioning of Mastercard virtual cards for Apple and Google Pay. However, in most cases, they work with Apple Pay and Google Pay through the Apple Pay and Google Pay applications.

Unlike other types of cards, online cards do not have sub-types.

Response example

Tap & Pay 📱☝✌👍

Tap & Pay functions as a virtual mobile card for Android of the Maestro type. Tap & Pay cards do not work with Apple Pay and Google Pay.

Response example

Travel Card 🌎

The Travel Card is the only credit card currently offered by bunq. It comes as a Mastercard and is currently not compatible with Apple and Google Pay.

Response example

How do you work with cards using the bunq API? Share your experience in the comments section below. 😃

--

--