Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

207
Vistas
collect user inputs using Nodejs and Stripe

I'm new with Node.js I want to collect user data like name, phone number, Gmail, city ...etc using nodejs & stripe. So that I can know the user from stripe dashboard with all their information.

server side

app.post("/charge", (req, res) => {
    try {
        stripe.customers
            .create({
                name: req.body.name,
                email: req.body.email,
                source: req.body.stripeToken
            })
            .then(() => res.render("succ.html"))
            .catch(err => console.log(err));
    } catch (err) {
        res.send(err);
    }
});

when I use this code I just take the name and Gmail from user...IDK what elements can I use to take phone number and city ...etc.

scripts.js

const stripeTokenHandler = token => {
    const hiddenInput = document.createElement('input');
    hiddenInput.setAttribute('type', 'hidden');
    hiddenInput.setAttribute('name', 'stripeToken');
    hiddenInput.setAttribute('value', token.id);
    form.appendChild(hiddenInput);

    form.submit();
}
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

you can save the phone number and address in customer object's shipping property. See https://stripe.com/docs/api/customers/object#customer_object-shipping

You might also want to check out Stripe Checkout. The Checkout page provides built-in input elements to collect customer info, including phone number and billing/shipping address. See https://stripe.com/docs/payments/checkout/phone-numbers

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda