By Hanzalah Seikhai, payment integration developer. 3 December 2026
Stripe in a React Native or Flutter app: PaymentSheet the right way
Both @stripe/stripe-react-native and flutter_stripe give you Stripe's PaymentSheet, a ready made payment screen with cards, Apple Pay and Google Pay. The app part is short. The mistakes are on the server side.
1. Create the PaymentIntent on your server
Your backend creates the PaymentIntent with the amount from your own database, then returns its client_secret to the app. For saved cards it also returns a customer id and an ephemeral key. The app never decides the price.
2. Never put the secret key in the app
The app only gets the publishable key. Anything bundled in a mobile app can be extracted. If a sk_live_ key was ever shipped in an app build, roll it in the Dashboard now.
3. Present the sheet
// React Native
const { initPaymentSheet, presentPaymentSheet } = useStripe()
await initPaymentSheet({
merchantDisplayName: 'Your app',
paymentIntentClientSecret: clientSecret,
customerId, customerEphemeralKeySecret: ephemeralKey,
})
const { error } = await presentPaymentSheet()
// Flutter
await Stripe.instance.initPaymentSheet(
paymentSheetParameters: SetupPaymentSheetParameters(
merchantDisplayName: 'Your app',
paymentIntentClientSecret: clientSecret,
),
)
await Stripe.instance.presentPaymentSheet();
4. Fulfil from a webhook, not from the app
A successful sheet only tells the app the customer finished. Give access or ship the order when your server receives payment_intent.succeeded. Phones lose signal and apps get killed in the middle of a payment.
5. Common errors
No such payment_intent: the publishable key in the app and the secret key on the server belong to different Stripe accounts or modes.- Apple Pay missing: the merchant identifier and the Apple Pay certificate are not set up for that app.
- Digital goods: Apple and Google rules decide when in-app purchases must use their own billing instead of Stripe. Check this before you build.
If you want this fixed or built in your app, see Stripe in Next.js, Node.js or Supabase, hire me on Upwork, or get in touch.
Written by Hanzalah Seikhai, Stripe developer. Hire me on Upwork.