stripe-android icon indicating copy to clipboard operation
stripe-android copied to clipboard

[BUG] Payment Sheet address collection behaving differently across platforms

Open miduncan opened this issue 7 months ago • 0 comments

Summary

We're finding that given the same configuration, the "County" field is being marked as required on iOS and optional on Android. After talking with our Stripe rep, they determined that since the collection mode is PaymentSheet.AddressCollectionMode.FULL, iOS has the correct behavior of requiring the field and Android has a bug for marking it optional.

Image

Code to reproduce

This is our config (although we are using from stripe-react-native)

const { error } = await initPaymentSheet({
      merchantDisplayName: merchantName,
      allowsRemovalOfLastSavedPaymentMethod: false,
      googlePay: showGooglePay
        ? {
            merchantCountryCode: 'US',
            currencyCode: currency,
            testEnv: isTestEnvironment,
            buttonType: PlatformPay.ButtonType.Book,
          }
        : undefined,
      intentConfiguration: {
        mode: {
          amount: roundedAmount,
          currencyCode: currency,
          setupFutureUsage: ON_SESSION,
        },
        confirmHandler,
        paymentMethodTypes,
      },
      customerId: customerId || '',
      customerEphemeralKeySecret: ephemeralKey || '',
      billingDetailsCollectionConfiguration: {
        name: PaymentSheet.CollectionMode.ALWAYS,
        address: PaymentSheet.AddressCollectionMode.FULL,
      },
      appearance: customAppearance,
      defaultBillingDetails: {
        address: {
          city: address?.city || '',
          country: address?.countryCode || '',
          line1: address?.addressLine1 || '',
          line2: address?.addressLine2 || '',
          postalCode: address?.zip || '',
          state: address?.state || '',
        },
      },
      returnURL: 'https://www.rover.com',
 });

To reproduce, we checkout with Paypal in Ireland.

miduncan avatar May 09 '25 21:05 miduncan