# Pricing `VERIFIED BOTH` (live 10% + `PricingEngine.php`) ## Purpose Set the **server-side LiteAPI `margin` percent** applied on rates. Overlay rules can replace the global percent per destination / hotel / agency. ## Who / permission `alya_hs_manage_pricing` / `alya_hs_edit_pricing`. Staff: **no** `VIEW_PRICING` (revoked). ## Where `#pricing` · WP `page=alya-hs-pricing` ## Screenshot ![Pricing](../screenshots/backoffice/05-pricing-01-rules.png) ## Fields observed - Marge globale: **10%** - Règles overlay: **0** - Banner: “Marge serveur. Bornes 0-100. Le moteur tarifs plafonne encore à 90 %. Pas de second markup WP.” - Form: Pourcentage, **Enregistrer la marge** (**not saved** this pass). - Nouvelle règle: Portée (Hôtel), Clé, Type %, Valeur, Priorité, Active, **Ajouter la règle**. ## Workflow Admin sets margin → `Settings::get_margin()` → `PricingEngine::apply_to_rates_body()` injects `margin` on rates calls. Client-supplied margin ignored. ## API Cockpit `PricingRest` (`/alya/v1/pricing/margin`, `/pricing/rules`). ## Data `alya_hs_pricing_rules`. Overlay **replaces** percent with rule `value` in current PHP. ## 13. Limitations UI says 0–100; engine still caps **90**. `default_commission` on agencies is **not** consumed by PricingEngine. `VERIFIED IN CODE` ## 14. Evidence status `VERIFIED BOTH` ## Related [pricing-markup-commission.md](../business/pricing-markup-commission.md)