This is more of a concept question, rather than the coding one. This is about the implementation of Stripe in the React app, and take the user’s card details and save it in the stripe and get the tokenized card and save that in DB.
So recently I have implemented Stripe in my react app and I went with the instructions here: https://stripe.com/docs/recipes/elements-react
Meaning I used their Stripe React Element to get card number, expiry date, etc.
Later on, I tried and created React elements myself instead of using their library and sent the request to Stripe with the card details to get the tokenized card response.
Now, both of the above processes work fine. I just don’t get which one is better and why?
The process of tokenizing the card is exactly the same in both cases. The only difference is when I show the card form to the user, it’s either with their library elements or with custom React Elements made by myself and I don’t see what is the preferred way or if there is at all.
Or both ways are exactly the same. Does stripe just provide React Element for those who don’t know how to make one for themselves?