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

193
Views
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 answers
Answer question

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 Report

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 Report
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!