stripe-react-native
stripe-react-native copied to clipboard
Remove country or region in Payment Sheet
Hi,Guide me to remove "Country or region" from payment sheet
Code am using:
const {error, paymentOption} = await initPaymentSheet({
customerId: '',
customerEphemeralKeySecret: '',
paymentIntentClientSecret: '',
merchantDisplayName: 'example Ltd.',
merchantCountryCode: 'AU',
testEnv: false,
primaryButtonColor: '#635BFF', // Blurple
returnURL: 'stripe-example://stripe-redirect',
postalCodeField:false,
defaultBillingDetails:{
address :{
country: 'AU'
}}
});
Following screen shot which am getting now,

I'm not sure this is currently possible from the native libraries. Would you like this removed just to simplify the UI?
Same issue here. We don't need to store or retrieve country information. It would be a great addition if we can simplify the UI and remove that field.
Still relevant Same issue here. We are a plattform and only sell to german customers. We do not need that too.
@charliecruzan-stripe
Hi! This can be removed by setting the billingDetailsCollectionConfiguration. You can avoid collecting the address with:
const { error } = await initPaymentSheet({
...
billingDetailsCollectionConfiguration: {
address: PaymentSheet.AddressCollectionMode.NEVER,
},
});
Is this compatible with expo sdk 0.48
Hi! This can be removed by setting the
billingDetailsCollectionConfiguration. You can avoid collecting the address with:const { error } = await initPaymentSheet({ ... billingDetailsCollectionConfiguration: { address: PaymentSheet.AddressCollectionMode.NEVER, }, });
This worked for me
await Stripe.instance.initPaymentSheet(
paymentSheetParameters: SetupPaymentSheetParameters(
billingDetailsCollectionConfiguration: const BillingDetailsCollectionConfiguration(address: AddressCollectionMode.never)
....
...```