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

195
Visualizações
How to save client data to database after Stripe payment

I have a React application where the client fills out a form to be saved to my database. The client then proceeds to make a Stripe based payment. Only after receiving the payment confirmation should the data be uploaded.

The form data includes multiple attributes such as follows

data = {
   name: "Mike",
   summary: "some long text",
   ...
}

The workflow would similar to the following:

Client fills out form -> Payment -> Payment confirmation -> Post-payment action (uploading the data from step 1)

I am aware of Stripe's webhooks as well as the line_items, but I was wondering if using the latter would be best practice as some of the attribute values in data can be quite long. Is there a more common approach to this case?

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

as some of the attribute values in data can be quite long.

What problem are you trying to solve? Prevent database overflow? Avoid sending large amounts of data in API requests? For both cases, it is suitable to create a temporary record in the database, which will be deleted when your webhook will catch the checkout.session.expired event (for example).

about 4 years ago · Juan Pablo Isaza Relatório

0

Stripe recommends that you handle any post-payment actions/fulfilment using their events with a webhook. In this case you'd listen for the payment_intent.succeeded event and create a webhook handler that saves the required fields/information fro the Payment Intent object to your database.

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