#tomato-source_transaction
1 messages · Page 1 of 1 (latest)
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
I'm sorry, but I don't understand. As if these 2 phrases of yours contradict each other
sure, I can explain
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
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.
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?
no, you have to account for charges failing and reversing transfers that were still created
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
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
Sorry i don't understand
I will reformulate the question
To achieve what flow I want:
- Need create payment, transfers with SourceTransaction
- Listen fail event of payment
- If so - reverse money from connected accounts.
Yes?
Are there any cases in which it will not be possible to return the money?
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.
If I wait for the event "payment" succeed. Can I then do not using reverse?
- Create payment.
- Listen when payment succeed
- Create transfers with SourceTransaction tied to this payment
Do i need reverses with this flow?