capacitor-community / stripe

Stripe Mobile SDK wrapper for Capacitor
https://capacitor-community-stripe.netlify.app/
MIT License
192 stars 77 forks source link

Best practice to get card input from user #26

Closed HardikDG closed 3 years ago

HardikDG commented 3 years ago

In the Stripe Web SDK, they are suggesting to use their elements only to take input from the user due to security. For an app how should we take input from the user, as SDK only provides the method to call Stripe SDK, no option for input

Is everyone using just using the normal input for this?

ihadeed commented 3 years ago

Stripe's mobile SDK contains an alternative to elements, but it's not officially supported by this plugin yet. I did some experimenting but still haven't added a way to configure the forms provided by Stripe SDK.


The following info is just my opinion and isn't based on any official information provided by Stripe:

Stripe Elements serves two main purposes: (1) making it easy to collect payment info from your customers (no need to build your own forms) and (2) keeping the collected information secure.

Elements renders an iframe that contains a form input (or a set of inputs) to collect sensitive information and send it directly to Stripe. This reduces the chances of data leaks caused by your own code or 3rd party scripts that are used on your website/app. Essentially it ensures that any data is sent directly to Stripe's servers without being exposed or saved anywhere else.

IIRC you can find relevant info in their security guide and other PCI compliance related pages: https://stripe.com/docs/security/guide


My personal recommendation for collecting card info from users:

For paranoid people:


Alternatives:

stefanotauriello commented 3 years ago

How can be used Stripe Elements in Capacitor? I receive https error requirement