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

116
Views
include description in stripe checkout session node.js

I have this:

    app.get('/create-checkout-session', async (req, res) => {
    let customer = {
        price: req.query.price,
        quantity: req.query.quantity,
        page: req.query.page,
        email: req.query.email,
        name: req.query.name
    }

    // insertIntoDbPreCheckout(customer, req, res)

    let successurl = 'http://localhost:1111/' + customer.page + ''
    let failedurl = 'http://localhost:1111/' + customer.page + ''
  const session = await stripe.checkout.sessions.create({
    payment_method_types: ['card'],
    payment_intent_data: {
      'description': customer.page
    },
    customer_email: customer.email,
    line_items: [
      {
        price_data: {
          currency: 'cad',
          product_data: {
            name: customer.page,
          },
          unit_amount: customer.price,
        },
        quantity: customer.quantity,
      },
    ],
    mode: 'payment',
    success_url: successurl,
    cancel_url: failedurl,
  })

  res.redirect(303, session.url);
});

i am trying to pass through a description, which will act as the product name, and a few other things, just some informaiton. But i cannot figure out how to do so. I tried the method above, as well as other methods, but it all returns empty. how can i fix this?

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!