Skip to main content

OpenAI + Stripe + Supabase in a React Native boilerplate

Does AI Mobile Launcher support this combo?

Partially. The boilerplate ships RevenueCat as the default payment layer because it handles iOS / Android receipt validation. Stripe is not bundled. You only want this combo if your billing is web-first (B2B SaaS with a mobile companion app, or a category where Apple permits external payments). Below is how to graft Stripe on. OpenAI and Supabase ship as wired in the AI Pro tier.

The stack

Setup in five steps

1. Strip out RevenueCat from Standard

# Delete:
# - src/features/paywall/services/revenuecat.service.ts
# - src/features/paywall/components/PaywallScreen.tsx (replace)
# Remove react-native-purchases from package.json

2. Stripe Edge Function

// supabase/functions/create-checkout/index.ts
// Stripe-Node works in Deno via npm: imports
import Stripe from "npm:stripe";
const stripe = new Stripe(Deno.env.get("STRIPE_SECRET_KEY")!);
// POST { priceId, userId } -> { url }
// stripe.checkout.sessions.create({ ..., success_url: "myapp://billing/success" })

3. Env

# .env (server-only, Supabase Edge Function secret)
STRIPE_SECRET_KEY=sk_live_...
STRIPE_WEBHOOK_SECRET=whsec_...

# .env (client)
EXPO_PUBLIC_SUPABASE_URL=https://<project>.supabase.co
EXPO_PUBLIC_SUPABASE_ANON_KEY=<anon-key>
OPENAI_API_KEY=sk-...  # server-side proxy only

4. Webhook -> entitlements

-- Supabase
create table entitlements (
  user_id uuid references auth.users primary key,
  tier text not null,
  current_period_end timestamptz not null
);
-- Stripe webhook upserts on customer.subscription.updated

5. App Store review

Read Apple guideline 3.1.3 before submitting. Most B2B / reader categories (file storage, business productivity, enterprise SaaS) can use external payments. Most consumer categories cannot. Plan the review strategy before writing code.

Why this combo works

Stripe gives you 2.9% + 30c instead of Apple's 15-30%. On a $20/mo plan that is the difference between $19.13 net and $14 net. For B2B with a tiny mobile companion, the math is obvious.

The mobile-only catch: Apple does not let you mention Stripe in-app for consumer categories. You can have a Stripe-paid subscription, you just cannot tell users about it inside iOS without a Reader app exemption. For most B2C AI apps, RevenueCat is the right answer despite the higher fees.

Supabase Edge Functions are the right place for the Stripe handlers because they run in Deno and accept the Stripe SDK as an npm import. No separate Node server, no extra deploy target.

What it costs at scale

Line item1K MAU100K MAU
OpenAI gpt-4o-mini~$4~$400
Stripe (2.9% + 30c on $10K MRR)~$5~$500
Supabase Pro + Edge Functions$25~$150
Total (excl. store fees)~$34~$1050

Compared to RevenueCat + Apple at $10K MRR: $200 + $1500-3000 store fee. Stripe saves money only if your audience pays outside the iOS/Android stores.

What this combo does NOT cover

Get this combo

Standard tier ($99). The AI Pro tier ($199) for the OpenAI wiring if you want it pre-done.

Standard tier ($99)AI Pro tier ($199)

Related combos