AppNative › Blog › In-app purchases

How to add in-app purchases to a v0 Next.js app

Updated November 2026 · By the AppNative team

Short answer: Yes, once it's wrapped as a native app. AppNative builds iOS and Android apps around your Vercel deployment with StoreKit 2 and Google Play Billing, creates your products, and opens a native paywall when your code calls window.AppNative.iap.showPaywall(). A Next.js route handler verifies transactions and receives Apple and Google server notifications so your database stays in sync.

v0 generates a Next.js app and deploys it to Vercel. AppNative takes that deployment and ships it as a native iOS and Android app with Apple and Google billing, so the same app you built in v0 can earn on the App Store.

v0 in-app purchases at a glance

SourceYour Vercel deployment from v0
FrameworkNext.js App Router or Pages Router
iOS billingStoreKit 2
Android billingGoogle Play Billing
Server sideA Next.js route handler verifies and stores entitlements
Web paymentsStripe on Vercel stays the same

How to add in-app purchases to a v0 Next.js app

  1. Deploy from v0 to Vercel. Use your production domain so the app and server notifications have a stable address.
  2. Wrap it with AppNative. AppNative builds signed iOS and Android apps in the cloud.
  3. Create your products. Plans and trials are created for you in App Store Connect and Google Play.
  4. Prompt v0 for the client code. Ask v0 to add a client component that calls setUser() after sign-in, listens with onEntitlementsChanged, and calls showPaywall() from the upgrade button when window.AppNative.iap exists.
  5. Add the route handler. Create app/api/iap/route.ts to verify transactions and receive server notifications.

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

Does server rendering cause problems in the app?

No. The app loads your deployed site, so SSR, server actions and middleware behave as they do on the web. Just read window.AppNative inside client components.

Can I use Vercel's Stripe templates?

Yes, for web users. App users go through Apple or Google, and both feed the same subscription record.

How do I publish a v0 app to the App Store?

Wrap the Vercel deployment with AppNative. It handles signing, App Store Connect setup and submission.

Will Apple accept a Next.js app?

Yes, when purchases go through in-app purchase and the app offers native features. AppNative adds both.

Add in-app purchases with AppNative

In-app purchase guides for other builders

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