# B2C Controllers

Consumer-facing customer journey. Users enter via email capture or Branch.io deep links and proceed through verification, subscription, and payment.

## Base Controllers

| File | Description |
|------|-------------|
| `B2CController` | Base controller; sets locale, view prefix (`V2.B2C.{language}`), URL prefixes, and common view data |
| `BaseCustomerController` | Abstract parent for language-specific customer controllers; handles auth, session, payment flows |
| `BranchController` | Entry-point for Branch.io deep links; stores UTM parameters and coupon in session |
| `RazorpayBillingController` | Manages Razorpay subscription billing flows for Indian customers |

## Language Controllers

Each language directory contains a `CustomerController` that extends `BaseCustomerController`. English also includes a `LoadingController`.

| Directory | Files |
|-----------|-------|
| `English/` | `CustomerController.php`, `LoadingController.php` |
| `German/` | `CustomerController.php` |
| `Hindi/` | `CustomerController.php` |
| `Japanese/` | `CustomerController.php` |
| `Portuguese/` | `CustomerController.php` |
| `Spanish/` | `CustomerController.php` |

## Flow

1. User lands via email link or Branch.io deep link
2. `B2CController` detects language and sets up session
3. `LoadingController` (English) captures UTM params (source, medium, campaign, coupon)
4. Language-specific `CustomerController` handles email capture, verification, program selection, and checkout
5. India users route through `RazorpayBillingController` for subscription-based payment
