#timdab-connect

1 messages · Page 1 of 1 (latest)

oak swallow
#

Hi! So you want to add source_transaction when doing the transfer?

obsidian kettle
#

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

oak swallow
#

Yes, that should work! That's what the documentation is actually suggesting here:

a combination of automatic payouts and the source_transaction parameter

obsidian kettle
#

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 ?

void pendant
#

at what point am I unable to make a transfer to the connected account
Immediately following the charge.succeeded event (assuming you have adequate platform balance)

obsidian kettle
#

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 ?

void pendant
#

I'm not sure I understand. Which part contradicts what?

obsidian kettle
#

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

void pendant
#

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.

obsidian kettle
#

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 ?

void pendant
#

Hmm, you mean a specific point in time?

obsidian kettle
#

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

void pendant
#

Checking

obsidian kettle
#

Thanks and appreciated

void pendant
#

Hey there, sorry for the wait

obsidian kettle
#

no problem at all 🙂

void pendant
#

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)

obsidian kettle
#

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 ?

void pendant
#

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

Platforms can add funds to their balance from a bank account.

obsidian kettle
#

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 ?

void pendant
obsidian kettle
#

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

void pendant
#

Yep, it's Dashboard only right now

obsidian kettle
#

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 ?

void pendant
#

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

obsidian kettle
#

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 ?

void pendant
void pendant
obsidian kettle
#

Thanks - does the payout event reference which charge the payouts are related too ?

void pendant
obsidian kettle
#

#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 ?

void pendant
#

I'm not sure I understand the question

obsidian kettle
#

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

void pendant
#

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

obsidian kettle
#

But I'm not referencing the Charge on the Manual Payout ?

void pendant
#

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)

obsidian kettle
#

so how does Stripe know that this Payout is related to the £100 charge and not a different Charge ?

void pendant
#

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

obsidian kettle
#

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 ?

void pendant
#

You mean the automated payout after 90 days?

obsidian kettle
#

yes - the automatted payout after 90 days

void pendant
#

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

obsidian kettle
#

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 ?

void pendant
#

Because of the underlying Balance Transaction associated with the original Charge

obsidian kettle
#

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,

void pendant
#

Sorry, just confirming some things

obsidian kettle
#

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 ?

void pendant
#

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)

obsidian kettle
#

Thats fine - so what does happen to balances older than 90 days (systematically not regulatory) ?

void pendant
#

Nothing, they stay on your account

obsidian kettle
#

So you don't enforce the 90 day rule systematically ?

void pendant
#

Correct, we don't trigger an automatic payout for a balance older than 90 days

obsidian kettle
#

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 ?

void pendant
#

I think I've already answered that

#

Let me know if you have any other questions!

obsidian kettle
#

Sure and thanks for your help - is there anyway I can get this in a written confirmation from Stripe ?

void pendant
#

What specifically?

obsidian kettle
#

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

void pendant
#

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!

obsidian kettle
#

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" ?

void pendant
#

Outside of the documentation and this conversation, no

obsidian kettle
void pendant
#

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

obsidian kettle
#

Is there anyone I can escalate this too ?

void pendant
#

I'd recommend speaking with support directly if you require any further confirmation: https://support.stripe.com/contact

#

It's not really a technical implementation Q, which is what this server is for

obsidian kettle
#

ok - thanks

#

and understand