#gershadahlnor_best-practices
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/1281624648257376307
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- gershadahlnor_api, 8 hours ago, 26 messages
Hello
Destination Charges create Transfers to your Connected Accounts
But yes, all the Products/Prices live on your platform
So your Connected Account does still receive the funds from the charge here via the Transfer
okay so as long as i specify the priceId in the checkout session, it will get hooked up to the connected account?
No
But you can always go from the Connected Account Charge backwards to that Price ID
so then how do i create a checkout session for the customer, and make sure the payment will go to the connected account?
You are already doing that
But the Price object doesn't exist on the Connected Account in this scenario, but it also doesn't need to.
Let's pause. What are you actually trying to do and what issue are you running into?
so i have users that can become a premium user on my app. this would then have them signup through stripe to get a connected account. then we let the users create products through our app, which creates a product and price on the stripe platform. then when a customer wants to buy a product on our app, we generate a checkout session for them to enter in the payment details. originally i was creating these products under the connected account instead of on the platform. but after another discussion on here earlier i found out i should be using destination chargres which needs all the products to be on the platform instead. so my main issue is I don't see where the products get linked to the connected accounts since they all live on the platform now
Yep okay so you are all set already and you just need to understand how to handle reconciliation for the Charges on your Connected Account
So let's go through that
The Destination Charge will automatically create a Transfer to your Connected Account
The result of that Transfer is a Charge on your Connected Account
It will take the form of an ID like py_xxxxxx
That Charge also has an underlying Balance Transaction
Payouts are made up of Balance Transactions
So if you want to you can go backward from a Payout on your Connected Account to each Product/Price that was used to create that Balance Transaction
Or you can just go backward from the Charge --> Product/Price
To do that, when you retrieve a Charge on your Connected Account then you want to look at the source_transfer: https://docs.stripe.com/api/charges/object#charge_object-source_transfer
That will give you the Transfer on your platform
From that Transfer object you can look at the source_transaction: https://docs.stripe.com/api/transfers/object#transfer_object-source_transaction
That will give you the Charge on your Platform
From the Charge you can look at the PaymentIntent: https://docs.stripe.com/api/charges/object#charge_object-payment_intent
And then you can list Checkout Sessions by that PaymentIntent: https://docs.stripe.com/api/checkout/sessions/list#list_checkout_sessions-payment_intent and that will show you the Products/Prices used
Now you can slim this down into 2 API requests by using Expansion, see: https://docs.stripe.com/expand
So really you don't need to do anything further here -- these things are already linked together
You just need to know how to navigate the objects
Okay perfect, that helps a lot! thank you!