React-stripe-elements: any way to use stripe 3 without all the ui of this library? with just simple fields like in v2

Created on 4 Jun 2017  路  8Comments  路  Source: stripe/react-stripe-elements

This library adds quite a bit of overhead to a react app - but I do still want to use Stripe directly in React app. Documentation on stripe.com is not clear and refers a lot to various css styling issues to create a 'card' before creating a token.

In other words, I'd like something like the following:
1) npm install stripe --save
2) import stripe;
3) stripe(mykey).createToken({cc:ccVal,exp:expVal,cvc:cvcVal}).then(...)

how do I do this? (without reverting to stripe v2)

support

Most helpful comment

I guess I'll then stay on v2 - it works fine with react apps I need... thanks!

All 8 comments

Hi @ttaranov! You can't access the card information directly for security reasons in the latest version of Stripe.js. If there's something specific from Elements or Stripe.js that you need, please write in to support: [email protected] -- thanks!

I guess I'll then stay on v2 - it works fine with react apps I need... thanks!

Can you add ability to choose custom component for elements? Like how is this done in the redux-form https://redux-form.com/7.3.0/examples/react-widgets/

is there a link to v2 documentation somewhere? i would prefer to use least amount of 3rd party code possible

To expand on Jenan's comment above, using Stripe.js v2 will subject you to PCI SAQ A-EP level compliance, which requires you to upload your A-EP form to Stripe to verify compliance (usually a good amount of work.)

To maintain the simplest level of PCI compliance, Elements renders form inputs within iframes, while allowing complete customization using Stripe.js v3 APIs. As such, we highly recommend you use Stripe.js v3 and Elements to build your credit card form.

You can learn more about the different levels of PCI compliance on our integration security guide.

If you're aware of the requirements and would like to use v2, here's a link to the docs.

@atty-stripe thanks for the info, but I really don't want to use your elements. They are pretty good for instant integration but awful when you need a very specific look and feel.

I'm personally more concerned about the tracking that tends to persist across all visited pages. I would like to remove that but it seems there is no way of doing so. It's more of a stripe v3 thing in general though

Hi, @farahabdi! We've designed Elements to be as flexible as possible for custom styles while balancing strict PCI requirements for handling sensitive card information. I'd recommend taking a look at the official Elements Examples, which has a variety examples of customization using the style property of each Element. If you are having difficulty achieving a specific style, [email protected] would be happy to help!

@suprMax what you've mentioned here is a part of Radar, which identifies anomalous device behavior in order to protect your business against fraudulent activity. I'd recommend contacting email support if you have any questions about this!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

max-favilli picture max-favilli  路  5Comments

cleemputc picture cleemputc  路  5Comments

indiesquidge picture indiesquidge  路  5Comments

cypcz picture cypcz  路  4Comments

kongakong picture kongakong  路  4Comments