#timdab-connect
1 messages · Page 1 of 1 (latest)
Hi Soma Thats correct - when I recieve the charge.succeeded web hook event from the payment or the subscription being completed I want to create a transfer as below to the connected account.
transfer = stripe.Transfer.create(
amount=1000,
currency="gbp",
source_transaction="{CHARGE_ID}",
destination="{{CONNECTED_STRIPE_ACCOUNT_ID}}",
)
This means that the transfer will complete when the funds are available and I'm I happy that the remaining funds will be paidout to the platform accounts bank account when they are available
Yes, that should work! That's what the documentation is actually suggesting here:
a combination of automatic payouts and the source_transaction parameter
Thanks - at what point am I unable to make a transfer to the connected account - ie if the full amount has been paid out to the platform accounts bank account - is there an event for this ?
at what point am I unable to make a transfer to the connected account
Immediately following thecharge.succeededevent (assuming you have adequate platform balance)
Thats a problem then, because when using the Stripe checkout (and the payment being successful), I immediatley get a charge.succeeded event - how can I do a transfer in this case if the charge.succeeded event is triggered as soon as the payment is made - this contradicts the response from soma ?
I'm not sure I understand. Which part contradicts what?
Unless you mean that I can trigger the transfer after I get the charge.succeeded event ?
Is that corrected ?
sorry - just want to be really clear on this before I develop the flow
I can trigger the transfer after I get the charge.succeeded event
Yes, exactly! Although I somewhat misspoke
By using source_transaction, the transfer request succeeds regardless of your available balance and the transfer itself only occurs once the charge’s funds become available.
Thanks - so that confirms the start time from which I can trigger the transfer. What determines the other boundary - ie at what point can I no longer trigger a transfer based on the source_transaction_id ?
Hmm, you mean a specific point in time?
Yes - based on the flow above - at what point or event can I no longer trigger a transfer based on the source_transaction_id
I'm guessing its after the funds have been paid out to the platform accounts bank account, but wanted to confirm this
Checking
Thanks and appreciated
Hey there, sorry for the wait
no problem at all 🙂
So it won't fail if the underlying transaction has already been paid out (assuming you have adequate balance)
The only real benefit to the source_transaction parameter it to prevent over-transferring and to delay the transfer until the charge clear (i.e. not pending)
Thanks - is there an update event on the charge to show that it is no longer pending - ie does the charge update the state once the funds associated with the charge have been paid out ?
and if the transfer is not created in time and the funds associated with the charge have been paid out, is it possible to top up the balance in the platform account in order to make the transfer ?
does the charge update the state once the funds associated with the charge have been paid out ?
It does not, no
and if the transfer is not created in time and the funds associated with the charge have been paid out, is it possible to top up the balance in the platform account in order to make the transfer ?
We have account top-ups in certain regions, yep: https://stripe.com/docs/connect/top-ups
Thats only available in the US though - according to the documentation - We are UK based, so is there a a method to do this in the UK ?
Thanks - thats great - so this can only be completed in the dashboard on not via the API ?
sorry this is taking time - I have a couple more questions afterwards
Yep, it's Dashboard only right now
ah - ok - thanks
The other option is that we turn off automatic payouts and handle the transfers and Payouts manually.
According to the documentation For compliance reasons, funds can be held in a reserve for up to 90 days from charge creation to payout. If we set payouts to be manual (on the platform account ) and set up an api transfer and an api payout (on the platform account) related to the charge. What happens systematically if the payout and the transfer amount are less than the charge amount. Are the total funds or a portion of the funds returned to the customer who paid the funds in ?
after the 90 days ?
What happens systematically if the payout and the transfer amount are less than the charge amount
The leftovers funds will remain in the platform balance
Are the total funds or a portion of the funds returned to the customer who paid the funds in ?
They aren't returned. They'd just been paid out automatically
ah - thats interesting - is their an api event when this happens and can you point me to the docs where its defined ?
and they are paid out automatically even if payouts are set to MANUAL ?
It'd just be a payout.created event
Yes, we're not able to hold funds for longer than 90 days
Thanks - does the payout event reference which charge the payouts are related too ?
Not directly, you'd need to look that up via API: https://stripe.com/docs/expand/use-cases#charges-in-payout
#966635549681152003 message - so Stripe tracks which charges haven't been either transfered or payout (in part or in total) and will reference these on the BalanceTransaction related to the Payout - how does Stripe know which charges the Payout relates too. For Transfers I can pass the source_transaction_id, but how does that work for the Payout ?
I'm not sure I understand the question
ok - I'll give an example and thanks for bearing with me
£100 is paid into the platform account as a charge
I transfer £60 to the connected account
I Manually payout £35
After 90 days Stripe sees that I have a balance of £5 pounds and creates the automatic payout
How does Stripe know that the payout of £35 relates to the £100 charge and can therefore reference the £100 charge on the automatic payout
Basically - I need to know what the £5 automatic payout relates to so I can take an action in my system related to the original £100 charge which hasn't been successfullly allocated
How does Stripe know that the payout of £35 relates to the £100 charge and can therefore reference the £100 charge on the automatic payout
Because of the underlying Balance Transaction object
But I'm not referencing the Charge on the Manual Payout ?
Every Stripe payment, transaction and transfer between accounts is represented as a Balance Transaction object, which can be related back to the original Charge (as noted at that last URL)
so how does Stripe know that this Payout is related to the £100 charge and not a different Charge ?
Ah, wait. Forgot about this:
You can only retrieve balance transaction history on automatic payouts. If you have manual payouts enabled, you must track transaction history on your own
So yeah, I guess you need to handle tracking that. Maybe via metadata
ok - so in the example above - if I used a manual payout - would stripe look to make an automatted payout of £40 anyway as it could not link my manual payout of £35 to the original charge ?
You mean the automated payout after 90 days?
yes - the automatted payout after 90 days
No, there'd only be a £5 payout. Irrespective of how the original charge was split up, the 'forced' payout (after 90 days) only pertains to balances that are close to breaking that 90 day threshold
ok - so how does Stripe know to only create a 'forced' payout of £5 if the manual payout (£35) and the charge (£100) are not linked - this is a simple example - there will be lots of transactions effecting the balance everyday
ie how does stripe know that £5 balance is 90 days old ?
Because of the underlying Balance Transaction associated with the original Charge
But you mentioned above that "you can only retrieve balance transaction history on automatic payouts" - How does Stripe know that the Manual Payout of £35 was related to original charge so it knows to only 'force' payout £5 - I'm so sorry that I'm not getting this point
£100 (charge) - £35 (manual payout ) - £60 (transfer) = £5 (forced payout)
How does Stripe do this calculation if the manual payout and charge are not linked (bearing in mind there will be lots of transactions on any day)
If you can clarify that, then I'd reference the charge, manual payout and transfer from the balance transactions on the £5 'forced' payout and take the appropirate action in my system,
Sorry, just confirming some things
Perfect - no rush at all - I'd rather understand this fully
While you're checking - is there an identifier on the 'forced' payout so I know the payout is of this type ?
Ok, so turns out I was incorrect. We don't trigger automatic payouts for balances older than 90 days when you're on manual payouts
(the docs do imply that, it's confusing)
Thats fine - so what does happen to balances older than 90 days (systematically not regulatory) ?
Nothing, they stay on your account
So you don't enforce the 90 day rule systematically ?
Correct, we don't trigger an automatic payout for a balance older than 90 days
Thats a bit worrying as you docs say that balances can not stay on an account for more than 90 days - so that is not enforced ?
Sure and thanks for your help - is there anyway I can get this in a written confirmation from Stripe ?
What specifically?
It will have a major impact on our implemantion so want to make sure I have the documented
"Correct, we don't trigger an automatic payout for a balance older than 90 days"
So in effect the balance will stay on the Platform account until paid out
That's not something we'd offer. There's no reference to the forced payouts in the documentation (although it kind of it implies it)
Generally you should just avoid accruing balances over 90 days!
So can I get written confirmation from Stripe that "Balances on the Platform account do not get refunded or forced paid out after 90 days" ?
Outside of the documentation and this conversation, no
Thats a real problem for me - you're asking me to base potentially x months of development risk on non specific documentation or a discord conversation
My recommendation is to just avoid accruing balances for that length of time. How you track that is up to you. This is one of the drawbacks of manual payouts unfortunately
Is there anyone I can escalate this too ?
I'd recommend speaking with support directly if you require any further confirmation: https://support.stripe.com/contact
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
It's not really a technical implementation Q, which is what this server is for