#juhanaflagship_transfers-payments
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/1228032158099312800
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi ๐
The transfer.created event is fired whenever a Transfer object is created. It does not necessarily mean the funds have transferred from the Platform account's Stripe balance to the Connected Account's Stripe balance.
If you wanted to track when the funds have hit the Connected Account's Stripe balance, you can listen to the balance.available event for each Connected Account.
https://docs.stripe.com/api/events/types#event_types-balance.available
But what I think you would want to do is check the transfer.destination_payment property
https://docs.stripe.com/api/transfers/object#transfer_object-destination_payment
This will have details on the actual payment to the Connected Account
Thanks for the answer! Would you recommend then polling the status of the destination payment until it's in a terminal state?
Yup! Just be aware that you will need to pass the Connected Account ID in the stripe_account header when retrieving the payment.
I just tested this, creating a Transfer from my test Platform Account
The Transfer object exists on the Platform, but the Payment (py_XXXX) exists on the Connected Account
So first I created the transfer
transfer = stripe.Transfer.create(...)
payment = stripe.Charge.retrieve(transfer.destination_payment, stripe_account='acct_XXXXX')
Then the second line I retrieve the destination payment using the Charges API
That sounds good. What are the terminal states of the payment?
The Charge can only have 3 statuses, one of which is pending so the ones you want will either be succeeded or failed
https://docs.stripe.com/api/charges/object#charge_object-status
Great ๐ Happy to help ๐