Important: When developing websites or building apps with Blocks, use Velo service plugins.
As an additional fees calculation provider, you can integrate with Wix to allow merchants to request and use your services on their Wix sites. The additional fees you calculate are then included on the site's cart and checkout pages.
The integration is done via an app in the Wix App Market and by implementing the Additional Fees service plugin. After the app is installed on a site, Wix calls your service whenever the site needs to calculate additional fees for a transaction.
Using the service plugin, you can design your app to calculate various additional fees for the merchant's customers, including:
Learn more about service plugin extensions.
It's important to note that when Wix calls your implementation of the Calculate Additional Fees method, the app must return fees in the same currency as the Wix site. Extract the currency for a site from the request to ensure the correct currency is used in your calculation.
Wix calls your Calculate Additional Fees implementation in the following scenarios:
Each call includes comprehensive information about the cart, including line items, applied discounts, shipping details, and buyer information.
The additional fees you return are:
Site visitors see each fee with the name you provide, along with the fee amount.
Your implementation must respond within 3 seconds. If your service takes longer or returns an error:
To meet this requirement, consider:
Each request includes:
lineItems: Products in the cart with quantities, prices, and catalog referencesshippingAddress: Delivery address (useful for location-based fees)buyerDetails: Customer contact informationappliedDiscounts: All coupons and discounts applied to the cartshippingInfo: Selected shipping method and costspurchaseFlowId: Type of checkout flow (standard or express)subtotal: Cart total before fees, shipping, and taxUse this information to calculate fees based on your business logic. For example:
When returning fees, you can optionally specify which line items each fee applies to using the lineItemIds field. This is useful for:
If you don't specify lineItemIds, the fee applies to the entire order.