Overview
The enrollment process guides students from course discovery through payment to access. SkillRise uses a streamlined flow that provides detailed course information, transparent pricing, and secure payment processing via Razorpay.Course Details Page
The course details page (/course/{courseId}) is the primary enrollment touchpoint. It combines comprehensive course information with a persistent enrollment card.
Page Structure
Hero Section
The top section uses a gradient background and contains: Left Column (Content)- Breadcrumb navigation (Home / Explore / Course Title)
- Course title (large, bold heading)
- Course description (Markdown-rendered)
- Rating display (numeric + 5 stars + count)
- Total enrolled students
- Educator name (clickable link)
- Course thumbnail or preview video
- Countdown timer (“5 days left at this price”)
- Pricing display with discount
- Quick stats (rating, duration, lesson count)
- Primary enrollment CTA button
- “What’s included” feature list
Pricing Display
Prices are calculated and displayed with discount logic:What’s Included
Standard benefits displayed for all courses:Lifetime access with free updates
Step-by-step, hands-on project guidance
Downloadable resources and source code
Quizzes to test your knowledge
Certificate of completion
Course Structure Section
Below the hero, an expandable accordion displays the complete course curriculum:Chapter Accordion
Each chapter shows:- Chapter title - Descriptive section name
- Lecture count - Number of videos in chapter
- Expand/collapse arrow - Toggle chapter contents
Lecture List
When expanded, chapters reveal individual lectures:Preview Functionality
Lectures marked as free preview can be watched before enrollment:- Click “Preview” button on any free lecture
- ReactPlayer loads in the purchase card thumbnail area
- Full video controls available
- Students can preview before purchasing
Enrollment States
Unauthenticated Users
When not logged in:- All course details visible
- Clicking “Enrol Now” shows toast: “Login to Enroll”
- User redirected to authentication flow
Already Enrolled
For enrolled students:- Button text changes to “Resume Learning”
- Clicking navigates directly to player:
/player/{courseId} - No payment flow shown
- Pricing section hidden
New Enrollment
For authenticated, non-enrolled users:- Full pricing visible with discount
- “Enrol Now” button enabled
- Clicking navigates to checkout flow
Checkout Flow
Checkout Page
The checkout page (/checkout/{courseId}) provides a simple, focused payment interface:
Page elements:
- Back button - Returns to course details
- Page title - “Complete your purchase”
- Course name - Confirms which course is being purchased
- Bank icon - Visual payment indicator
- Explanation text - “You’ll be redirected to Razorpay…”
- Pay button - Primary CTA to open Razorpay
Authentication Check
The checkout page enforces authentication:Razorpay Integration
Payment Flow Architecture
Payment States
- Loading
- Modal Open
- Modal Dismissed
- Payment Complete
Button shows: “Opening Razorpay…”Button disabled, user waits for modal
Payment Success Page
The success page (/payment/success/{courseId}) confirms enrollment:
Page Elements
- Success checkmark - Large teal checkmark icon
- “Payment successful!” heading - Confirmation message
- Course card - Shows purchased course with thumbnail
- Price display - Final amount paid
- “Start Learning” CTA - Primary action button
- Auto-redirect countdown - “Redirecting in Xs”
- “View all my courses” link - Secondary action
Auto-redirect Logic
Enrollment Guard Pattern
The player page implements a retry pattern for race conditions:Error Handling
SDK Load Failure
SDK Load Failure
If Razorpay script fails to load:
Order Creation Failed
Order Creation Failed
Backend returns error when creating order:Common causes: Already enrolled, course not found, server error
Payment Failed
Payment Failed
User’s payment is declined by bank:
- Razorpay modal shows error
- User can retry with different card
- Modal remains open for retry
Verification Failed
Verification Failed
Client-side verification call fails:
- Webhook will still complete enrollment
- User may need to refresh to see course
- Success page still displays
Security Measures
Signature verification:Mobile Responsiveness
Course Details Mobile Layout
- Hero columns stack vertically
- Purchase card becomes full-width
- Breadcrumb text truncates
- Touch-friendly buttons (48px height)
Checkout Mobile Experience
- Razorpay modal is mobile-optimized
- UPI payments supported
- Wallets and net banking available
- Back button easy to reach
Related Features
- Browsing Courses - Course discovery
- Learning Experience - Post-enrollment experience
- Progress Tracking - Enrollment management