I am pretty sure doing so is a bad practice, but I just need to make sure that if I implement stripe, it will take care of all the data that the user will provide.
1 Answers
You shouldn't store credit card information in your database. Letting Stripe handle that is a must. Your server probably isn't PCI compliment and if your database is ever hacked you'd have a lot of problems.
Stripe has a few ways to collect payment details depending on how you want to set it up. First you could use Stripe Checkout. Which is probably the easiest method but the least flexible in terms of design and customization. The second method is to use Stripe Elements. This provides more flexibility over the look and feel of the input fields and such.
Stripe also supports iOS and Android intergrations if you are looking for mobile support.
I highly suggest reading through the Stripe Documentation as it gives you a lot of useful and great information about how to handle many different use cases.
I should also mention that there was another way to collect payment details through Stripe but that looks to be deprecated now. I didn't realize that until now. But it looks to have been replaced by Stripe Elements. This method was called Stripe.js. I'm not sure if it still usable at this time since I never heard any updates from Stripe that they would stop supporting it. So as of writing this that might also be a solution. Probably not recommended tho.
The main point is to use one of the methods described above to ensure NO credit card data will ever hit your server.
Hope this helped!

- 18,491
- 19
- 86
- 179