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

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.

Related

How to handle SaaS reseller that collects payment from customers?

I develop and host a SaaS business that bills most customers directly, and that is a normal basic use-case with Stripe.
However, I also have a reseller that handles the billing relationship for those mutual customers. Since I host the SaaS service, all signups and subscription changes run through my software, and I'd like to use Stripe to track those customers, and create an invoice for each one of what the reseller owes us for them. Then I'd like to be able to charge the reseller's credit card once to pay for all those customers' invoices in one transaction. Is that possible?
Stripe Connect seems to serve the general need for handling these types of multi-party transactions. But I don't want to require the reseller to use Stripe to bill their own customers.
It seems maybe it could work if I created a single Stripe customer for the reseller, and then create a subscription for each of the reseller's customers under the reseller's customer resource. But it's not the canonical way of doing it, and I think I'd prefer a Stripe customer resource for each actual customer.
Although it might seem I could just collect payment from the reseller, and then mark all the customer invoices as paid offline but that seems it would double book revenue. I definitely don't want that!
I'm hoping someone might have a suggestion about the best way to accomplish this.
Thanks.
These types of questions are probably better suited for the Stripe support team, as they’ll be able to advise you on your business model and if there are any edge cases or unknowns you should be aware of: https://support.stripe.com/contact

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.

Is it possible to query Stripe for a credit card belonging to any customer?

I have a subscription service for which free trials are allowed before signing up for the full payed service. I want to ask the customer to provide credit card details before gaining access to the free trial, to prevent abuse of the trial.
I'm using Stripe to handle payments so that I don't have to deal with storage of any sensitive payment information. This free trial scenario would seem to be very common, so I assumed there would be some way to query a card to make sure that it hasn't been used to sign up already. Just some API call that would accept the card number etc. and return a boolean.
I haven't seen anything like in the API docs. I know that fingerprints of cards are accessible after creating a card source, so is it advisable to store them myself and query them? Or have I missed something in the docs?
Just to be clear... I'm not looking to search a card for a particular customer. I know I can iterate over the cards to do that, but I'd have to iterate over the cards of every customer to accomplish what I want, which is not feasible.
Here you probaly want to contact the support team and suggest this as a new feature.
A possibility is the fingerprint you mention, in my opinion this would be the way i would do it too.
One single card should never be associated with one customer in a platform.
No, there is no way to check whether a credit card is used for another customer or not. And there shouldn't be. Because a customer has right to use his/her single credit card to maintain more than accounts.
You can easily integrate trial feature of a Subscription in Stripe which is best way to implement Trial feature using Stripe. If any customer's payment failed after trial expired then you will be notified by Stripe.
And Stripe and any other payment gateway is not advise to store any card info due to security issue.

Processing credit cards in React/Node using only open source tech

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.

Charging other Stripe Merchants

I'm developing a donation platform on which I'll be taking a fee and am looking into using Stripe, but I'm snagged on one point that I haven't found any documentation for thus far.
Stripe doesn't handle chained payments, but does mention in their FAQ that: "If you want to collect a fee on the transactions, you can charge these merchants with your API key using Stripe."
Anyone know of some documentation or examples I could reference for this? Or could anyone point me in the right direction with their existing docs?
Thanks!
Stripe doesn't handle chained payments, but does mention in their FAQ that: "If you want to collect a fee on the transactions, you can charge these merchants with your API key using Stripe."
This just means your platform's users can pay you via credit card, and you can charge these cards with your Stripe API key. If you email support#stripe.com with more details on your setup, we can help you decide how to best structure your platform payments. Also feel free to jump into our chatroom at https://stripe.com/campfire.

Resources