Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preventing Sensitive Data Exposure in Background: Hiding Stripe Payment Sheet in React Native #1807

Open
shalini-mekala11 opened this issue Jan 15, 2025 · 0 comments

Comments

@shalini-mekala11
Copy link

shalini-mekala11 commented Jan 15, 2025

Is your feature request related to a problem? Please describe.
We use the Stripe payment sheet in our React Native app to collect payment details. To improve security, we want to hide sensitive fields or hide the sheet with an overlay when the app is in the app switcher or backgrounded, to prevent unauthorized screenshots. Is there a way to mask the fields or hide the sheet in these cases?

Describe alternatives you've considered
We tried using a React Native modal in the background to hide the sheet, but it didn't work. Could you please suggest how we should proceed?

Additional context
We are using the sheet in this way.

const { error } = await initPaymentSheet({
      merchantDisplayName: "**",
      customerId: setupIntent.customerId,
      customerEphemeralKeySecret: setupIntent.ephemeralKey,
      setupIntentClientSecret: setupIntent.clientSecret,
      billingDetailsCollectionConfiguration: {
        address: AddressCollectionMode.NEVER,
        name: CollectionMode.ALWAYS
      },
      intentConfiguration,
      allowsDelayedPaymentMethods: true,
      returnURL: "****",
      appearance: {
        colors: {
          primary: "*****"
        }
      }
    });

 const { error } = await presentPaymentSheet();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant