Pricing Calculation
Price Per Property Unit
With Dates (Nightly Rates)
When check-in/check-out dates are provided, prices come from live nightly rates:
for each night in [checkIn, checkOut):
baseRate = channelRate[propertyId][date].rate
preTax = (baseRate + extraGuestCharge) * units
taxed = preTax + GST(baseRate, preTax)
total += taxed
Without Dates (Static Price)
When no dates are provided, the property's static base price is used:
preTax = (basePrice + extraGuestCharge) * units
total = preTax + GST(basePrice, preTax)
Tax Calculation (India GST)
| Nightly Room Rate | GST Rate |
|---|---|
| > ₹7,999 | 18% |
| ≤ ₹7,999 | 5% |
Example:
- Nightly rate: ₹8,500 → 18% slab
- Pre-tax with extras: ₹9,000
- Tax: round(9,000 × 0.18) = ₹1,620
- Total: ₹10,620
Offer Resolution Chain
Offers are applied in a specific order. Each step feeds into the next:
Baseline (No Cancellation Plan)
selectedPrice
→ apply best promotion (highest discount amount)
→ priceAfterPromotion
→ apply best bank offer on priceAfterPromotion
→ baselineFinalPrice
Per Cancellation Plan
Each plan gets its own independently computed chain:
selectedPrice
→ apply plan discount (PERCENTAGE, FLAT, or FREE_NIGHTS)
→ priceAfterPlanDiscount
→ re-evaluate promotions on lower price
→ priceAfterPromotion
→ re-evaluate bank offers on even lower price
→ finalPrice
→ totalSaving = selectedPrice - finalPrice
Plans are sorted: most flexible first, then by totalSaving descending.
Discount Types
| Type | Formula | Cap |
|---|---|---|
| PERCENTAGE | round(price × percentage / 100) | maximumDiscountAllowed |
| FLAT | min(discountAmount, price) | — |
| FREE_NIGHTS | round(price × freeNights / nights) | maximumDiscountAllowed |
| BUY_X_GET_Y | Same as FREE_NIGHTS | Guarded by minimumNights |
Offer Eligibility Rules
A promotion/bank offer must pass ALL these checks:
- Status =
ACTIVE nowis betweenstartDateTimeandendDateTimeusageCount<maximumUsageLimitprice≥minimumBookingAmountnightsbetweenminimumNightsandmaximumNights- No overlap with
blackoutDates checkInnot incheckinBlackoutDates- Stay within
stayStartDate/stayEndDate - Type-specific: EARLY_BOOKER (days ahead), LAST_MINUTE (hours ahead), WEEKEND/WEEKDAY
Traffic Context Pricing Adjustment
When a pricing rule matches the visitor's traffic context:
adjustedPrice = round(selectedPrice × additionalMultiplier)
promotions = filter by allowedPromotionIds (or disable entirely)
bankOffers = filter by allowedBankOfferIds (or disable entirely)
→ resolveBaseline with filtered offers on adjusted price
See Dynamic Pricing for rule configuration.