#2Clutch-checkout-webhooks

1 messages · Page 1 of 1 (latest)

midnight island
#

Hello! Give me one minute and then i'll be able to help

#

The checkout specific events you're referencing would only apply to the first payment of the subscription - when the customer is actually interacting with Checkout. All future recurring payments would trigger a different set of events

#

For the customer portal session, a return_url is only required if one has not been set in your settings

obsidian thistle
#

Thanks a lot for the insightful answer. I really appreciate it.

#

That being said, despite having gone through multiple pages of Stripe’s documentation, I’m still not sure I understand where endpoint_secret is supposed to come from.

midnight island
#

endpoint_secret is something you get either from the dashboard after you've set up your endpoint secret, or from the Stripe CLI if you're just testing your endpoint locally (you'll see it in the output after you run stripe listen)

obsidian thistle
#

Great! That answers my question.

#

One last thing. Since the webhook endpoint doesn't take any parameter, what's the recommended way to retrieve the customer_id. I'm guessing it will always be part of the payload, but just in case it's not, I'd like to know the recommended way to do this.

midnight island
#

What exactly are you trying to do?

obsidian thistle
#

create a portal session for subscribed users so that they can update their payment information or cancel their membership.

#

the functionality is handled by stripe, so my focus on generating the url.

midnight island
#

Why are you doing this from a webhook endpoint though? The webhook endpoint has not way of sending that information back to your frontend

obsidian thistle
#

i must've misunderstood then.

#

for some reason, i thought it was possible with the webhook.

#

i'll set up a separate endpoint.