Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

208
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda