This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
This method retrieves additional fees calculated by your app.
Wix calls this method when certain actions are performed on the cart or checkout. For example, when an item is added to the cart or the amount of an item is updated in the checkout.
Notes:
Line items to calculate additional fees for.
Max: 300 items
Shipping address.
Information about the buyer, such as contact details.
Applied discounts.
Shipping information.
Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.
Additional fees calculated.
Currency of additional fees calculated. In three-letter currency code ISO-4217 alphabetic format.
The currency returned in the response object must match the wix site's currency or those fees will
be filtered out and not returned. Extract the currency
from the
request envelope
to ensure the correct currency is used in your calculation.
The data payload will include the following object as an encoded JWT. For the purposes of this example, we show the request and response objects decoded.
curl -X POST https://provider.example.com/v1/calculate-additional-fees \
-H 'user-agent: Wix' \
-H 'accept-encoding: gzip, deflate' \
-H 'content-type: text/plain; charset=utf-8' \
-d '{
"data": {
"request": {
"lineItems": [
{
"physicalProperties": {
"sku": "0043",
"shippable": true
},
"quantity": 1,
"price": "16.00",
"_id": "00000000-0000-0000-0000-000000000001",
"productName": "Set of bowls",
"catalogReference": {
"catalogItemId": "27ef9a44-74a6-a0dd-3e40-50c7d196f890",
"appId": "215238eb-22a5-4c36-9e7b-e7c08025e04e",
"options": {
"options": {},
"variantId": "00000000-0000-0000-0000-000000000000"
}
}
}
],
"shippingAddress": {
"addressLine1": "123 Turnover Way",
"city": "Boston",
"subdivision": "US-MA",
"country": "US",
"postalCode": "02108"
},
"buyerDetails": {
"contactDetails": {
"phone": "6175551905",
"email": "bowlbuyer@example.com"
}
},
"shippingInfo": {
"selectedCarrierServiceOption": {
"code": "5336e031-4421-fdb5-08fa-45b777dbc488",
"title": "Standard shipping",
"logistics": {
"deliveryTime": ""
},
"cost": {
"price": "3"
}
}
},
"ecomId": "41abc90a-c82d-4e33-bbea-7e3494bc6522"
}
}
}
{
"additionalFees": [
{
"code": "subscription-fee",
"name": "Subscription Fee",
"price": "5",
"taxDetails": {
"taxable": "true"
}
}
],
"currency": "USD"
}