Processing credit cards in React/Node using only open source tech - node.js

If you go out and look for how to process credit cards online, you will continuously get sent towards Paypal or Stripe (which are great options!). These have great features, including nice client UIs, but they don't always fit the problem domain.
I need to accept credit card payments to replace in-person payments for a business, which means no extra fees outside of what credit cards already charge. This is for both Canada and the USA.
Is there an established "best pick" for open source frameworks for handling credit card payments in Node and React?

To be clear, I am showing you one merchant that you can use. Whichever merchant your client is using now to take credit card payments will most likely have a REST API to use.
Most merchant service will have some sort of an API you can use. Since we do not know which merchant you are planning on using I will show you a popular one.
I have used authorize.net a lot in my career. They have a REST API you can consume to handle payments for your clients. The API has a SDK you can download for whichever language you want to use.
The developer portal is here.
You can see popular language examples here.
When you go to that last link click on code examples and pick the
language you want to see.
Here is the SDK repo for Node.js.
Find more SDKs on git and use them in your app!
Let me know if you have anymore questions.

Related

Stripe - Using the right react frontend component for credit card storage?

I am working on a stripe backend in node and a react frontend, the idea being to create a platform for buyers and sellers. I have created the seller's side where users create connect accounts and add a bank to that account.
Now I want to set up the buyer's side. I want to be able to have a customer store their credit/debit card information to use to pay in the future. Below are my questions, they're a bit broad but I just want some basic guidance, not looking for code answers:
Should I aim to have users enter information and then have stripe create a customer object with all their information as a way of storing credit card info?
Can I use the react-stripe-elementslibrary to facilitate this process as it seems to be made to be secure? I've been looking at the examples but they seem to revolve around paying directly by inputting information to pay right away. Unless I am misunderstanding?
Should I aim to have users enter information and then have stripe
create a customer object with all their information as a way of
storing credit card info?
Yes, the main approach is to collect the card details which will produce a PaymentMethod object that you can then save to a Customer. The easiest way to do this is by using the SetupIntents API as described here:
https://stripe.com/docs/payments/save-and-reuse
If you follow that guide a PaymentMethod will be created automatically when you confirm the SetupIntent, and since you provide a Customer when creating the SetupIntent, Stripe will automatically save the PaymentMethod to the Customer.
Can I use the react-stripe-elementslibrary to facilitate this process
as it seems to be made to be secure? I've been looking at the examples
but they seem to revolve around paying directly by inputting
information to pay right away. Unless I am misunderstanding?
You should use the new React library from Stripe instead (assuming you're on React v16.8 and above):
https://github.com/stripe/react-stripe-js
The library is a simple wrapper around Stripe Elements which exposes an input field for your users to enter in their credit card details. When you use that pre-built input field from Stripe, they will automatically create PCI compliant forms for you: https://stripe.com/docs/security/guide. Otherwise, you would need to prove your business's PCI compliance annually which is a lot of work.
The client-side steps in the Save and Reuse guide all have a "React" tab that you can click on to show the React version (that uses the new react-stripe-js library):
https://stripe.com/docs/payments/save-and-reuse#web-collect-card-details

Set-up Stripe Connect for split payments

I have a platform which users register on with their car and then another user can then rent the car for a period of time. When the payment for the rental is received to our company account I need to be able to pay out 80% to the car owner and then pay our company account the remaining 20%.
I have Stripe integrated on my platform and we can receive payments but I don't know how to set up the rest, Stripe support are saying the platform developers need to do it, but the platform developers don't know where they need to do this and tell me I actually need to do it within Stripe myself. Im so frustrated and confused as no one is helping me.
I would be so grateful for some advice and help on if code needs to be put on the platform by the developer and if so what code? Also if there is a link to the correct guidelines.
Thank you in advance!
Gen
The product you need to use here is called Stripe Connect. It allows you to collect payments on behalf of a third-party, send them the funds and keep a portion of it for yourself.
The idea is that you will act as a platform and have your own Stripe account. Car owners will be able to register with your platform and create their own Stripe account that will be connected to your own.
When a customer wants to book a car you'll be able to collect their card details securely and charge them on behalf of the car owner while keeping a portion of the funds for yourself.
This will be a more complex integration though and something that your developers will need to build for you if you're not the developer yourself. You'll use multiple Stripe products such as Connect as mentioned earlier, but also Checkout or Elements to collect card details.

What credit card swiper will work with stripe?

We built an ecommerce platform (like a Shopify) that allows our customers - the merchants to accept payments for products.
As of now, all payments are accepted online. When they sign up to use our service, they also sign up for stripe and we process payments through their hosted form for ease of PCI Compliance.
In a live setting, many of our customers want to use a swiper to accept payments for their products rather than typing in a credit card number on a tablet.
Do you have any suggestions for a third party swiper provider with an API that we can integrate?
Stripe now offers its own set of supported EMV devices:
https://stripe.com/terminal
You can also use PayWorks or CardFlight (as of today) and can find those integrations here:
https://stripe.com/works-with/type/extension/category/card-readers
Lastly, if your'e just looking to use a magstripe reader, you should email into Support https://support.stripe.com/email for more guidance.

How do I implement a customer wallet with Node.js and Stripe or Braintree

I'm building an uber-like app where there are customers, and drivers:
Customers need to have a wallet to which they can add money using credit cards
Drivers need to be paid when they complete a ride, and my platform receives a commission on each ride fare.
I experimented with Stripe, but they don't seem to support a customer wallet implementation out of the box. Neither does braintree. Am I missing something?
Full disclosure: I work at Braintree. If you have any further questions, feel free to contact
support.
Happy to offer help!
Customers need to have a wallet to which they can add money using
credit cards
Braintree has a Vault in which you can allow customers to store payment methods, but there is no feature which will allow them to "add money". These payment methods are represented as payment method tokens which can be charged at any point.
Drivers need to be paid when they complete a ride, and my platform
receives a commission on each ride fare.
Braintree offers a Marketplace solution that allows you to split a payment to two parties; one being a sub-merchant (in your case, a driver), and a service see being sent to you, as the master merchant. You can read more about Marketplace at this link.
Feel free to reach out to support if you need further clarification!
Stripe doesn't support a 'wallet' style approach, but you can definitely use Connect to build this, though you'd then charge your customers at the time of purchase/use, rather than having them 'prefill' a wallet.
I'd suggest you reach out to Support if you have further questions on this one.

Not sure which Google Wallet API to use

I'm building an application for a new small business. They run events at race tracks, and the application is a registration system for said events. As a small business the owner doesn't want to worry about handling people's credit card info. They are just starting up and we are building from the ground up. So we are looking at using third party services like Google Wallet and PayPal.
So looking at the documentation, we have the Instant Buy API. Seeing as we aren't planning on taking direct credit card payments, it seems like a pain to setup payment processing through another service to use the Instant Buy. But we aren't selling a "Digital Good", as far as I can tell (I haven't seen a documented definition for this), so does that mean we can't use the API for Digital Goods? I haven't found any documentation that lays this out as a policy. It seems like it would be a lot simpler to implement, even with the cut Google takes.
There is a page at the google wallet documentation site called Which API Should I Use?, the first item there is:
The quick answer: it depends on your goals, your platform and what
kind of goods or services you're selling. The Instant Buy APIs are for
selling physical goods, while digital goods sellers should use the
Google Wallet for Digital Goods API for web apps or Google Play In-app
Billing for Android for native Android apps. To engage your customers
with offers and loyalty programs, use the Wallet Objects API.
Now, the Instant Buy APIs are for those business that have an existing payment gateway setup, but need to offer Google Wallet as a payment option.
In your situation, as you don't have a payment processor setup:
To sell physical goods on web apps and mobile apps that run on
browsers, use Instant Buy for web. You'll keep your existing payment
processor and optimize your payment flow with Google Wallet, just like
with Android. You can use Instant Buy for web to sell digital goods,
but if you lack a payment processor or resources to maintain and
develop a PCI-compliant online store, you should use the Google Wallet
for Digital Goods API.

Resources