This article presents a sample flow you can support. You aren't limited to this exact flow, but it can be a helpful jumping off point as you plan your Additional Fees integration.
This flow shows what happens when a site visitor views their cart or proceeds through checkout and additional fees need to be calculated.
A site visitor adds products to their cart and views the cart page, or clicks to begin checkout. This triggers Wix to calculate all fees and costs for the transaction.
Wix calls your Calculate Additional Fees method. The request includes:
Your service plugin processes the request based on your business logic:
For example, you might:
Your implementation returns within 3 seconds with an array of calculated fees. Each fee includes:
code: Unique identifier for the fee typename: Display name shown to the site visitorprice: Fee amount in the site's currencytaxDetails: Whether the fee is taxablelineItemIds (optional): Specific items the fee applies toExample response:
Wix displays each additional fee as a separate line item on the cart or checkout page. The site visitor can review:
If the site visitor makes changes (such as updating quantities, changing the shipping address, or applying a coupon), Wix calls your implementation again with the updated information to recalculate fees.
When the site visitor completes their purchase, the additional fees you calculated are included in the final order. The fees appear in: