stripe-react-native
stripe-react-native copied to clipboard
[Payment sheet] Google Pay not showing when setupIntentClientSecret provided
Describe the bug
When initializing the payment sheet on Android with a setupIntentClientSecret instead of a paymentIntentClientSecret, Google Pay does not appear on the Payment Sheet. When a paymentIntentClientSecret is provided, Google Pay does appear on the Payment Sheet. I have confirmed that I am correctly providing a Setup Intent and Payment Intent to their respective fields.
To Reproduce
const onSubscribePressAndroid = async () => {
const res = await functions().httpsCallable('getStripeSecret')({});
if (res.data.errorCode) {
console.log(res.data.errorCode);
return;
}
const secret = res.data.setupIntentSecret;
let {error} = await initPaymentSheet({
setupIntentClientSecret: secret, //providing a Payment Intent to paymentIntentSecret makes Google Pay appear on the payment sheet
googlePay: true,
merchantCountryCode: 'US',
merchantDisplayName: 'Quo Finance',
testEnv: true,
});
if (error) {
console.log({error});
return;
}
await sleep(1000);
try {
({error} = await presentPaymentSheet({
clientSecret: secret,
}));
} catch (e) {
console.log({e});
updateLoading(false);
return;
}
if (error) {
console.log({error});
return;
}
};
Expected behavior I would expect Google Pay to appear on the Payment Sheet regardless of whether or not a Setup Intent or Payment Intent is provided.
Screenshots
With Payment Intent provided:

With Setup Intent provided:

Desktop (please complete the following information):
- OS: macOS Big Sur
- Version 11.2.3
Smartphone (please complete the following information):
- Device: Galaxy S10
- OS: Android
I'm able to reproduce this. Will check with the team.
This is currently not supported in stripe-android. We will need for a new release of the stripe-android SDK to ship this functionality.
@thorsten-stripe Is it supported now? @trex-quo Currently I've made two separated buttons. @Mfrizzy FYI
This was fixed in stripe-android a while ago, and we've since integrated that version into stripe-react-native, so I'm going to close this issue