This article shares an example flow that could support a use case for the Service Fees API.
A site owner wishes to add a 5% service fee for pickup orders above $200 and all deliveries.
Use Create Rule to establish your rule:
name as "Delivery/large order fee". This name will be visible to customers.enabled to true.appId. For example, Restaurants Online Ordering's app ID is 9a5d83fd-8570-482e-81ab-cfa88942ee60.percentageFee to 5. This calculates 5% of the order's subtotal and applies it when the conditions are met.conditionType to "CONDITION_TREE".conditionTree to represent the following conditions:
Delivery type is "DELIVERY" 200 "PICKUP"Using the values from the list above, create the body for your Create Rule request. The resulting JSON will look something like this:
Use Calculate Service Fees to calculate all relevant service fees for a specific order.
When you call Calculate Service Fees:
You can use the response to apply any relevant fees to the customer's price total.