#leovenbag
1 messages · Page 1 of 1 (latest)
Hi there
You really should not build your own Components as that opens you up to PCI Compliance requirements.
If you handle card details yourself you will be responsible for an SAQ D: https://stripe.com/docs/security/guide
What Element are you looking at using specifically?
Have you looked at using Payment Element with the Appearance API?
This has a night theme for instance
Oh I see! These two from @stripe/react-stripe-js
Ah yeah so with CardElement you won't be able to use the Appearance API
And styling is a bit more limited
Does it work with React?
My goal is to allow the user to subscribe to a month or yearly plan... is there another component I should be looking at instead of these two?
Yep it works with React
Payment Element is the recommended integration route
Hmm that guide doesn't have React snippets actually
But it does work with React
You can see https://stripe.com/docs/payments/quickstart for instance for what a code sample with React would look like
You will just want to create a Subscription instead of a PaymentIntent and then pass the latest_invoice.payment_intent.client_secret to your frontend
So the PaymentElement is the one I should use?
Yep
Awesome, will try. Thank you very much sir!