-
-
Notifications
You must be signed in to change notification settings - Fork 296
Open
Labels
Description
Problem Description
Bookcars currently lacks a voucher/discount code system for promotional campaigns, customer retention, and marketing initiatives.
Proposed Solution
Implement a comprehensive voucher system with admin management interface and frontend integration.
Core Features
Voucher Types:
- Percentage discount (e.g., 20% off)
- Fixed amount discount (e.g., $50 off)
Admin Management:
- Create/edit/delete vouchers
- Set usage limitations (single-use, limited quantity)
- Configure validity periods (start/end dates)
- Basic usage tracking
Customer Experience:
- Voucher code input field during checkout
- Real-time validation and discount calculation
- Clear display of applied discounts in booking summary
- Error handling for invalid/expired codes
Technical Requirements:
- Database schema for voucher storage
- API endpoints for voucher validation and redemption
- Integration with existing payment flow (Stripe/PayPal)
- Admin dashboard interface additions
Use Cases
- Promotional Campaigns: "SUMMER2024" for 15% off bookings
- Customer Retention: Welcome discounts for new users
Additional Considerations
- Integration with existing user roles (Admin permissions)
- Prevent voucher stacking conflicts
Table Reference
Vouchers Table
id- ObjectId (Primary Key)code- String (Unique, e.g., "SUMMER2024")name- String (Display name)description- String (Optional)discount_type- String ("percentage" or "fixed")discount_value- Number (e.g., 20 for 20% or 50 for $50)funding_type- String ("platform", "supplier", "co-funded")min_rental_amount- Number (Minimum booking amount required)usage_limit- Number (Max uses, null = unlimited)usage_count- Number (Current usage count)valid_from- Datevalid_until- Dateis_active- Booleancreated_at- Datecreated_by- ObjectId (Reference to users)updated_at- Date
Voucher Usage Table
id- ObjectId (Primary Key)voucher_id- ObjectId (Reference to vouchers)booking_id- ObjectId (Reference to bookings)user_id- ObjectId (Reference to users)discount_applied- Number (Actual discount amount)used_at- Date
Bookings Table (Modifications)
Add this field:
voucher_id- ObjectId (Reference to vouchers)