This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Calculates service fees for an order.
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.
Order information needed to evaluate the rules and calculate the relevant fees.
DEPRECATED. Defines the app that the rule is connected to.
Defines the app that the rule is connected to.
A list of calculated fees based on rules evaluation.
curl -X POST https://www.wixapis.com/service-fees-rules/v1/calculate \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH>' \
--data-raw '{
"order": {
"shippingInfo": {
"logistics": {
"type": "PICKUP"
}
},
"platform": {
"value": "SITE"
},
"priceSummary": {
"subtotal": "10"
},
"currency": "USD"
}
}'
{
"calculatedFees": [
{
"ruleId": "a71ec83c-a705-4da4-8e70-237b7d7b838d",
"name": "Rule 1",
"fee": {
"value": "10.00",
"currency": "EUR",
"formattedValue": null
},
"tax": null,
"taxGroupId": null
},
{
"ruleId": "bedea267-4b42-4727-b74a-9a8db48fd6db",
"name": "2",
"fee": {
"value": "23.00",
"currency": "EUR",
"formattedValue": null
},
"tax": null,
"taxGroupId": null
},
{
"ruleId": "d84423ac-f73d-44a9-9ffb-f36fb163dc6b",
"name": "service fee 1",
"fee": {
"value": "11.00",
"currency": "EUR",
"formattedValue": null
},
"tax": null,
"taxGroupId": null
}
]
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.