#carlos-fontana_api
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/1331573225037107286
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
This is my account id acct_1DYXTiEsYIHxK4oE
And this my client id (a connected account): acct_1QjgKPGaXe5d9XgQ
Hi, let me help you with this.
Direct Charges
What you're describing is Destination charges actually. Is that what you meant?
Yes, exactly
Destination Charges
This is my code... https://gist.github.com/carlos-448studio/4b2581b856e43000800bea3210351708
I can see the transactions, but when I’m in the customer’s dashboard, it doesn’t show any information about the payment or the person who made the payment, unlike in my dashboard where I can see that information
Basically, there's no built in way to copy the metadata to the Connected account's Charge, since it's treated as private to the Platform. However, the Platform can build a mechanism to copy this info and update the Charge on the Connected account, but it requires custom development.
Ah ok, how should I do that?
Basically, listen to payment_intent.succeeded event on the Platform. Fetch the latest_charge while expanding the transfer property: https://docs.stripe.com/api/charges/object#charge_object-transfer
On the expanded Transfer object you will find the destination_payment property, which is the ID of the Charge on the Connected account: https://docs.stripe.com/api/transfers/object#transfer_object-destination_payment
You will then need to send a request on behalf of your Connected account to update that Charge with the metadata from your Platform's payment.
Ok, got it, how should I send that request to update that?
Thanks!