I'm very new to NodeJS and I am making an application that will need to accept payments. For example, a user will have to enter their payment info, but the payment will not go through until a later event happens (may be days). So, I need to save this information in my database (I'm using MongoDB) I am wondering what is the best way to do this. How should I go about encrypting the credit card info to store it in my db and also making the payments when the event occurs. I was looking at the PayPal REST SDK but I'm unsure if this is the best way to go. What are the best libraries to use?
Asked
Active
Viewed 9,396 times
1 Answers
13
I have a good experience with https://stripe.com. It has a great nodejs library. It works in the following way: Customer fulfill the card data. You send it to stripe. They provide you a token (saved customer id). You just store this token. It is totally safe, since you are not storing credit card details locally. Then, later, you charge "this token" in the way you want. Method like stripe.charge(client_token, summ, callback)
.
In virtually same way works https://www.braintreepayments.com/. Braintree is paypal's daughter.

Mosh Feu
- 28,354
- 16
- 88
- 135

Sergey Yarotskiy
- 4,536
- 2
- 19
- 27
-
Does it include methods for encryption and all that? – unconditionalcoder Mar 10 '16 at 14:18
-
It should. It is payments. But I would check documentation https://stripe.com/docs – Sergey Yarotskiy Mar 10 '16 at 14:21
-
I'm looking for a free one and it looks like stripe charges per transaction – unconditionalcoder Mar 10 '16 at 14:30
-
3Sorry to upset you. But there is no free ones payment processing systems in the nature. – Sergey Yarotskiy Mar 10 '16 at 14:34