#suzyw_code
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/1243514403408707655
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
hi! it's balance_transaction->source->source_transfer->source_transaction->payment_intent
we describe this at https://docs.stripe.com/expand/use-cases#charges-in-payout:~:text=If you’re using Connect with destination charges
Thank you, that's really helpful.
If we then go onto to retrieve the payment, is it possible to get the related Payment Intent Id for that payment? pi_3MZdHfECYMgji7vm0o1jbjDw
when you say retrieve the payment, what object exactly are you referring to?
so the py_xxxx on the connected account
that object has https://docs.stripe.com/api/charges/object#charge_object-source_transfer which is the tr_xxx transfer on the platform account, then that transfer has source_transaction which is the charge associated with the PaymentIntent and thus that object has the payment_intent field
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
so the chain is source_transfer->source_transaction->payment_intent as mentioned
Am I right in thinking this won't be possible for BalanceTransactions which are for REFUNDs? As they don't have an associated Charge ?
Is this what you mean by the chain?
well it's always possible but the chain would be different
yep. And the reason that errors is you have the make that request on the platform not the connected account(so no RequestOptions with StripeAccount).
you need to internalise the diagram at https://docs.stripe.com/connect/destination-charges?platform=web&ui=elements#flow-of-funds-app-fee , which for example shows how the py_xxx payment and its BalanceTransaction exist on the connected accout, but the Transfer/Charge/PaymentIntent objects exist on the platform