#idhruv
1 messages · Page 1 of 1 (latest)
Hi there!
You can check your balance with this https://stripe.com/docs/api/balance/balance_retrieve
In this specific case it loos like the account has 0€ available balance, so your request is expected to fail.
okay
i want to send money as payout from one account id to another account id
is that possible?
source account to destination
in above case it's using wrong account to send payout, thats my problem
so how can i specifically declare a source account
i want to send money as payout from one account id to another account id
Payout is to send money from one Stripe account to a bank account. If you want to send money from a platform account to a connected account, you should use a Transfer: https://stripe.com/docs/api/transfers
transfers only mentions about destination account
i tried and it still tries to take money from my account to send to destination
rather it should deliver money from one another account from our firm
to the destination
I'm confused. What exactly are you trying to do?
rather it should deliver money from one another account from our firm
What is "from one another"? Is it a Stripe connected account?
Waht is "from our firm"? Is this a Stripe platform account?
okay, I will try to break it down in as simple terms as possible. lets say there is an account with account id acc_xxx and there is another destination account with account id acc_zzz, how do you send money from acc_xxx to acc_zzz?
via stripe
as per your suggestions transfers will not work here coz it only has provision for destination:
const transfer = await stripe.transfers.create({ amount: 400, currency: 'eur', destination: 'acct_1GwmKzGdNldKu1zm', transfer_group: 'ORDER_95', });
how can I assign source account id here then?
You can send money from Stripe account A to Stripe account B only if:
- Stripe account A is using Connect and is a platform account
- and Stripe account B is connected to platform A
You can learn more about Stripe Connect here: https://stripe.com/docs/connect
yes stripe account A is using Connect and what is the meaning of platform account?
our application is a host and booking application where users sign up and connect to stripe accounts by their own wish, we need a functionality which can transfer funds from our account into their accounts via stripe. I hope you are able to picture the scenario.
When using connect you have one platform account (the main account), and one or more connected account that are connected to the platform account.
If you want to transfer money from the platform account to the connected account, the platform account need to use https://stripe.com/docs/api/transfers
okay
const transfer = await stripe.transfers.create({ amount: 400, currency: 'eur', destination: 'acct_1GwmKzGdNldKu1zm', transfer_group: 'ORDER_95', });
this is the api that creates transfers
I cannot understand how can i specifically input source account id here, which is my connected account
My users will not sign in using our connected account, they will be signin in with their own stripe account
in that case stripe doesn't know which account is the connected account
so how can i explicitly mention here that stripe needs to deduct from account with id acc_xxx which is a connected account, now is it clear?
req_vVvCquR571Q2AL -> the problem here is exactly this, stripe is trying to deduct from my test user account which is not Connect platform account in order to pay the destination
Hi there 👋 apologies for the delay while I was taking over, I'm reviewing thread to pick up context.
okay thanks
Thank you for your patience while I caught up. You cannot create a Transfer to move funds from one Connected Account to another.
Transfers can only move funds from the Platform account that made the request, to the Connected account that is specified in the destination parameter.
ahh
so how can i deal with this problem?
i mean with this entire requirement itself
If you're working with Express or Custom Connected accounts, then there is a flow that allows your Platform to debit those Connected accounts, though there are specific requirements for that flow that you'll need to see if you meet:
https://stripe.com/docs/connect/account-debits
If that option doesn't work, then you will need to build a flow to create a payment and charge the owner of the Connected account. Connected accounts are intended for receiving funds, so they aren't designed to be charged directly. You would want to create a Customer in your Platform account and create payments that the Customer would pay, using a flow like the ones shown here:
https://stripe.com/docs/payments/accept-a-payment
However, it sounds like you may be trying to build a money moving service, so I would strongly recommend you reach out to our support team and ensure the service that you're trying to build is permitted and doesn't violate our policies around money transmitting services:
https://stripe.com/legal/restricted-businesses#:~:text=medical benefit packages-,Money transmitters,-%2C currency exchange services
got it
i will give an idea what we are building
so, everything works so far with stripe e.g we are using subscriptions and direct payment charging functionality from stripe and all works out so far
however, we also have a concept of gift cards
where user can pay an extra sum to us and we give them gift cards for the same amount
now users can apply these gift cards on the final booking amount, a part of this amount is paid by us to the hosts who are renting out their properties for users to book
so somehow, we need to adjust the ratio of gift card amount while paying out their part to hosts which we need to spend from our account
this makes it very complicated
I'm not sure I'm understanding, that doesn't sound like a scenario where you would need to transfer funds from one Connected account to another.
its more sending the adjusted amount from Connected platform account to our hosts account
so, i believe https://stripe.com/docs/api/charges/create this may work for me
I wanted to take a quick moment to explain what we're referring to when talking about a Platform account and Connected accounts.
Connect is typically used for scenarios where there are third-party vendors/service providers. In this approach the Platform is the one that orchestrates the transactions, and the Connected accounts are the third-party providers that need to receive their portion of the funds.
If you're familiar with the service Lyft, then in their scenario Lyft would be the Platform which handles creating the necessary Customers/payments, and then the drivers would be the service providers that have a Connected account.
So in your scenario I suspect your hosts are your Connected accounts (you create Express accounts for them) and you are the Platform account (the entity that orchestrates the entire process). (But please let me know if it seems like I've misread your scenario).
Apologies for the long-windedness there, but I saw you mention Connected Platform account, which confused me a little bit so I wanted to align our terminology.
sorry for the confusion from my side but you guessed it totally right
So in your scenario I suspect your hosts are your Connected accounts (you create Express accounts for them) and you are the Platform account (the entity that orchestrates the entire process). (But please let me know if it seems like I've misread your scenario).
our hosts are connected here
and our firm has a platform account
Awesome! So if you're wanting to move extra funds to your hosts when a gift card is used, then a Transfer is the correct way to do that. The Transfer will move funds from you (the Platform account) to your hosts (the Connected account).
okay, but what if a customer is logged in to a booking application, there our backend has no access of connected account
sorry platform account
stripe tries to pay this extra sum from their own stripe account which results in the error that i mentioned initially about insufficient funds
rather we would like to mention only platform account to create this extra charge no matter which user logs in
so can this work?:
const charge = await stripe.charges.create({ amount: 2000, currency: 'eur', source: 'acc_desknow_platform_stripe_id', description: 'My First Test Charge', transfer_data: { destination: hostStripeAccId?.stripeAccountId } });
and then create a transfer charge based on this?
Do you have an example of a Transfer request that raised an error? The request shared earlier seems to have been trying to create a Payout rather than a Transfer?
sure req_3yEMnKV38av6G5
acct_1L84EtGg3F2IFWW1 that you see is the connected account that should be paid with extra 50 euros from our platform account as part of gift card adjustment, but something is wrong here. I doubt complete reverse is taking place here.
I'm taking a look at your Platform account, and believe you currently don't have any funds available to transfer to your Connected accounts.
Can you use this API to retrieve the current balance of your Platform account, and then paste the response here so we can double check?
https://stripe.com/docs/api/balance/balance_retrieve
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
sure just a moment
{ "object": "balance", "available": [ { "amount": 0, "currency": "eur", "source_types": { "card": 0 } } ], "connect_reserved": [ { "amount": 0, "currency": "eur" } ], "livemode": false, "pending": [ { "amount": 32387, "currency": "eur", "source_types": { "card": 32387 } } ] }
Yup, available.amount being zero is why you aren't able to create a Transfer, because there are no funds available in your Platform's account balance.
Happy to help!
For testing, you can use the test cards here to process payments where the funds from those skip the pending state and move straight to your available balance:
https://stripe.com/docs/testing#available-balance
It makes testing much faster.
got it
But in production, this is a scenario you'll need to be wary of. If you need funds on hand to be able to cover those additional Transfers that need to be made, then you'll likely want to manually control your Payouts. Our automatic Payout process will move all available funds from your Stripe account to your associated bank account/debit card when a Payout is created.
yes
we don't have such payouts/transfers until you use giftcards
so this behavior is under control
Your Platform account is currently set up for automatic daily Payouts, so each day Stripe will attempt to empty the available balance within your Stripe account by moving those funds to the associated bank account/debit card.
You can see this in your dashboard by going here:
https://dashboard.stripe.com/test/balance/overview
and then click on More -> Manage bank accounts