Skip to content

8 min read

American Corners

Marketplace, orders and payments

What a marketplace app really is

A marketplace is an app where one group of people offers something for sale and another group buys it. An app store is a marketplace for apps; a food app is a marketplace for meals. The pattern is always the same: sellers post items, buyers browse and order, and money moves from the buyer to the seller.

Up to now the Trips app has only shown information. In this lesson it starts to take real money. We will add an order flow to a trip, work out a total with a tip, and connect a real card payment. Everything here is still no-code: you drag components and set properties, you do not write payment logic by hand.

Two payment shapes matter. In the simple one, the money goes to you, the app owner. In the marketplace one, many different merchants each get paid for their own items. Adalo handles both through a service called Stripe.

One-time card payments with Stripe

Stripe is a company that processes card payments. Adalo has a built-in Stripe component, so you never touch card numbers yourself; Stripe does the sensitive part. Before you begin, create a Stripe account, add your business information, and add your bank account details in Stripe. You do not need a paid Adalo plan to use this feature.

To add the payment component to a checkout screen:

  1. Click the "+" button to open the Add Panel.
  2. Find the Stripe Payment component. It sits in the Installed section of that panel.
  3. Drag the Stripe Payment component onto your checkout screen.

Then configure it by selecting the component and setting its properties:

  1. Click "Connect with Stripe" and follow the prompt to link your Stripe account, entering your Stripe credentials.
  2. In the amount field, enter what to charge. This can be a fixed amount for everyone, a Magic Number pulled from your database, or a Custom Formula.
  3. In the Charge Description, enter the text that appears on the buyer's card statement. You can use Magic Text here, such as the merchant's name.
  4. In the email section, use Magic Text to point at the logged-in user's email so they receive a confirmation.
  5. In the Submit Button section, edit the button text and add Actions, such as linking to a thank-you screen.

The Magic Number and Custom Formula options are what let the price change per order instead of being a single hard-coded number.

An order screen with a tip

Here is the worked example from the Trips assignment. A trip has menu items, and a member should be able to order some of them, add a tip, and check out.

Build it in this order:

  1. Add a "Book Now" button on the trip details screen. Make it visible only when the trip actually has menu items, so an empty trip does not show a dead button.
  2. The button links to an order screen that lists this trip's menu items. Next to each item, add a counter so the buyer can raise the quantity of that item.
  3. Below the list, add a "Tip" input. Give it a default value of 20% of the order total, so most people simply accept it, and let anyone who wants to change it type a different number.
  4. Show three numbers clearly: the order total, the tip, and the sum of the two. That final sum is what the card gets charged.

The tip default is a small piece of arithmetic, and Adalo does it with a Custom Formula rather than code. When you insert Magic Text, choose "New Formula", open the formula editor, and build the expression from Magic Numbers (values from your database) and the operators +, -, * (or x), /, and parentheses. For a 20% tip the formula reads like this:

Order Total × 0.2

The grand total the buyer pays is then:

Order Total + Tip

The same deck shows the classic split example: to get the cost per person on a trip, divide the trip cost by the group size, Trip Cost / Group Size. A tip is the same idea with a different formula.

Tip

Store each ordered line in its own collection, for example "Ordered Items", with a relationship back to the menu item and to the order. That keeps the item name, its price, and the chosen quantity together, so the summary screen and the total both read from real records instead of guesswork.

Learn more

A marketplace with many merchants. The Trips checkout above sends money to one account, yours. A real marketplace has many sellers, and each one needs to be paid for their own sales. Adalo does this with Stripe Connect: when a buyer pays, the amount lands directly and automatically in that merchant's own Stripe account, so you never have to hold their money or hand it out later. You can optionally take a platform fee, a slice that is deducted from each transaction and deposited into your account before the rest goes to the merchant.

There are three steps to set it up:

  1. Set up your own Stripe account for Stripe Connect.
  2. Let each merchant connect their Stripe account to your app.
  3. Route consumer payments so they go to the correct merchant's account.

When this lesson ran at the workshops, the students showed their marketplaces to a visiting guest and demonstrated real orders with real payment methods.

Warning

Stripe test mode uses fake card numbers so you can build and try the whole flow without charging anyone. Only switch to live keys and real cards when the app is genuinely ready, and never paste real card details or live Stripe secret keys into shared screens or a demo project. If you cannot set up a Stripe account for the assignment, replace the payment component with a plain button that runs the same actions to update and finish the order.

Prefer to see it explained? Here is the recorded Code for Albania lecture on this topic.

Check yourself

Think through these before moving on:

  1. What is the difference between a plain Stripe payment and Stripe Connect, and which one does a marketplace with many sellers need?
  2. On the order screen, which number actually gets charged to the card: the order total, the tip, or the sum of the two? Write down the formula for each.
  3. Why make the "Book Now" button visible only when the trip has menu items, rather than always showing it?

Where this lesson comes from

Built from

  • Future of Mobile Development: Deck 4 (Creating a marketplace, ordering and payment) + Lecture Summary 4
  • Adalo 4th Assignment (Trips ordering and checkout) + Deck 6 (custom math formulas)

alphaPlan courses are built from taught programmes rather than invented for the web. Where a claim rests on an outside standard or a reported case, it is named above so you can check it rather than take our word for it.

This course was developed by alphaPlan Center from programs delivered in partnership with the American Corners network.

Found something unclear, outdated or improvable? Suggest an improvement