Corporate Direct Bookings
Company billing with integrated policy and budget evaluation
Corporate Direct Bookings
Corporate Direct is a special payment provider for business travel where the company is billed directly instead of the employee paying. It integrates with Rahal's policy and budget systems to enforce company travel rules.
How It Works
Unlike consumer payment providers, Corporate Direct:
- Bypasses payment processing — No card or wallet payment required
- Evaluates policies — Checks company travel policies before booking
- Enforces budgets — Reserves and tracks budget consumption
- Bills the company — Company receives an invoice for all employee bookings
Booking Flow
Policy Integration
Before a corporate direct order is created, the system evaluates the booking against the user's assigned policy.
Policy Actions
| Action | Behavior |
|---|---|
ALLOW | Booking proceeds without intervention |
WARN_AND_ALLOW | Booking proceeds, violation logged |
REQUIRE_APPROVAL | Creates a booking request instead |
BLOCK | Booking rejected with error message |
What Gets Checked
- Flights: Route rules, cabin class, duration tiers, budget limits
- Hotels: Location rules, star ratings, daily rate limits
Policy violations are logged even for allowed bookings. This data feeds into compliance reporting and analytics.
Blocking Behavior
If any item in the booking is blocked by policy, the entire order is rejected:
ForbiddenException: Booking blocked by company policy:
air item 1: Cabin class FIRST not allowed for this routeBudget Integration
After policy evaluation, the system checks the user's budget allocation.
Budget Reservation Flow
- Evaluation: Check if user has sufficient budget
- Reservation: Reserve budget amount when order is created
- Confirmation: Convert reserved → spent when order finalizes
- Release: Release reservation if order fails
Budget Enforcement Modes
| Mode | Order Creation | Behavior |
|---|---|---|
TRACK_ONLY | Allowed | Budget tracked but not enforced |
WARN | Allowed | Warning logged, user notified |
REQUIRE_APPROVAL | Blocked → Request | Creates booking request for approval |
BLOCK | Rejected | Order cannot be created |
Currency Conversion
If the booking currency differs from the budget currency, automatic conversion is applied:
Booking: 1,500,000 IQD
Budget Currency: USD
Converted: ~$1,150 USD (at current rate)Order Creation
When a corporate direct order is created, additional fields are populated:
| Field | Value |
|---|---|
companyId | User's company ID |
policyId | Applied policy ID (from first item) |
provider | CORPORATE_DIRECT |
paymentId | Same as order ID (no external payment) |
Violation Logging
Policy violations are logged for analytics and compliance:
{
userId: "user123",
companyId: "company456",
policyId: "policy789",
referenceType: "ORDER",
referenceId: "order_abc",
serviceType: "FLIGHT",
violations: [
{ rule: "cabin_class", message: "Business class not allowed" }
],
action: "WARN_AND_ALLOW"
}Budget violations are also logged:
{
companyId: "company456",
userId: "user123",
budgetId: "budget_xyz",
budgetPeriodId: "period_q1",
referenceType: "ORDER",
referenceId: "order_abc",
requestedAmount: 1500,
availableAmount: 1000,
currency: "USD",
enforcementMode: "WARN",
action: "ALLOWED"
}Error Handling
Policy Block Errors
ForbiddenException: Booking blocked by company policy:
[service type] item [index]: [violation messages]Budget Block Errors
ForbiddenException: Budget exceeded and booking is blockedProcessing Failures
If reservations fail after order creation:
- Budget reservation is released
- Order status set to
FAILED - Error event logged
Budget Timing Configuration
Companies can configure when budget is reserved via company budget settings:
| Setting | When Budget Reserved |
|---|---|
ON_REQUEST | When order/request is created |
ON_APPROVAL | When booking request is approved |
ON_CONFIRMATION | When reservations are confirmed |
For corporate direct bookings (no approval workflow), ON_REQUEST effectively reserves immediately.
Differences from Consumer Orders
| Aspect | Consumer Order | Corporate Direct |
|---|---|---|
| Payment | Required (card/wallet) | None |
| Policy Check | No | Yes |
| Budget Check | No | Yes |
| Company Link | No | Yes |
| Invoice | To user | To company |
| Approval Workflow | No | If policy requires |
Admin Visibility
Corporate direct orders are visible in the Travel Zone Dashboard with:
- Company name (if available)
- Policy reference
- Budget transaction history
- Full event audit trail
Filtering by provider: CORPORATE_DIRECT shows all corporate bookings.
Best Practices
For Administrators
- Monitor violations: Review policy violations regularly
- Check budget consumption: Track spend against budgets
- Review failed orders: Investigate failed corporate orders for patterns
For Finance Teams
- Invoice reconciliation: Match orders to company invoices
- Budget reports: Generate spend reports by user/department
- Refund tracking: Monitor refunds and credits