In this lesson, we add in the PaymentIntent endpoint as well as finish some UX polish for our checkout.
We need the PaymentIntent endpoint to securely create an object that represents the transaction in Stripe’s database. This way, the user cannot modify what they are buying (or for how much).
The front end then takes the reference to this object (the PaymentIntent secret) and makes a call directly to Stripe’s API. This is more secure for the user, since their financial information never passes through our server.
See this diagram if you want to understand this flow better: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#web-create-intent
18 lessons
7 lessons
7 lessons
11 lessons
18 lessons
8 lessons
17 lessons