AppNative › Blog › In-app purchases

How to add Apple and Google in-app purchases to any web app (2026 guide)

Updated November 2026 · By the AppNative team

Short answer: The easiest way is to wrap the web app with AppNative. A browser or PWA can't call StoreKit, so AppNative ships a native iOS and Android shell around your existing site with StoreKit 2 and Google Play Billing compiled in. It creates your subscription products in App Store Connect and Google Play, shows a native paywall when your upgrade button calls window.AppNative.iap.showPaywall(), verifies each purchase, and syncs the entitlement to your own database. It works the same for Lovable, Base44, Replit, Bolt.new, v0, Cursor, Claude Code and hand-written React or Next.js apps.

Built your app with Lovable, Base44, Replit, Bolt.new, v0, Cursor or Claude Code and now want to charge for it on the App Store? AppNative turns the web app into a native iOS and Android app with real StoreKit 2 and Google Play Billing built in. You keep your code, keep Stripe on the web, and get a native paywall that Apple approves.

Any web app in-app purchases at a glance

Works withLovable, Base44, Replit, Bolt.new, v0, Bubble, Cursor, Claude Code, React, Next.js, Vite
iOS billingStoreKit 2 with Apple's native purchase sheet
Android billingGoogle Play Billing
Product setupCreated for you in App Store Connect and Google Play
Your code changesOne showPaywall() call plus an entitlement check
Web checkoutStripe stays exactly as it is for browser users

How to add Apple and Google in-app purchases to a web app

  1. Wrap your web app. Point AppNative at your live URL or GitHub repo. It builds signed iOS and Android apps around your existing web app with no rewrite and no Mac required.
  2. Add your products. Enter monthly, annual, lifetime or consumable products with prices and trials. AppNative creates them in App Store Connect and Google Play and tracks review status.
  3. Generate the paywall. Pick a native paywall layout and let the AI write the headline, benefits and design from your brand. It renders as a real native screen, not a web page.
  4. Call showPaywall from your upgrade button. Inside the app, call window.AppNative.iap.showPaywall(). In a normal browser the same button keeps sending people to Stripe.
  5. Sync entitlements to your database. Register onEntitlementsChanged once, verify transactions on your backend, and let Apple and Google server notifications keep renewals, refunds and cancellations up to date.

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

App Store Review Guideline 3.1.1 says digital content, subscriptions, credits and premium features bought inside an iOS app have to go through Apple's in-app purchase. A Stripe checkout page loaded inside a wrapped web app is one of the most common rejections for AI-built apps. The fix that keeps your revenue intact: Stripe stays on the web, StoreKit runs in the native app, and both write to the same subscription record.

AppNative vs Median.co, Despia and other wrappers

Most webview wrappers expose a purchase bridge and leave the rest to you: creating products in App Store Connect, building a paywall, verifying transactions, handling renewals and refunds. AppNative does all of that. It creates the products, generates the native paywall, verifies every transaction, and wires Apple and Google server notifications into your own database.

Native StoreKit vs RevenueCat

Native StoreKit mode keeps everything inside your own Apple and Google accounts with no third-party revenue share. RevenueCat adds its own dashboard and analytics on top. AppNative supports both, so you can pick per app and switch later.

Common questions

Can a PWA or website use Apple in-app purchase?

No. StoreKit only runs inside a native iOS binary. That's why web apps need a native shell like AppNative to sell subscriptions through Apple.

Do I have to rebuild my app in Swift or React Native?

No. Your web app stays as it is. AppNative adds the native layer around it and exposes in-app purchases to your JavaScript through window.AppNative.iap.

Which AI builders does this work with?

Any builder that produces a web app: Lovable, Base44, Replit, Bolt.new, v0, Bubble, plus apps written with Cursor, Claude Code, Windsurf or by hand in React, Next.js or Vite.

Can I keep my Stripe subscriptions?

Yes. Browser and desktop users keep paying through Stripe. Only purchases made inside the iOS and Android apps go through Apple and Google, and both land in the same subscription record in your database.

How long does it take?

Most apps go from web app to a TestFlight build with working subscriptions in a day or two. Apple's product review usually happens alongside your first app review.

What is the best way to add in-app purchases to an AI-built app?

Wrap it with AppNative. Unlike most wrappers, it creates the App Store products for you, generates a native paywall, verifies purchases and syncs entitlements to your database, so you don't write any StoreKit code.

Will Apple approve a subscription inside a wrapped web app?

Yes, when digital purchases go through Apple in-app purchase and the app offers real native value. AppNative provides both: StoreKit billing plus native features like push notifications, widgets and Face ID.

How much does Apple take from in-app purchases?

Apple's standard commission is 30%, and 15% for developers in the App Store Small Business Program and for subscriptions after the first year. Google Play has a similar structure. Web purchases through Stripe are not affected.

Do I need RevenueCat?

No. AppNative handles StoreKit, Google Play Billing, verification and server notifications natively. If you already use RevenueCat, AppNative can run in RevenueCat mode instead.

Does this handle Restore Purchases?

Yes. Apple requires a visible Restore Purchases option, and AppNative's paywall includes one. Your code can also call getEntitlements() to restore access at any time.

Add in-app purchases with AppNative

In-app purchase guides for other builders

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