Per-property add-on pricing (M4f)
Add-on pricing lives in property_config.addon_pricing (JSON column,
migration 0026).
Shape
{ "early_checkin_usd": 75, "late_checkout": { "12:00": 100, "13:00": 150, "14:00": 200 }}Default seeded for all three properties:
- Early check-in: $75
- Late checkout: $100 / $150 / $200 (12pm / 1pm / 2pm)
Form display
src/routes/forms-pre-checkin.ts reads via getPropertyConfig:
const earlyPrice = earlyCheckinPrice(prop);const lateMinPrice = lateCheckoutMinPrice(prop); // for "from $X" copyconst lateMaxPrice = lateCheckoutMaxPrice(prop); // for Stripe authForm shows:
- Early check-in:
+$75 - Late check-out:
from $100with tiers listed
Stripe authorization
- Early check-in only selected: authorize
earlyPrice($75) - Late checkout only selected: authorize
lateMaxPrice($200) - Both: authorize
earlyPrice + lateMaxPrice($275)
Capture amount depends on the M4c/M4d decisions.
Editing prices
Currently via D1:
npx wrangler d1 execute stayonthesnow --remote --command="\ UPDATE property_config SET addon_pricing = '{...new JSON...}' \ WHERE property_id = 117485;"Future: /admin/property/{id} editor UI (not built yet).
Per-property differences
All three properties currently use the default. If Bill wants to
charge differently per unit (e.g., higher tiers at the more-premium
SS#702), update each property’s addon_pricing independently.
Source
- Migration:
migrations/0026_property_addon_pricing.sql - Type:
AddonPricinginsrc/lib/property-config.ts - Helpers:
earlyCheckinPrice,lateCheckoutMinPrice,lateCheckoutMaxPriceinsrc/routes/forms-pre-checkin.ts