Wix Functions: Adding Additional Fees at Checkout

7 min read
Charge additional fees based on information like orders, customer details, or shipping info. For example, apply an extra handling fee when customers purchase fragile products from your store. Once you set up and activate an additional fees function, it automatically reviews the input data to calculate the necessary fees. The fees are displayed at checkout and added to the customer's total.
The current additional fees templates include a fragile packaging fee, a payment form fee, and a transaction fee. This article gives you step-by-step instructions for setting up each template. You can also create a function from scratch and add your own custom logic.
Note:
We're continually rolling out Wix Functions and updating our template list with new options to suit your unique business needs.
A screenshot of building a fragile packaging fee in the function builder.
In this article, learn more about:

Fragile packaging fee

Apply a packaging fee when specific fragile items are added to the cart for extra shipping protection. This is useful for covering additional costs associated with safely packaging delicate items.

To build a fragile packaging fee function:

  1. Go to Functions in your site's dashboard.
  2. In the Function catalog, click Create Function under Additional fees.
  3. Select Fragile packaging fee and click Use Template
  4. In the function builder, click the Condition step to update its logic.
  5. Click 'Item Name' to update the condition to match your business needs (e.g., update the default product names to match the product names in your store).
Tip:
Click the Item Name property to change it. For example, you can set the condition to check 'Item ID' instead of the item name.
  1. Click Apply to save the condition.
  2. Click the Output step.
  3. Set the additional fee details including the fee amount (not including tax) and the name of the fee displayed at checkout.
  4. (Optional) Click the Collect tax toggle to make the additional fee taxable (this is calculated based on your site's tax settings).
  5. (Optional) Click + Add Fee to add another fee.
  6. Select your site's main currency from the drop-down.
    Note: The function will not work if the selected currency does not match your site currency.
  7. Click Apply to save the output.
A screenshot of the output of a fragile packaging fee function
  1. Give your function a name at the top left. This is only visible to you.
  2. Click Activate at the top right.
Once the function is activated, customers see the fragile packaging fee at checkout when the criteria of the function is met.
A screenshot of a fragile packaging fee function.

Payment form fee

Apply additional fees to any orders placed through Wix Forms on your site.
Important:
This template's condition includes the Wix Forms App ID, ensuring all payment forms on your site are checked. An App ID is a unique identifier for Wix apps (each has their own ID, including Wix Stores, Wix Bookings, etc). Do not remove the App ID, as it is essential for functionality. If deleted, you must restart the function.
An example of the App ID in Wix Forms function

To build a payment form fee function:

  1. Go to Functions in your site's dashboard.
  2. In the Function catalog, click Create Function under Additional fees.
  3. Select Payment form fee and click Use Template
  4. Click the Output step in the function builder.
  5. Set the fee details for all payment forms on your site including the amount and the name of the fee displayed at checkout.
  6. (Optional) Click the Collect tax toggle to make the additional fee taxable (calculated based on your site's tax settings).
  7. (Optional) Click + Add Fee to add another fee.
  8. Select your site's main currency from the drop-down.
    Note: The function will not work if the selected currency does not match your site currency.
  9. Click Apply to save the output.
A screenshot of the payment form fee in the function builder.
  1. Give your function a name at the top left. This is only visible to you.
  2. Click Activate at the top right.
Once the function is activated, customers see the payment form fee at checkout when they make a purchase through a form on your site.
A screenshot of a payment form fee at checkout.

Transaction fee

Create a function that charges customers a fixed transaction fee per order. Since this template does not include a condition, it means the transaction fee will apply to all orders made on your site.

To build a transaction fee function:

  1. Go to Functions in your site's dashboard.
  2. In the Function catalog, click Create Function under Additional fees.
  3. Select Transaction fee and click Use Template
  4. Set the additional fee details including the fee amount (not including tax) and the name of the transaction fee displayed at checkout.
  5. (Optional) Click the Collect tax toggle to make the additional fee taxable (calculated based on your site's tax settings).
  6. (Optional) Click + Add Fee to add additional fees.
  7. Select your site's main currency from the drop-down.
    Note: The function will not work if the selected currency does not match your site currency.
  8. Click Apply to save the output.
A screenshot of the output step of the transaction fee template.
  1. Give your function a name at the top left. This is only visible to you.
  2. Click Activate at the top right.
Once the function is activated, customers see a fixed transaction fee at checkout.
A screenshot of a transaction fee at checkout.

FAQs

Click a question below to learn more about building custom rewards for your loyalty program.

Did this help?

|