Want to have access to everything?

Go PRO to have access to this lesson and the entire Adonis Mastery library. Already a PRO? Sign in to continue learning!

Accepting payment

Everything is in place to collect user's payment details. In this lesson, we look at how to process the collected payment details to make a purchase.

Accepting One-time Payment With Stripe

1hr 15mins
10 lessons
Beginner

Introduction

3m 42s

We start off by introducing the course and what the course is going to cover.

Getting Started

So as to keep this course focus mainly on accepting payment with Stripe, let's clone the starter project for this course from the GitHub repository.

The adonis-stripe package makes it seamless to work with Stripe in AdonisJS 5 applications. So in this lesson, we install and set it up to get our application ready to start accepting payment with Stripe.

Checkout

In this lesson, we begin the checkout process by setting up Stripe Elements to accept card details.

Everything is in place to collect user's payment details. In this lesson, we look at how to process the collected payment details to make a purchase.

Webhook

In this lesson, we look at how to set up Stripe webhook for our application so we can use it to fulfill users purchases on our end.

With the webhook all set up, let's start fulfilling users purchase on our end in this lesson.

Purchases

In the last lesson, we were able to fulfill users purchase and confirmed it in the database. Of course, users of our application will need a way to access the courses they have purchased. Let's add that in this lesson.

As it stands, anybody can watch lessons in a course, provided they know the link of the lesson of the course. In this lesson, we'll add to prevent that.

What if there's some kind of indication that shows users have already purchased a course and instead show them a link to watch the course? We'll look at how to achieve that in this lesson.

Chimezie Enyinnaya

Hi, I'm Chimezie Enyinnaya, your teacher.

I’m a self-taught software developer based in Lagos, Nigeria, with over 8 years of experience. In the last couple of years, I've been doing more teaching because I enjoy sharing my knowledge so that others can benefit from it. Come along as I teach you all I know about AdonisJS, Node.js, and JavaScript at large!

Source code
Lesson video (SD)
Lesson video (HD)