Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

243
Views
¿Cómo obtener metadatos de la sesión de pago de franjas en el controlador de webhook?

Estoy tratando de asociar el nombre en los metadatos con la sesión de pago y luego acceder al controlador de webhook. ¿Como podría hacerlo?

Mi código:

 const session = await stripe.checkout.sessions.create({ line_items: [ { price: <priceid>, quantity: 1, }, ], metadata: { nick: `${req.params.nick}`, }, mode: "payment", success_url: `${process.env.DOMAIN}/success`, cancel_url: `${process.env.DOMAIN}/bany`, })

Controlador de webhook:

 router.post( "/webhook", express.json({ type: "application/json" }), (request, response) => { const event = request.body // Handle the event switch (event.type) { case "checkout.session.completed": const data = <metadata from checkout session> console.log(data) break default: console.log(`Unhandled event type ${event.type}`) } response.json({ received: true }) } )
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!