Organizer Fees Documentation
Overview
The Organizer Fees system allows event organizers to configure different types of management fees that can be applied to their events. These fees can be configured to be paid either by the participant or absorbed by the organizer.Fee Types
The system supports three types of organizer fees:1. Fixed Amount Fee (TYPE_MONTHLY)
- Description: A fixed amount charged per registration
- Configuration: Set a fixed price in the organizer’s tariff configuration
- Payment: Can be paid by either participants or organizer
- Use Case: Fixed service fees per registration
2. Percentage Fee (TYPE_PERCENTAGE)
- Description: A percentage of the event subtotal
- Configuration: Set a percentage value (e.g., 5% of event cost)
- Payment: Can be paid by either participants or organizer
- Use Case: Commission-based fees
3. Combined Fee (TYPE_COMBINED)
- Description: Fixed amount + percentage of subtotal
- Configuration: Set both a fixed amount and percentage
- Payment: Can be paid by either participants or organizer
- Use Case: Complex fee structures
Configuration Flow
1. Organizer Tariff Setup
Organizers configure their tariff types in the admin panel:- Navigate to organizer management
- Set tariff type (Monthly/Percentage/Combined)
- Configure amounts and percentages
- Activate the tariff
2. Event Configuration
For each event, organizers can configure:- Who pays: Participant or Organizer
- Flexibility: All fee types can be paid by either participants or organizer
3. Checkout Integration
The fees are automatically calculated and applied during checkout:- Fees are calculated based on event subtotal
- Added to subtotal before tax calculation
- Displayed as “Tarifa de servicio” in checkout summary
Database Schema
Orders Table
Organizer Fees Details Structure
Implementation Details
Controller Logic
TheCheckoutController includes a calculateOrganizerFees() method that:
- Checks if participant pays fees (
participant_pays_fees) - Retrieves organizer tariff configuration
- Calculates fees based on tariff type
- Returns fee amount and details
Fee Calculation Logic
Tax Calculation
Important: Fees are added to the subtotal before tax calculation:Frontend Integration
Checkout Display
The checkout page shows organizer fees in the summary:JavaScript Updates
Dynamic updates when:- Discounts are applied/removed
- Products are added/removed from cart
- Cart totals are recalculated
Validation Rules
Frontend Validation
- All fee types can be paid by either participants or organizer
- No restrictions based on fee type
Backend Validation
Configuration Interface
Management Fees Page
- Shows current organizer tariff configuration
- Displays tariff type, amounts, and percentages
- Allows selection of payment responsibility
- Flexible payment options for all fee types
Admin Interface
- Organizer tariff management
- Fee type configuration
- Activation/deactivation controls
Testing
Unit Tests
The system includes comprehensive unit tests intests/Unit/OrganizerFeesTest.php:
- Tests all fee types (fixed, percentage, combined)
- Tests discount combinations
- Tests edge cases (inactive tariffs, no fees)
- Tests payment responsibility logic
Test Scenarios
- No fees configured: Verify no fees are charged
- Fixed amount fee: Verify either party can pay
- Percentage fee: Verify calculation and payment options
- Combined fee: Verify complex calculations
- With discounts: Verify fees calculated on discounted amounts
- Inactive tariff: Verify no fees when tariff is disabled
API Integration
Checkout Endpoints
All checkout endpoints return organizer fees in responses:Session Storage
Organizer fees are stored in session for consistency:Migration Guide
Database Migration
Configuration Steps
- Set up organizer tariffs in admin panel
- Configure events to use organizer fees
- Set payment responsibility (participant/organizer)
- Test checkout flow
Troubleshooting
Common Issues
-
Fees not appearing in checkout
- Check if
participant_pays_feesis enabled - Verify organizer tariff is active
- Check tariff configuration
- Check if
-
Incorrect tax calculation
- Ensure fees are added before tax calculation
- Verify
subtotalWithFeeslogic
-
Fixed fees showing as participant option
- Check tariff type validation
- Verify frontend/backend validation alignment
Debug Information
Enable logging to track fee calculations:Future Enhancements
- Multiple fee structures per organizer
- Fee tiers based on event size
- Promotional fee waivers
- Fee analytics and reporting
- Automated fee collection
