Digital Purchases for In-App Purchases

Follow along with this help document to set up your Single Use In-App Purchases component: Digital Purchases.

Skill Level: Expert

Adding The Digital Purchase component to your Adalo App


One of the common ways to monetize your app is with one a time in-app purchase of digital products. Think of buying in game coins to upgrade your base in Space Fight Titans XL (not a real game), upgrading from a free app to a non-subscription premium app, or buying a pass to the online bootcamp that you’ve been wanting to join!

These are all one-time purchases of digital products, and are exactly what the Adalo Digital Purchase component is built for.

A few things to understand before setting up this component.

  1. Our component does not currently work with coupon codes.

  2. Your database needs a few things to function:

    1. A Collection of “Products”

      • These can be events, activities, coaching sessions, etc. They just have to be associated with the item being paid for.

        • Or a unique product ID if you are only selling one product.

        • If you have a large volume of products to add, You can export the collection from Adalo, modify the .csv to meet the upload guidelines for Android. Apple requires you to add them one at a time.

    2. Product IDs

      • Google and Apple recommend something similar to using your package name/BundleID and one or two words from the item i.e. com.spacefighttitansxl.powerup.1, but ultimately it can be anything that follows these restrictions.

        • Must start with a number or lowercase letter, and can contain numbers (0-9), lowercase letters (a-z), underscores (_), and periods (.)

          • 148 characters or less

The Adalo Digital Purchase component can be installed to your Adalo account from the App Marketplace.

  1. Click the plus button in the left toolbar in your Adalo Builder

  2. Scroll down and click the Explore Marketplace button

  3. In the Marketplace, scroll to find the Adalo Digital Purchase component and click to Install

  4. Drag the Digital Purchase component to your App’s purchase screen.

    1. The component has all of the style customization of the standard Adalo Button component.

Set-up Digital Purchase component button

  1. Android and iOS Product IDs - These are the unique identifiers for the product being purchased. Google and Apple have their own recommendation for the format, but it can be anything unique to that item. You can use the same Product ID for both platforms.

  2. Select this property from your Collection via Magic Text, or add a specific Product ID here.

  3. Button - Change the text, icon, font, color, and style of the button to match your app’s style.

Treat Purchases as Restorations

  1. The App Store and Play store require a way to restore previous purchases from your users to a new device. Even though in Adalo, all of this information is tied to their account, and stored on our servers, this Action is still required to exist in your app.

  2. The Button can be changed to read “Restore” and this is accepted by Apple and Google, as it will recognize if you have purchased the product in the past.

    1. Simply create a Collection for Purchases.

    2. Add the IAP Button for the purchases and rename to “Restore”.

    3. Add an Action to update the User to include the Purchased Product.

    4. If they have, it will return successful and you set your actions, if errored, it means the user has not purchased this in the past.

  3. You can have this button located anywhere, but we recommend adding in to a user settings screen. If you are selling multiple products with a dynamic Product ID, you can make a list of the products with this button in the list, and a user can then restore their purchases.

  4. Use Visibility rules to make these visible to only applicable Users.

Actions - The Digital Purchase component has three Actions for handling different outcomes from the Payment Modal. Add actions for each of these to unique screens, giving the User feedback about what happened.

Successful - The purchase went through

  • Update the Record in your database

  • Add the User to the purchased item.

    • You can update a field on the User Record or add a Relationship from the Product/Purchase to the User. Ultimately, you will need to decide how to connect the purchases to Users in your Database.

Error - The purchase could not be completed because it was declined or there was a server side error.

  • You can save the error codes in an Error Log Collection and use a Create or Update Action to access these codes via Magic Text.

Canceled - The user canceled the purchase.

  • Actions that should perform in the event the purchase is cancelled by the User.


  1. In-App Purchases only work for apps downloaded from the Apple App Store or Google Play Store. This component is hidden on web by default but you can choose to show the component and have a web-only action to link to a Stripe payment screen.

Now build your Android SDK and push an iOS Testflight build in Adalo and continue to Developer Settings!

Your app will go through additional reviews when you have this component installed. We recommend adding this near the end of your development cycle and near deployment to reduce the time required to test the rest of your app.


If you need additional help with this article, you can always ask in our community forum! Be sure to paste the link to this article in your post as well!

Last updated