stripe-react-native icon indicating copy to clipboard operation
stripe-react-native copied to clipboard

Remove country or region in Payment Sheet

Open dhananjayanravi opened this issue 3 years ago • 2 comments

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, Screenshot 2021-11-12 at 8 05 41 PM

dhananjayanravi avatar Nov 12 '21 14:11 dhananjayanravi

I'm not sure this is currently possible from the native libraries. Would you like this removed just to simplify the UI?

charliecruzan-stripe avatar Feb 14 '22 15:02 charliecruzan-stripe

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.

adrien-may avatar Mar 23 '22 10:03 adrien-may

Still relevant Same issue here. We are a plattform and only sell to german customers. We do not need that too.

@charliecruzan-stripe

BerkeAras avatar Feb 19 '23 21:02 BerkeAras

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,
      },
    });

charliecruzan-stripe avatar May 26 '23 18:05 charliecruzan-stripe

Is this compatible with expo sdk 0.48

ethanb1996 avatar Jul 21 '23 12:07 ethanb1996

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)
....
...```

rashedoz avatar Jan 16 '24 09:01 rashedoz