#kyrn0zofficiel_webhooks

1 messages ¡ Page 1 of 1 (latest)

calm apexBOT
#

👋 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/1226848833720287302

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

covert adderBOT
limpid tartan
rain flicker
limpid tartan
#

the fact that i didn't have this part can influence :

#

i do like this :

router.post('/webhook', express.raw({ type: 'application/json' }), async (req, res) => {
  let event;

  try {
    event = await stripe.webhooks.constructEvent(
      req.body,
      req.headers['stripe-signature'],
      process.env.STRIPE_WEBHOOK_SECRET
    );
  } catch (err) {
    return res.sendStatus(400);
  }

  try {
    if (event.type === 'payment_intent.created') {
      ...
    } else if (event.type === 'checkout.session.expired') {
      ...
    } else if (event.type === 'checkout.session.completed') {
      ...
  } catch (err) {
     ...
  }
});

module.exports = (app) => {
  app.use(router);
};
rain flicker
#

I don't think your code is the issue here. It's an issue with your server/host configuration, specifically the TLS config

limpid tartan
#

oh sorry

#

let me show you when i go on ssllabs

rain flicker
#

Yeah the SSL cert chain is incomplete. You need to resolve that with your host/server provider

limpid tartan
limpid tartan
#

it's my first time

rain flicker
#

Well, where/with who is your endpoint hosted?

limpid tartan
#

ionos

#

i create my certificate with ionos

#

and my domain is linked to a VM

rain flicker
#

Then you need to speak with them or fix it yourself. Outside of what I can help you with

limpid tartan
#

is it specified where i need to complete my SSL ?

rain flicker
#

I'm not familiar with Ionos at all so I don't know. But the certificate isn't valid so we can't send events there as it is

limpid tartan
#

ok i'm with an assistant right now but i don't know how to explain it

#

because i said that it's incomplete and he told me that it was good

rain flicker
#

Well, it isn't as you can see from the SSL report

#

The certificate chain is broken and thus it's invalid

limpid tartan
#

it's that possible it cames from the intermediar certificate

#

because i didnt use it