#chern
1 messages · Page 1 of 1 (latest)
Hi there, are you using PaymentSheet provide Apple Pay / Google Pay to your customers?
We are using ApplePayButton and GooglePayButton components.
OK, there's a createPlatformPaymentMethod function (https://stripe.dev/stripe-react-native/api-reference/index.html#createPlatformPayPaymentMethod) that you can use to create an Apple Pay / Google Pay payment_method
Documentation for @stripe/stripe-react-native
And here's an example code https://github.com/stripe/stripe-react-native/blob/master/example/src/screens/GooglePayScreen.tsx#L125
You can also render a <PlatformPayButton>, so it would be automatically displayed as Google Pay in Android, and Apple Pay in iOS,
Awesome! Is this method allow us to use the platform's native UI to add new card details if necessary?
You mean open the payment setup page? There's a openApplePaySetup() (https://stripe.dev/stripe-react-native/api-reference/index.html#openApplePaySetup) for Apple Pay, but I don't think Google Pay provides something similar.
Documentation for @stripe/stripe-react-native
I meant if we can add a new credit card to apple or google pay when creating a new payment method through native UI, after the createPlatformPaymentMethod call?
I don't quite really understand you, are you asking if the newly added payment method will appear in the list after calling createPlatformPaymentMethod() ?
Ok, let me rephrase. Will calling this method add a new credit card to the platform wallet? Will we be able to enter the details of this card?
No
Ok, thanks! I think createPlatformPaymentMethod will be the good point to start!
Cool! Happy to help.