Links
Comment on page

In-App Purchase Blocks (with RevenueCat)

This feature may only be available for Creators on certain Thunkable plans. Please refer to our pricing page for more information: Thunkable pricing.

Overview

In-app purchases (IAP) refer to the ability to offer additional content or features within a mobile app for users to buy using real money. This provides a monetization strategy for app developers, allowing them to generate revenue from their apps. It's a way to offer users the option to enhance their app experience by purchasing extra items or features, such as digital goods, subscriptions, and premium content.

Prerequisites

Publishing an app to the App Store and Google Play Store with in-app purchase blocks requires accounts with the following:

Compatibility

  • In-app purchases are supported on the Android and iOS platforms.
  • In-app purchases are not supported in web apps.
  • You cannot test in-app purchases with the Thunkable Live app.

Migrating to the New IAP Blocks

If your app utilized the old in-app purchase (IAP) blocks, you’ll need to remove the old blocks, replace them with the new IAP blocks, and create and configure an account with RevenueCat. These updates are needed before you publish an app with IAP functionality. If you currently have a published app with IAP capabilities, it will remain active. However, you cannot re-publish your app until the IAP blocks have been updated.

Which IAP Blocks do I have?

If you don’t know which version of the blocks you’ve used, we can help! Take a look at the IAP blocks in your project and compare them to the images below.

Old IAP Blocks

Each of the old IAP blocks has dropdown options. If your app has these blocks, you’ll need to update them.

New IAP Blocks

All of the new versions of the IAP blocks are purple and do not have dropdown options. If your app has these blocks, no block update is needed!

Migrate to Improved IAP Blocks

To migrate from the old in-app purchase blocks to the improved in-app purchase blocks:
  1. 1.
    Delete the old in-app purchase blocks.
  2. 2.
    Proceed with the order of operations below to implement new IAP blocks.
    You may be able to skip step 2 if your products are correctly configured in the Google Play Store and/or Apple App Store.

Order of Operations

It is imperative that you follow the steps outlined below in the order in which they're listed.
This documentation is written with the assumption that you are publishing to both the Apple App Store and Google Play Store. If this isn't accurate ignore the platform-specific instructions for the other platform.

1. Publish Thunkable Project WITHOUT In-App Purchase Blocks

You must first publish your app without the in-app purchase blocks. For more on publishing your app, please see these docs:
You must create a Google closed testing track release. More information is available here: Google: Prepare and roll out a release.

2. Configure Products

Store Configuration

Products are what your app's users purchase. They are the individual SKUs (stock keeping units) used to identify and track your inventory or stock. The stores (Apple and Google) process these SKUs and charge the user.
Your products must be configured for each of the stores you intend to sell with. This is done within the respective stores.

Google Play Store

Ensure You Have Created a Closed Testing Track Release

A Google closed testing track release is a feature in the Google Play Store that allows you to distribute a version of your app to a limited and specific group of users for testing or early access.
You must create a Google closed testing track release and have it submitted and approved by Google before proceeding with the following steps.
More information is available here: Google: Prepare and roll out a release.

Google Play Product Setup

Product configuration for Android devices is done in the Google Play Console, Google's central hub for managing app releases, testing, in-app purchases, and more.
Follow these instructions to set up your in-app purchases in App Store Connect: Revenue Cat Google Play Product Setup.

Apple App Store

Agreements, Tax, and Banking

In order to sell iOS products, you must sign Apple's most recent Paid Applications Agreement and fill out your bank and tax information. This is located at App Store Connect > Agreements, Tax, and Banking. This needs to be completed before you can test any purchases.

iOS Product Setup

Follow these instructions to set up your in-app purchases in App Store Connect: Revenue Cat iOS Product Setup.

3. RevenueCat Configuration

What is RevenueCat?

RevenueCat is a platform that is used to manage in-app subscriptions and purchases. It provides tools and services to handle subscription billing, manage user entitlements, and analyze revenue data. This platform simplifies the process of implementing and managing in-app purchases and subscriptions, making it easier for you to monetize your apps effectively.

RevenueCat Setup

  1. 1.
    Complete steps 1 through 3 in RevenueCat's guide here: Revenue Cat SDK Quickstart. You do not have to do step 4.
  2. 2.
    Set up 1-to-1 mapping of your products in stores to RevenueCat. Instructions on how to do that are available here: RevenueCat Configuration.

4. Thunkable Configuration

To connect your RevenueCat and Thunkable accounts:
  1. 1.
    Follow the instructions here to access the required API keys: RevenueCat API Keys & Authentication.
  2. 2.
    You need the following API keys:
    • Public IOS SDK Key
    • Public Android SDK Key
  3. 3.
    In your Thunkable project's Design tab, click the gear icon in the sidebar to access the project's App Settings.
  4. 4.
    In the In App Purchase Settings section, add the API keys to the appropriate fields.

5. Add In-App Purchase Blocks

To access the in-app purchase blocks:
  1. 1.
    Navigate to the Blocks tab.
  2. 2.
    Under the App Features heading, click In-App Purchase.
  3. 3.
    A drawer of in-app purchase blocks opens.

Block: In App Purchase Offerings

Block: Buy In App Purchase Package

Block: In App Purchase Customer Info

Block: Restore In App Purchases

6. Publish Thunkable Project WITH In-App Purchase Blocks

Testing

To test the IAP component, you have to publish it to the Google Play Store or App Store. You will not be able to test IAP with the Thunkable Live App or through Web Preview.
Be mindful to leave extra time for testing in your app development cycle to allow time for each respective store to review your apps. Depending on your stage of app development, a review could take anywhere from an hour to 4 days.

App Store (iOS)

On iOS, you need to submit to the App Store via TestFlight to test the features. You can read more about TestFlight here: TestFlight Overview.
TestFlight sets up a sandbox environment automatically. When you send your update to the app store, you are able to test it without having it go to the live version.

Play Store (Android)

On Android, publish to the Play Store via internal beta testing. You can read more about internal beta testing in the Play Store here: Set up an open, closed, or internal test.
You have to upload the APK or AAB file to the Play Store console before you can add any In-App Purchases.
There are two ways you can test how a pre-release app functions on the Google Play store: You can publish an app to the alpha or beta distribution channels. This makes the app available on the Google Play store, but only to the testers you put on a "whitelist."
In a few cases, you can test Google Play functionality with an unpublished app. For example, you can test an unpublished app's in-app billing support by using static responses, special reserved product IDs that always return a specific result (like "purchased" or "refunded").

Managing Subscriptions

At this time, there are no blocks to support in-app subscription management by the user.
Users can manage their own subscriptions in the Google Play Store or Apple App Store.
We recommend including instructions in your app or app’s website that outline the processes below.

Android Subscription Management

Cancel, pause, or change a subscription on Google Play

Subscriptions on Google Play renew automatically unless you unsubscribe through the Google Play app. Uninstalling an app won't automatically cancel your subscription.
  1. 1.
    Open the Google Play app
    Google Play
    .
  2. 2.
    At the top right, tap the profile icon.
  3. 3.
    Tap Payments & subscriptions
    and then
    Subscriptions.
  4. 4.
    Select the subscription you want to cancel.
  5. 5.
    Tap Cancel subscription.
  6. 6.
    Follow the instructions.
If you have a subscription with an app and the app gets removed from Google Play, your future subscription will be canceled. Your past subscriptions will not be refunded.
Read more about managing your Android subscriptions here.

iOS Subscription Management

Change or cancel your App Store subscriptions

  1. 1.
    Open the App Store app on your iOS device or on a computer
    • Sign in to the App Store if necessary
  2. 2.
    Tap
    the My Account button
    or your profile picture at the top right, then tap Subscriptions.
  3. 3.
    Choose a subscription, then do any of the following:
Read more about managing your iOS subscriptions here.