#some1ataplace_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1403429339525156894
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- some1ataplace_api, 20 hours ago, 39 messages
I am also curious what would happen on partial refunds as well. Let's say I do something like after certain X number of days customer gets a 50% refund, after y number of days customer gets a 25% refund, etc.
What charge type do you use? Direct Charges, Destination Charges or Separate Charges & Transfers (SC&T)? https://docs.stripe.com/connect/charges#types
SC&T is what I use
I use a Transfer API call in a webhook when the customer buys the product from the connect account
Thanks for sharing. You can refer to the refund guide of SC&T here: https://docs.stripe.com/connect/separate-charges-and-transfers?platform=web&ui=stripe-hosted#issue-refunds
The fund will be deducted from the platform to refund to the customer. The platform can reverse the transfer from the connected account after that
So the reverse the transfer would be a different API call? https://docs.stripe.com/api/transfer_reversals/create
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
And that will only occur if the connect account has not yet collected the funds? What happens if they collect the funds?
what i mean by collecting funds - move the money from stripe to their bank account
Reverse the transfer will be a different API call.
And that will only occur if the connect account has not yet collected the funds? What happens if they collect the funds?
what i mean by collecting funds - move the money from stripe to their bank account
I see that you're referring to the payout here. Am I right to understand the scenario which there isn't sufficient fund on connected account during the transfer reversal process?
correct
In this case, I'd recommend checking the available balance on the connected account, and reverse the transfer when there is sufficient fund on the connected account.
Alternatively, you can debit connected account to recover the fund: https://docs.stripe.com/connect/account-debits
Very interesting! What if debits never occur and the connect account refuses?
What if debits never occur
Do you mean the debit process is failed?
yes
Otherwise I am thinking of setting up some type of holding period before transfers are made to the connect account. So for example, a customer buys a connect account product. Within 5 days customers can get a 100% refund, within 10 days, 75% refund, etc. After 10 days 25% -> 100% - 75% = 25% can get transferred to the connect account and they can do whatever they want with it. That way there will always be a balance on the connect account I think. How would I do something like this?
By setting debit_negative_balances: true, Stripe will reclaim negative balances from an attached bank account: https://docs.stripe.com/api/accounts/object#account_object-settings-payouts-debit_negative_balances in the case of transfer reversal for example.
However, there is still a chance that the debit will still fail.
Stripe doesn't support custom balance holding like this. The only way is to set the connected account to manual payout, and manage the payout amount by yourself
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Okay this is all very enlightening. So if there is a failure on the debit the platform will have to come up with the extra money (even if the platform doesn't have it?). Is there a way to automate the payouts if set to manual payout? Maybe a cron job?
That should be implemented with your system, be it a cron or batch job
Okay I will look into the cron job maybe. So with failed debits the platform has to tough it out I guess?
You can reverse the transfer whenever the connected account has sufficient balance. For example, right after the next transfer
i see, so when a different customer buys their product, I take from that balance to help out the refunded customer?
Since the balance will all be on the connected account, it doesn't differentiate where those funds are coming from
So yes. Once the customer B makes a payment and platform transfers the funds to the connected account, platform can immediately perform transfer reversal to recover the previous refund on the platform
Wow, this is going to be quite complicated, it is never so easy it seems lol. So in summary you would suggest:
Customer buys product:
Transfer funds right away in the success webhook
If customer refunds:
Check connect account balance
Reversing the transfer on the connect account's balance if there are funds available
If not then try debiting the connect account balance (debit_negative_balances: true)
Other option:
Cron job with manual payouts to handle the transfers automatically after certain number of days
Which option are you leaning towards more?
Also wondering how I would test the debiting thing. To purposely cause a negative balance.
Either one works. This will depend on your business requirements, and what is the best way to recover the funds
ok, any ideas how to purposely cause negative balance to test the debiting?
hi there duchess, thanks river for the help so far
To test for that edge case scenario
A customer buys a product from a connect account, connect account paid out all the funds, their bank account is empty. Curious what would happen. There will forever be a negative balance on my platform?
You can read more about this scenario here: https://support.stripe.com/questions/fix-the-negative-balance-on-your-account
It won't be negative forever
Oh you mean the bank account doesn't have funds so we can't automatically top up the stripe account balance?
Yes.
This is your platform, no?
it is
Presumably the bank account wouldn't be empty forever
So eventually your balance would be topped up
You can also consider setting min balance: https://docs.stripe.com/payouts/minimum-balances-for-automatic-payouts
that is in terms of my platform balance being negative, what about the connect account balance being negative? And a customer tries refunding that connect account product but the connect account already got paid out? And the connect account refuses to pay the funds? And their bank account is empty with debit_negative_balances: true? Just wondering how it will all work and I am understanding correctly.
Ah that's a fair concern
Yes I suppose that's possible if you get a bad client/connect account that refuses to resolve the balance issue
yes, because the person could just disappear and never be heard from again
Yes
Unfortunately there's not really a way to handle this
You can't set minimum balances for the connect account
In a marketplace there's always a risk for fraud/bad users
hmm so my platform will have to handle that extra money that got refunded? So if a customer buys a $5 product from the connect account, my platform gets $4, connect account gets $1, the customer wants a refund, but the $1 already got paid out and spent somewhere by the connect account, my platform which get paid $4 now has to cough up an extra $1 out of nowhere?
Yes
That's actually what's expected with destination charges
The platform is liable for refunds
hmm I am just concerned like if I have a huge balance like that how I would ever pay it back. Since my platform doees not have that total anymore in the first place.
If you implement a destination charge flow, then you have to be prepared for such scenarios
this is separate charges and transfers though
That's the same thing
The only difference is the transfer is made manually
The transaction is made on your platform
So the platform holds liability for the refund
So in that case, I would combat it by timing when the transfer occurs?
That's an option
Depends on your business
And when the connect account needs to receive the funds
I think that is what I gotta do. I will only give the funds to the connect account after a certain period of time. That way therre is a refund window for the customer to get the whole amount back
You also have to watch for automatic payouts
They could payout the funds before they're transferred
Manual payouts may make more sense for you idk
gosh there is no way to stop that?
so i have to do manual payouts with a cron job? That is my best bet?
If you do manual payouts it gives you way more control
You can hold funds as long as you want
Then payout when you deem it's time
i see. where do i set that again in thee dashboard?
If you have express and custom accounts you can also put them on manual payouts
To control when they receive their funds
yes i have express accounts
But yes should be on your dashboard for your platform's payout schedule
To set it for connect accounts you can use the api
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
I don't know the exact link
I'm not the most familiar with the dashboard
But if you search payout schedule it should come up
no worries
Thanks. So if i were doing a cron job where would i even begin? List all connect account balances or something?
Kinda up to you, but if you were controlling this manually I would expect you to keep track of transactions on your end and when they should be paid out (according to your risk tolerance threshold). So that when you do initiate a manual payout, it only includes transactions you deem ready for payout.
ah not a bad idea
sorry in a meeting with someone at the same time lol
there is no way via the API to look it up without me doing something in the database?
What do you mean
You're trying to implement a highly custom use-case here
Where you need to hold on to certain transactions for certain lengths of time
You need to control this
You can use our api to retrieve data about things
But this is the kind of thing you'll need to track heavily in your own database