#mm1356
1 messages ยท Page 1 of 1 (latest)
Hello! We'll be with you shortly. 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.
Hi ๐ those are two very distinct flows.
Checkout Sessions + Subscriptions is what you use to allow your customers to make payments.
Connect (Connected Accounts and the associated Account Links) are what you use to onboard a user so they can begin receiving payments.
Is the entity you're referring to expected to be both a Customer and Seller/Service Provider in your environment? If so, it makes sense to have them represented both as a Customer in your Platform Account, and as their own Connected Account.
Ok thank you ! So I think what I did is correct.
So if they want to stop subscriptino, they have to go in the page where they used checkout session, and if they want to see for what they received, or modifying the IBAN, they have to go to stripe connect.
Right ?
Yup
Perfect, thank you ! Last question, coud I use the same webhook to both received event from checkout session and from stripe connect ? I know the event will be different, but can I use the same one ?
And can I add metadata whenever I create a stripe connect so that I can link it to an existing customer ?
Yes, you can point multiple webhook endpoints to same location on your server, and have one webhook event handler for all of them, but you will need to create multiple webhook endpoints in Stripe as they can only listen to events from your account or your connected accounts (so you'll need at least two endpoints)
https://stripe.com/docs/connect/webhooks
Yes, there is a metadata field available on Account objects:
https://stripe.com/docs/api/accounts/create#create_account-metadata
Thanks ! Just to make sure I understood correctly, I need two endpoint in Stripe itself, but on my Next js project, I can have only one route.ts file (as attached) which handle all event from connect and from direct !
Right ?
Yup, precisely.
One thing to be wary of though, is that each webhook endpoint in Stripe will generate a unique signing secret, so you'll need to have logic that detects where the Event came from (your Platform or a Connected Account) so you know which secret to use when verifying its signature.
You mean it is not the same webhook secret ?
Correct
So maybe it is better to have two file webhook in my next js project. No ?
Either approach works. I'll defer to you on which one is better, as that likely depends on what you want the endpoint(s) to handle on your end so you'll be best suited to decide if a consolidated stream or separate streams works better there.
Ok ! What I want is that when someone create a stripe connect, I want his ID, so that when I can fill this user with its connect ID.
So that later, when I do checkout session, I can add its connect ID so that he receive money.
Is it correct ?
I'm not sure, it depends on what ID you're referring to when you say "I want his ID", and when you want to get it. If you're referring to ID of the Account that gets created, that is returned to you when you make the request to create Account, you don't need to wait for a webhook event for that.
By ID, I mean the ID of the connected account so that someone can make a payement to him
How can I get it in my database if I don't use webhook ?
Because what I want is someone create a connected account, so that, when another user want to send him 10 dollar, he can use checkout session with the connected id of him
Am I clear ?
That's why I'm also inquiring about when you want to get that ID in your flow. When you make a request to create a Conencted Account:
https://stripe.com/docs/api/accounts/create
the response that you receive includes the ID of the Account that request created.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
You mean there ? So in my api here, I can get the stripe connect ID and set it in my database ?
Yup, you can see you're already using it when you create the Account Link, you're referencing account.id.
Yes exactly ! So I don't need webhook I guess lol
Thanks
Last question
How can I get stripe secret for webhook connect? (maybe i will need it )
Seems I have only one, no ?
Each webhook endpoint generates its own unique signing secret. (I'm assuming "stripe secret" is referring to the webhook endpoint signing secret based on your screenshot, rather than something like the secret API key for your account)
You can get it from your dashboard once you've created the endpoint:
https://dashboard.stripe.com/test/webhooks
You can click on the endpiont from the list, then click on Reveal under Signing secret.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Ok you are super clear man ! Thanks ! I will continue now, appreciate how you are clear ๐ See you !