> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: calculateServiceFees(order: Order, options: CalculateServiceFeesOptions) # Method package: wixRestaurantsV2 # Method menu location: wixRestaurantsV2 --> serviceFees --> calculateServiceFees # Method Link: https://dev.wix.com/docs/velo/apis/wix-restaurants-v2/service-fees/calculate-service-fees.md # Method Description: The `calculateServiceFees()` function returns a Promise that resolves to an array containing the calculated fees. The specified order information is evaluated against all rules created for the site. If the rule conditions are met, the service fee set in the rule is applied. Otherwise, no service fee is added. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## calculateServiceFees example ```javascript import { serviceFees } from 'wix-restaurants.v2'; async function calculateServiceFees(order, options) { try { const result = await serviceFees.calculateServiceFees(order, options); return result; } catch (error) { console.error(error); // Handle the error } } ``` ## calculateServiceFees example for exporting from backend code ```javascript import { serviceFees } from 'wix-restaurants.v2'; import { webMethod, Permissions } from 'wix-web-module'; export const calculateServiceFees = webMethod( Permissions.Anyone, async (order, options) => { try { const result = await serviceFees.calculateServiceFees(order, options); return result; } catch (error) { console.error(error); // Handle the error } } ); ``` ---