how do you use stripe connect to pay sellers - stripe-payments

for example, the price of the products will vary and will be stored in the database (mongoDB), so is it possible to take the payment from the customer and then give 20% to my account and 80% to the seller. (my app uses nodejs and an express server with mongoDB)

There isn't enough information to provide a detailed answer, but here is some advice.
There are three different types of charges when working with connected accounts, and the documentation for each type explains how to collect application fees:
Direct charges: https://stripe.com/docs/connect/direct-charges#collecting-fees
Destination charges: https://stripe.com/docs/connect/destination-charges#application-fee or https://stripe.com/docs/connect/destination-charges#transfer-amount
Separate charges and transfers: https://stripe.com/docs/connect/charges-transfers#collecting-fees
The above processes rely on an amount being provided to collect application fees, so you'll likely need to calculate what 20% of the transaction is on your server and then pass that information into the Stripe flow.
The flow also changes a bit if you're working with Subscriptions instead of one-time payments. You'd use the application_fee_percent parameter:
https://stripe.com/docs/api/subscriptions/create#create_subscription-application_fee_percent

Related

Stripe connect. Transferring payment to a connected account charges fees on the main account

I have account B connected to account A (both are standard accounts).
What I'm trying to do: accept a payment through A and send the full amount to B, which then gets charged the corresponding Stripe fees.
What I did: Created a webhook that fires on charge.succeeded and does a transfer to the connected account (B), using the charge id in source_transaction (As per https://stripe.com/docs/connect/charges-transfers)
What happens: The connected account (B) seems to get the full payment, without fees, the fees seem to be charged to account A
Could it be that it's because in test mode? The idea is to use account A to send/split a payment between other accounts (1 or more), as in a marketplace.
You'd usually simply use a Direct Charge — https://stripe.com/docs/connect/direct-charges. That's exactly how you platform A makes an API call on connected account B to facilitate a payment, and the fees are paid by B.
The link you posted is for a more advanced integration where the platform processes the payment(and therefore pays the Stripe processing fees) and then transfers money to a connected account(like a company like Lyft charging a rider, then transferring some of the money to the driver).
The idea is to use account A to send/split a payment between other accounts (1 or more), as in a marketplace
You can't use Direct Charges to split a single payment between multiple connected accounts such that they all pay the fees separately. The most you could do is make multiple separate charges — like take the card from the customer, clone it to each individual account involved, and do N separate charges (https://stripe.com/docs/connect/cloning-customers-across-accounts) on each of them. I wouldn't really recommend that since it likely leads to more declines and disputes(it's weird to have a shopping cart with 5 items from 5 sellers and get charged by the actual 5 sellers, I would expect to be charged once by the company that runs the marketplace).
If you really need to do this type of business model where you take a single payment and then split between multiple sellers then you do need to take the approach you linked to, and have the platform pay the fees, that's the only way, it's specifically discussed at https://stripe.com/docs/connect/charges#types in detail.

Stripe Connect Fixed/Flat Fee based on value for Connected Accounts

I am creating a Stripe Connect marketplace which charges a fixed fee based on value of sales, e.g. up to £2500 of revenue (for a connected account in a calendar month) will incur a flat fee of £200 per month to the platform.
I have read the Stripe documentation but still quite unclear how I can achieve this using a Standard Connect account. I understand the concept behind adding a flat fee per transaction but my use case is based around the amount of revenue over a time period.
Any help is always appreciated.
it sounds like you want to keep track of the payments processed by your connected accounts in order to figure out what to charge them.
The best way to do this is probably to set up a Connect webhook and listen for events like charge.succeeded and keep a running total each month for each account.
You have a number of options for charging your accounts, but using Billing to create a subscription that you update as their revenue grows is probably the best experience. You could also use metered billing with pricing tiers based on the payments you track.
If you need to calculate historic revenue, you'd need to manually retrieve the payments and calculate the total for the month(s) you're interested in.
NOTE: For both the webhook events and the retrieval approaches you'd need to be aware of several different objects other than Charges that may affect revenue up or down, like PaymentIntents, Refunds, Disputes etc depending on the details of the connect account's integration.
Hope that helps!

Stripe. Transfer money from two stripe balances to one Connected account

We need a possibility to have two balances on our stripe platform: first for our platform commission (balance1) and second for saving vauchers money (balance2).
Is it possible to make a transfers from this both balances to on connected account?
This is something you would keep track off on your end. Stripe would aggregate the balance in that case and just give you a number for the amount available and a number for the amount pending. You can not have split balances specific to your business.
I would recommend reaching out to Stripe to discuss your business model and what you are trying to achieve though since it's not specifically about code or Stripe's API.

Best way to split a Stripe charge across two bank accounts?

So when I run a charge, I'd like to be able to have 15% go to a secondary bank account of mine. What's the preferred way to do this now?
I found a great article on exactly this, using recipients and transfers (https://unicornfree.com/2013/using-stripe-to-divvy-up-revenue), but that's been deprecated and replaced with Managed Accounts. But those docs don't offer a clear way to do what I need.
Anyone seen a working example out there?
It sounds like you're trying to setup a "marketplace" type scenario, in which you would use the Stripe Connect platform and have the application_fee parameter in your request which to collect your 15%.
In that scenario, you create a charge request for $100 from customer A, you can specify an application_fee of 1500 (stripe requires the value in cents) in the API call. Documentation on this can be found here.
The result is that the $85 goes to your recipient, and $15 goes into your personal stripe account, and can be transferred to the bank account of your choosing. On hidden "gotcha" to this is that the stripe processing fee will be taken out of your application fee that you charge, so you won't be getting a true 15% from the transaction.
Note, you will need to have a connected or managed account registered through your connect account in order to properly setup the transaction. A general overview on the pros/cons of connected vs managed can be found here.

Allow users to accept payments from their users

I am working on a software that is to be used by businesses which make about $0.5mil revenue per year. I would like to incorporate into the software the option for my users to accept card payments from their clients. So far it seems I have the following options:
Manage multiple merchant accounts on behalf of my clients, however this has a few drawbacks. I would, for example, like to charge some small fee to cover the costs (about 0.1%) which I cannot accept if the payment to my user doesn't go through some stage that I can control where I can deduct the fee and send it my way. Also, about 50% of the mentioned revenue is paid for by credit or debit cards so a volume of $250,000 might not be enough to cover the fees set by the account provider.
Send everything through a merchant account that I control and then distribute the funds to the users. This, however, seems like a very small scale solution at best with the average number of payments per user per day being around 15.
The end result should be that the user enters a price in the software, this gets sent to a card reader where the user's client inserts their card and makes the payment. The amount charged includes all the fees associated. The amount paid will then be sent to some merchant account where my fee will be sent to me and the merchant fee will be deducted, the rest will be sent to my user's account. The whole point being that the user doesn't have to bother with setting up merchant account or card reader and simply gets a card reader from us which connects to the software and can immediately accept payments.
I sincerely hope I am missing something but I would appreciate any help with finding a way how to charge clients of my users and take some small fee.
So as it turns out, the best way to do this is using Stripe after all. If anyone is ever concerned, this is how I solved the problem.
Stripe is currently rolling out Managed Accounts of their Stripe Connect which can be used to effectively manage Stripe accounts for my customers. Therefore, once a user registers for my payment program, I create a managed account for them without the user knowing at all. For incoming Stripe payments I can then use the destination property as the id of the account where the money should go and specify an application fee which will be charged to my own account.
From there on the only problem to solve is that Stripe only supports online payments which can be overcome by using for example Payworks, however so far their service has been pretty terrible so this may be a weak point in the system.

Resources