AppNative › Blog › In-app purchases

How to add in-app purchases and subscriptions to a Lovable app

Updated November 2026 · By the AppNative team

Short answer: Yes, with AppNative. Guideline 3.1.1 requires digital goods to be sold through Apple, so AppNative compiles StoreKit 2 into the native wrapper around your Lovable app, creates the subscription products in App Store Connect, shows a native purchase sheet when the user hits a route you choose, verifies the transaction, and reports the entitlement to your web app so it can unlock premium features.

Apple rejects apps that sell digital goods through Stripe. AppNative wraps your Lovable app with real StoreKit 2 and Google Play Billing: it creates the products in App Store Connect, presents a native paywall over your web UI, validates purchases, and exposes the entitlement to your Lovable code so premium routes unlock instantly.

Lovable in-app purchases at a glance

iOS billingStoreKit 2: native purchase sheet, Apple handles payment
Android billingGoogle Play Billing
Product creationAutomated in App Store Connect, including pricing and localizations
TriggerAny route (e.g. /upgrade) or a bridge call from your Lovable code
Entitlement in web codewindow.AppNative.iap.hasFeature('pro') and premium route gating
Web paymentsKeep Stripe on the web; only the native app must use StoreKit

How to add in-app purchases and subscriptions to a Lovable app

  1. Wrap your Lovable app. Connect the GitHub repo Lovable syncs to and get a signed native iOS and Android app around your live web app.
  2. Define your products. Add monthly, annual, lifetime or consumable products with prices and trial lengths. AppNative creates them in App Store Connect (and Google Play), uploads the review screenshot, and tracks approval status.
  3. Design the paywall. Pick a native paywall style (full screen, modal, carousel, comparison, tiers) and let the AI paywall designer write the copy, benefits and layout to match your brand colors.
  4. Choose what unlocks. Mark premium routes and feature flags. AppNative intercepts those routes in the native app, shows the purchase sheet, and hides gated navigation until the user is entitled.
  5. Read entitlements in your Lovable code. Check window.AppNative.iap.hasFeature('flag') to render pro UI. Apple server notifications keep renewals, cancellations and refunds in sync with your own database.

The code your web app needs

Everything native is handled by AppNative. Your web code identifies the user, listens for entitlement changes and opens the paywall. In a normal browser the same button keeps using Stripe.

// 1. Right after sign-in (not inside the buy button)
const token = await window.AppNative?.iap?.setUser(user.iapUuid);

// 2. Once at app start: renewals, expiries, refunds and upgrades land here
window.AppNative?.iap?.onEntitlementsChanged((list) => {
  const active = list.filter((e) => e.isActive && !e.revocationDate && !e.isUpgraded);
  syncEntitlements(active); // your backend verifies and saves them
});

// 3. Your existing upgrade button
function upgrade() {
  if (window.AppNative?.iap) return window.AppNative.iap.showPaywall(); // Apple / Google
  window.location.href = "/checkout"; // Stripe, unchanged, on the web
}

Your backend should verify each entitlement's signedTransactionInfo before granting access, and match appAccountToken to the signed-in user. See the AppNative API docs for copy-paste prompts you can give your AI builder.

What AppNative's in-app purchase layer includes

Why Stripe inside the app gets rejected

Guideline 3.1.1 requires digital content and subscriptions to be purchased with Apple's in-app purchase. A Stripe checkout inside a wrapped web app is the single most common rejection for AI-built apps. Keeping Stripe on the web and StoreKit in the native app satisfies Apple while preserving your web funnel.

AppNative vs Median.co and Despia for IAP

Basic wrappers expose a purchase bridge and stop there. AppNative also creates the products on Apple's side, designs the paywall, gates routes, verifies receipts, and wires Apple's server notifications into your data, so entitlements are correct without you writing StoreKit code.

Native StoreKit vs RevenueCat

Native StoreKit keeps everything in your Apple account with no third-party fee. RevenueCat adds cross-platform analytics and entitlement management for a cut. AppNative supports both, so you can pick per app.

Common questions

How do I add in-app purchases to a Lovable app?

Wrap it with AppNative, define your products, design the native paywall, mark the premium routes, and read the entitlement from JavaScript. AppNative handles StoreKit, product creation and verification.

Can I keep Stripe for web customers?

Yes, and you should. Apple only requires in-app purchase for what is bought inside the app. Your website and browser users can continue paying with Stripe.

How does my Lovable app know a user is subscribed?

The native layer exposes the entitlement to JavaScript, and Apple server notifications can write the subscription state into your own database so it's consistent on web and mobile.

Do I need to write Swift for the paywall?

No. The paywall is a native screen generated from your chosen style and AI-written copy, themed from your app's colors, configured entirely in AppNative.

What about Android?

The same products map to Google Play Billing, so a single configuration serves both stores.

Does Lovable support App Store in-app purchases?

Not on its own. Lovable produces a web app, and StoreKit only exists in a native binary. AppNative supplies that binary with StoreKit 2 compiled in.

Will Apple approve a subscription in a wrapped web app?

Yes, when digital goods are sold through in-app purchase and the app offers real native functionality. Both are what AppNative adds.

Can I offer free trials and introductory pricing?

Yes. Trials of 3 days, 7 days, 14 days or 1 month, plus introductory offers, are configured per product and created on Apple's side for you.

How do refunds and cancellations reach my database?

Apple's server-to-server notification endpoint is wired up during setup, so renewals, cancellations, refunds and billing retries update your records automatically.

Does this work for Base44, Bolt.new and Replit apps too?

Yes. The same in-app purchase pipeline works for any web app AppNative wraps.

Add in-app purchases with AppNative

In-app purchase guides for other builders

More: In-app purchases for Lovable apps · Live Activities for web apps · Widgets for web apps · Rich push notifications