#tomato-source_transaction

1 messages · Page 1 of 1 (latest)

surreal elbow
#

And could stripe wait while payment succeed and then transfer to the connected accounts?
this is what happens with SourceTransaction

however, the Transfer is also "transferred" when the original Charge fails, so your code has to manually reverse the transfer if the original charge fails

steel silo
#

I'm sorry, but I don't understand. As if these 2 phrases of yours contradict each other

surreal elbow
#

sure, I can explain

steel silo
#

If the transfer can be made only if the payment was successful, sow how payment could fail after transfer?
If that's the main point of SourceTransaction - to prevent transfer

surreal elbow
#

with source_transaction, the Transfer is created as "pending" when the original Charge is created as pending but not fully succeeded or failed yet.

Regardless of the Charge eventually succeeding or failing, Stripe will transfer funds for the Transfer to the Connect account.

In cases where the original Charge succeeded, this works just fine, you collect $10 and Transfer $10-X.

in cases where your original Charge fails, the Transfer is still created and funds from the Platform Balance are moved to the Connect account regardless.

steel silo
#

Ok, thank u. So, is there any way to make it so that:
Stripe wait for Charge succeeded and only then transfer money to connected accounts?

surreal elbow
#

no, you have to account for charges failing and reversing transfers that were still created

steel silo
#

Ok, so i need listen to fail or success event of charge and then if fail - reverse them?

#

Are there any cases in which it will not be possible to return the money?

#

Considering that we use manual payout for custom connected accounts

surreal elbow
#

then no, your code should be reversing Transfers very quickly after they are paid and you aren't (I assume) paying out funds immediately either

steel silo
#

Sorry i don't understand

#

I will reformulate the question

#

To achieve what flow I want:

  1. Need create payment, transfers with SourceTransaction
  2. Listen fail event of payment
  3. If so - reverse money from connected accounts.

Yes?
Are there any cases in which it will not be possible to return the money?

surreal elbow
#

Are there any cases in which it will not be possible to return the money?
none

the only time a reversal will fail is if you are paying out the funds before they are reversed. Which I assume is not the case, but I can't say, since I don't fully know what your code is doing but I assume you are not immediately paying out funds when they land into the connected account's Balance.

steel silo
#

That's it, now I understand everything

#

thank u very much!

surreal elbow
#

unarchived

#

what's up?

steel silo
#

If I wait for the event "payment" succeed. Can I then do not using reverse?

#
  1. Create payment.
  2. Listen when payment succeed
  3. Create transfers with SourceTransaction tied to this payment
#

Do i need reverses with this flow?

surreal elbow
#

why would you reverse in that flow? sorry your wording was unclear

#

Can I then do not using reverse?

steel silo
#

I don't need. I ask u. Do i need reverse in this flow?
Could i use SourceTransaction in such flow?

#

I'm trying to avoid funds reverse