Video Streaming Subscription Service API
A production-quality REST API for a video streaming subscription platform. The application allows users to register for a free trial account and process subscription payments through secure backend endpoints.
Features
- User registration system
- Validation for usernames, passwords, emails, dates of birth, and credit card numbers
- Age restriction enforcement (18+ only)
- Duplicate username detection
- Payment processing endpoint
- User filtering based on credit card registration
- HTTP status-based error handling
- Unit testing support
- No database required
User Validations
- Username must be alphanumeric with no spaces
- Password must:
- be at least 8 characters long
- contain at least one uppercase letter
- contain at least one number
- Email must be valid
- Date of Birth must follow ISO 8601 format
- Credit card number is optional but must contain 16 digits if provided
- Users must be at least 18 years old
Payment Validations
- Credit card number must contain 16 digits
- Amount must be a valid 3-digit number
- Credit card must belong to a registered user
Prerequisites: Java 17 or later