#mm1356

1 messages ยท Page 1 of 1 (latest)

past stirrupBOT
#

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.

  • mm1356, 5 hours ago, 28 messages
  • mm1356, 1 day ago, 46 messages
obsidian charm
#

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.

cosmic hollow
#

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 ?

obsidian charm
#

Yup

cosmic hollow
#

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 ?

obsidian charm
past stirrupBOT
cosmic hollow
#

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 ?

obsidian charm
#

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.

cosmic hollow
#

You mean it is not the same webhook secret ?

obsidian charm
#

Correct

cosmic hollow
#

So maybe it is better to have two file webhook in my next js project. No ?

obsidian charm
#

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.

cosmic hollow
#

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 ?

obsidian charm
#

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.

cosmic hollow
#

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 ?

obsidian charm
cosmic hollow
#

You mean there ? So in my api here, I can get the stripe connect ID and set it in my database ?

obsidian charm
#

Yup, you can see you're already using it when you create the Account Link, you're referencing account.id.

cosmic hollow
#

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 ?

obsidian charm
#

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.

cosmic hollow
#

Ok you are super clear man ! Thanks ! I will continue now, appreciate how you are clear ๐Ÿ™‚ See you !