Skip to main content
Most first-week integration problems come from one of four mix-ups: which account a token belongs to, which type of application you created, what status that application is in, and which environment you are calling. This page explains all four.

Logins and accounts

A Fluz user is a login: one person with an email, phone number, PIN, and identity verification. A user can hold several accounts:
A personal account is never converted into a business account. A business account is a separate account, owned by the user, that comes into existence through KYB. The personal account keeps existing alongside it.
“Personal” (in the dashboard) and CONSUMER (in the API) mean the same thing. Wallets, spend accounts, cards and transactions all belong to an account, not to the user. The same user acting through their personal account and through their business account sees two separate ledgers.

Every token is bound to one account

generateUserAccessToken takes a userId and an accountId. The accountId decides which account the token acts as:
  • the user’s personal accountId gives a CONSUMER token;
  • a business accountId gives a BUSINESS token.
To see every account a user holds, and each account’s ID, use Get Accounts. Most operations accept either token type and act on whichever account the token belongs to. A few require one type specifically: Sending the wrong type returns AUTH-0002 with a message naming the type required, for example getBusinessCategories requires account type CONSUMER. Mint a token with the other accountId and retry.

Two kinds of application

Where you click in the Developers area decides what your application can do.
If you will create users, verify them, or issue cards on anyone’s behalf other than your own, you need an OAuth Integration application. An app made with Create new app cannot be upgraded into one. Create a new app from the template instead.

Application status

New applications do not start active. Fluz moves applications to ACTIVE; it isn’t self-serve. After you create an application, send its name or ID to your Fluz contact. Until then, calls that act for other users return:
current status: PERSONAL in this error is the application’s status, not your account type. Converting or switching accounts will not fix it. Ask Fluz to activate the application.
Some capabilities are also enabled per application on top of ACTIVE, for example registerUser and the VERIFY_KYC scope. Each environment’s application is enabled separately.

Environments

Staging and live are separate systems: Each environment has its own users, accounts, applications, and API keys. A key from one never works in the other. An application you create while logged in to fluz.app is a live application, even if you only intend to test with it.

Putting it together

A platform that onboards businesses, such as a card program for its own clients, usually looks like this in staging:
  1. You have an OAuth Integration application, owned by your company’s account, moved to ACTIVE by Fluz.
  2. For each customer, you registerUser the person, verify them, and send them through OAuth. Your token for them is CONSUMER.
  3. With that CONSUMER token you call getBusinessCategories and registerBusiness.
  4. Once KYB approves the business, you mint a BUSINESS token (same userId, business accountId) and issue cards and move money on the business.
See Onboard & Verify a Business for the runnable version.