Skip to main content

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 RateGST Rate
> ₹7,99918%
≤ ₹7,9995%

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

TypeFormulaCap
PERCENTAGEround(price × percentage / 100)maximumDiscountAllowed
FLATmin(discountAmount, price)
FREE_NIGHTSround(price × freeNights / nights)maximumDiscountAllowed
BUY_X_GET_YSame as FREE_NIGHTSGuarded by minimumNights

Offer Eligibility Rules

A promotion/bank offer must pass ALL these checks:

  1. Status = ACTIVE
  2. now is between startDateTime and endDateTime
  3. usageCount < maximumUsageLimit
  4. priceminimumBookingAmount
  5. nights between minimumNights and maximumNights
  6. No overlap with blackoutDates
  7. checkIn not in checkinBlackoutDates
  8. Stay within stayStartDate / stayEndDate
  9. 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.