In this lesson, we solve step one by creating the CoursePurchase object.
First, we add the model to our Prisma schema. The key fields here are verified, which defaults to false, the paymentId, and the userEmail.
Then, we create the CoursePurchase object in the paymentIntent endpoint. This way we can be sure that it exists before the Stripe webhook fires (we implement the webhook in the next lesson).
18 lessons
7 lessons
7 lessons
11 lessons
18 lessons
8 lessons
17 lessons