N I M B L E S I T E

Loading

Blog header image

StoryTowns is an engaging Australian travel app that brings local stories and history to life through audio tours. It’s available on both iOS and Android. The app recently needed to implement premium content access and in-app purchases. This case study details how we helped StoryTowns successfully implement its paywall and monetization strategy.

StoryTowns

The Challenge

StoryTowns needed a flexible monetization system that would allow users to purchase time-based passes for premium content access. It needed to work seamlessly across both iOS and Android platforms, support special event passes (like the Melbourne International Garden Show), maintain a smooth user experience while encouraging upgrades, and comply with both Apple and Google’s store policies

Technical Implementation Overview

Architecture Decisions

We implemented the paywall system using the following:

  • Flutter’s in_app_purchase package for cross-platform purchase handling
  • Supabase for backend storage and purchase verification
  • Edge Functions for webhook processing
  • A flexible pass activation system allowing users to purchase now and activate later

Database Schema Design

The system uses two primary tables: pass types, which define available passes and their durations. And, user passes, which tracks purchased and active passes for each user.

This allows for flexible pass management, easy addition of new pass types, efficient querying of active passes, support for special event passes.

Purchase Flow Implementation

The purchase flow follows these steps:

User Authentication
  • Required before any purchase
  • Ensures cross-device access to premium content
Purchase Initiation
  • User selects a pass
  • App queries store for product details
  • Presents native store purchase flow
Purchase Verification
  • Server-side verification through store APIs
  • Creation of user pass record
  • Immediate access provision
Pass Activation
  • Optional delayed activation
  • Flexible start times for passes
  • Clear expiration management

Key Features

Premium Content Access

We implemented an access system that clearly marks premium or event content throughout the app with banners on these types of stops. It also shows an information page about the types of passes that the user might want to buy based on their actions in the app before launching the purchase.

Pass Management

Premium passes have multiple duration types (3, 7, 14, and 30 days). Special event passes are specific events that we configure at the database and app store levels. We included purchase now, activate later functionality, which allows the user to buy now and use it when they are ready. Passes synchronize across all devices so the user can buy on Android and use the pass on iPhone.

MyPass Screen

Security and Compliance

Our implementation ensures secure purchase verification, compliance with store policies, protection against unauthorized access and proper handling of edge cases.

Technical Challenges and Solutions

Cross-Platform Consistency

Challenge: Maintaining consistent behaviour across iOS and Android

Solution: We implemented a platform-agnostic purchase service layer that abstracts platform differences. This is based on the standard Flutter In App Purchases package.

Purchase Verification

Challenge: Reliable purchase verification across platforms with different APIs.

Solution: We deployed separate Edge Functions for each platform to handle platform-specific verification. These functions use appropriate security measures and provide consistent responses to the app.

Results and Impact

The implementation has been successful. Itincreased revenue through premium content access, user satisfaction, and successfully handling of special events like the Melbourne International Garden Show. There have been minimal support issues related to purchases so far.

Lessons Learned

Early Platform Review

It is important to submit for store review early and address potential policy issues proactively. There is no telling how long it might take to get submissions through the store.

User Experience Focus

Keep the purchase flow simple and provide a clear value proposition. Make premium content obviously valuable both before and after activating the purchase.

Technical Considerations

Implement robust error handling and logging. If and when something goes wrong with a purchase, you need a clear log of what has happened. This means that you can easily diagnose a situation where a user may have paid but wasn’t able to use the purchase in the app.

Build flexibility into the system. You need to be able to run promotions and give away purchases as part of those promotions.

Conclusion

The successful implementation of in-app purchases in StoryTowns demonstrates how careful planning and robust technical implementation can create a seamless monetization system. The flexible pass system not only generates revenue but enhances the user experience by providing clear value through premium content access.

If you’re considering implementing in-app purchases, this case study shows the importance of careful technical planning, focus on user experience, having a simple and robust backend, flexible content access management and cross-platform consistency.

Looking to Implement In-App Purchases?

If you’re considering adding in-app purchases to your mobile app, book a consultation to discuss how we can help implement a robust and user-friendly monetization system for your app.