Join our community

Get access to the complete guide to developing and deploying fast, production-ready Nuxt apps.

7-9 Add the PaymentIntent Endpoint

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

This course was originally built with Nuxt 3, but it's no longer being maintained. You can still follow the lessons, but make sure to use the exact dependency versions listed in the course repository to avoid breaking changes.

If you’re looking for the most up-to-date and fully supported version, we recommend Mastering Nuxt: Full Stack Unleashed , which uses Nuxt 4 and actively being maintained.