Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

174
Views
React Native: Google Pay/Apple pay using CardField instead of PaymentSheet in Stripe SDK

currently I can't seem to find how to use Google Pay or Apple Pay with CardField component, is it currently possible?

I'm using this Stripe's official reaft-native sdk:

https://github.com/stripe/stripe-react-native

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

you can use initPaymentSheet. This is from what I can see and know the only solution that we have right now (used by me) for Apple or Google Pay... I don't know why the docs (https://github.com/stripe/stripe-react-native) do not talk on their front page about this option, but for me worked just fine. Also, make sure you check the stipe official docs also for more info because they also help with examples and explain the logic for why/how/what to do certain things (stripe docs).

A small example that can help you and others is below:

import {
    useStripe,
} from '@stripe/stripe-react-native';

const {initPaymentSheet, presentPaymentSheet} = useStripe();

IMPORTANT:

In order to show ('work') the bottom sheet (initPaymentSheet) you need either paymentIntentClientSecret OR setupIntentClientSecret. Make sure that you have one of these 2 if not you will get an error :).

await initPaymentSheet({
                applePay: true,
                googlePay: true,
                customerId: customerId,
                merchantCountryCode: merchantCountryCode,
                merchantDisplayName: merchantDisplayName,
                paymentIntentClientSecret: paymentIntentClientSecret,
                setupIntentClientSecret: setupIntentClientSecret,
                customerEphemeralKeySecret:ephemeralKeySecret,
                style: 'alwaysLight',
                primaryButtonColor: 'red',
                allowsDelayedPaymentMethods: true,
                testEnv: 'development',
                customFlow: false,
                defaultBillingDetails: {
                    address: {
                        city: city,
                        country: country,
                        line1: line1,
                        line2: line2,
                        postalCode: postalCode,
                        state: state,
                    },
                    name: name,
                    email: email,
                    phone: phone,
                },
                returnURL: returnURL,
            });
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!