#mks00_connect-sct
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/1234623643074560010
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
@cursive crystal if you use Separate Charges and Transfers then all the objects would live in your own platform account and you would ~never use the Stripe-Account header feature really
So yeah you need to fix your code and have the Checkout Session created on your own platform account not the connected account instead
mks00_connect-sct
@lofty field Thank you for your reply.
I'm not sure I understood correctly.
In the documentation, I don't need to specify an id. But I have no trace of the payment.
I have to specify a stripe id to retrieve the event in my webhook.
'line_items' => [
[
'price_data' => [
'currency' => 'usd',
'product_data' => ['name' => 'Restaurant delivery service'],
'unit_amount' => 10000,
],
'quantity' => 1,
],
],
'payment_intent_data' => ['transfer_group' => 'ORDER100'],
'mode' => 'payment',
'success_url' => $url_success . '?total_price=' . $total_price,
], ['stripe_account' => $sellerStripeAccountId]); <--- here ```
The code you have, the last line is passing the Stripe-Account header. That is what you should not use since you want to use Separate Charges and Transfers. Everything should be on your own Stripe account not on the connected account
All right!
But how can I retrieve the event in my webhook?
Is this the way I can make a payment for a buyer to different stripe connect accounts?
I'm sorry I think you are misunderstanding the flow of funds completely. You explicitly said you want to use Separate Charges and Transfers. Usually what this means is that I pay you $100 on your account and then you transfer $30 to seller A for a book, $20 to seller B for another book and $40 to seller C and keep $10 for yourself
Oh, excuse me.
I work on an amazon-type site.
Where a customer will fill his cart with motorcycle parts from different sellers.
The customer validates his cart, and registers his information in a payment session. Then my goal is to send the money to the connected stripe accounts of the motorcycle parts sellers.
Am I making a mistake in my integration?
you are picking the right flow of funds but your code is incorrect. The Checkout Session should be on your platform account and it should aggregate all the line items together
Oh I see my code has an error!
So I have to put the stripe_account in the header must be my identifier?
Which I find in the account category of my profile?
I'm sorry I don't really understand your sentences right now
Sorry for my english ^^
// parameters
], ['stripe_account' => $sellerStripeAccountId]); <--- here ```
Your code does this and that's incorrect. That last line should be removed so that the Checkout Session happens on your own Stripe account instead
(no problem I know it's a lot of moving pieces to understand our product)
You're so kind to help me so much
But when I remove this line I see nothing on my Stripe account. The checkout session complete well but I have nothing in my webhook
The Checkout Session is now created on your platform account. You should see everything in the Dashboard on your own account and not the connected account(s)
You also need to make sure you create an Account WebhookEndpoint instead of a Connect WebhookEndpoint to listen to Events on your own account
amazing ๐
No problem at all, I'm glad you figured it out ๐