Quickly mock up the account onboarding process of your commission-free trading app

Account onboarding comes with asking lots of questions. In this post, learn how to set up the initial version of the onboarding process as quickly as possible to start testing and improving the flow.

Quickly mock up the account onboarding process of your commission-free trading app

Account onboarding comes with asking lots of questions

Creating a brokerage account onboarding flow is one of the most complex components when you build your commission-free trading app. Due to the nature of the financial services, it is required to collect certain information from your users in order to open a brokerage account. Because you will need to ask more than a few questions during this process, it is critical to create a seamless UX so that users don’t drop out before reaching the actual trading section of your app.

Ongoing improvement of the onboarding process is likely needed while looking at the user behavior and the data. With that said, you should aim to set up the initial version of the onboarding process as quickly as possible to start testing and improving the flow.

Utilizing a fully functional trading app

Ribbit, an open source commission-free trading app, is built on the Alpaca Broker API to demonstrate how our API can be used to build a fully functional trading app. Ribbit includes the brokerage account onboarding flow that you can use to quickly mock up the initial version of your app using either Swift for iOS or Java for Android.

GitHub - alpacahq/ribbit-ios: iOS app for Ribbit, Broker API Reference App
iOS app for Ribbit, Broker API Reference App. Contribute to alpacahq/ribbit-ios development by creating an account on GitHub.
GitHub - alpacahq/ribbit-android: Android app for Ribbit, Broker API Reference App
Android app for Ribbit, Broker API Reference App. Contribute to alpacahq/ribbit-android development by creating an account on GitHub.

While our APIs make it easy to build out your own app and get users trading right away, ensuring that your team is compliant with Anti-Money Laundering regulations in the U.S. can be confusing and lead to unnecessary overhead.

Fortunately, our team at Alpaca is dedicated to making this simple through account onboarding processes we conduct on your behalf. Keep on reading to find out how this works.

Why is onboarding needed?

Since our APIs offer the ability for anyone in the world to carry out trading in the U.S. stock market, we have to conduct a number of checks on each user which is known as the Know Your Customer (KYC) process. This is required of providers who offer users financial services in order to combat online fraud.

Since we complete the KYC process on behalf of your company, your app has to collect all the required user information at the time of account creation. We will refer to this user flow as onboarding.

How Ribbit accomplishes user onboarding

The first thing you should do when building out the user onboarding flow in your own app is to verify what information you are required to collect from your users.

This is important because incomplete accounts sent to Alpaca will delay the KYC process and prevent your user from being able to execute trades on your app. Since this is passed to Alpaca via the account creation API request, you can simply check the required attributes that need to be passed in. This can be viewed here.

In addition to the required information, you must also prompt your users to upload files that will be used to verify the information they entered. These documents can either be passed in via the request body of the account creation endpoint or through the document upload endpoint after the account has been created.

End-user onboarding flow

When a new user signs up for Ribbit, they will be prompted with an onboarding flow that needs to be completed before accessing the rest of the app. Ribbit’s user onboarding flow is broken up into separate screens that the user has to click through to complete onboarding. See the flow broken down by each step.

  1. User clicks Create Account

2. User signs up with their email and creates a password


3. User proceeds through the onboarding flow by filling out the prompts and clicking Continue. It’s important to note that validation on the user interface is helpful at this stage. See the example screenshot below that validates the user’s zip code, the code must contain 5 digits, otherwise the user cannot proceed.

4. Once all the required information is collected, Ribbit users are prompted to verify all the information is correct to proceed.

Backend calls

Once the user completes the onboarding flow, your app needs to call the account creation endpoint under the Broker API. Ribbit’s backend application serves as a thin layer to proxy the API requests coming from the mobile app, but makes sure each request is authorized for the appropriate user.

See a simplified diagram of the interaction with the backend below.


KYC at Alpaca

Once an account has been submitted to Alpaca, we complete a customer identification check which verifies the user is who they say they are and checks against government databases for watchlist hits.

Next, a series 24 certified member of our team will review the result of the check and either approve or reject the account. Accounts will only be rejected if it is determined that the user is fake or a high risk for money laundering and other illegal activity.

Once an account is approved, the account status will update to active, meaning that the Ribbit user can now place and execute trades.

What’s next?

Now that you’ve learned about why the onboarding process is necessary, how Ribbit successfully onboards users both from a frontend and backend perspective, and how the accounts move through different statuses at Alpaca, you can start building this into your own app!

Ribbit is just an example of one way to integrate Broker API into a trading app, but you can customize the user experience to whatever you think is best for your users. Our APIs are designed to offer flexibility and ease of use when integrating with your app. We are excited to see what you build!

Open-Sourcing Commission-Free Trading App Code for Alpaca Broker API
We are open-sourcing the reference implementation of a commission-free mobile trading app called Ribbit, which is built on Alpaca Broker API.

As an API-first product company, we are committed to providing the best developer experience. If you have feedback or questions, don’t hesitate to get in touch at [email protected] or @AlpacaHQ on Twitter.


Get details at alpaca.markets/broker

Please note that this code is for example use only and is not intended to be used for distribution. The code is provided as an open source for the purpose of demonstration of the Broker API usage. It is not designed for production use and Alpaca does not offer official support of the code.

This article is for educational and informational purposes only. All screenshots are for illustrative purposes only. Alpaca does not recommend any specific securities or investment strategies.

Commission-Free trading means that there are no commission charges for Alpaca self-directed individual cash brokerage accounts that trade U.S. listed securities through an API. Relevant SEC and FINRA fees may apply.
Brokerage services are provided by Alpaca Securities LLC ("Alpaca"), member FINRA/SIPC, a wholly-owned subsidiary of AlpacaDB, Inc. Technology and services are offered by AlpacaDB, Inc.