Skip to content

Feature Request: Voucher/Discount Code System #85

@rolland97

Description

@rolland97

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

  1. Promotional Campaigns: "SUMMER2024" for 15% off bookings
  2. 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 - Date
  • valid_until - Date
  • is_active - Boolean
  • created_at - Date
  • created_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)

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions