Contact support

Reference

Handle additionalCosts

Learn how the additionalCosts field handles dynamic extra charges (like delivery or service fees) and how to process them.

Topic
Orders & delivery
Last reviewed

The field additionalCosts in MERGEPORT orders contains extra charges applied by the ordering platform.

Understanding Dynamic Cost Fields

The field additionalCosts is not a predefined enum. The values are free-text and depend entirely on the respective provider (e.g. Wolt, Lieferando, Uber Eats, Foodora).

This means:

  • There is no fixed list of possible values.
  • New values can appear at any time.
  • Naming conventions may vary between platforms.

Example Values

Here are some examples of additionalCosts names observed so far:

  • Delivery
  • Service Fee
  • Extra Distance
  • Discount Delivery
  • Minimum Order Surcharge
  • Campaign Surcharge
  • Priority Delivery Fee

To ensure a robust integration, your POS or backend should:

1. Handle Known Values Explicitly

If required for UI or business logic, you may map known values:

  • Delivery → delivery fee
  • Service Fee → service charge

2. Support Unknown Values Gracefully

Do not assume that all values are known. Your system should:

  • Still display or process unknown values.
  • Not fail or ignore them.
  • Treat them as generic additional costs.

We recommend adding a normalization layer, for example:

  • Remove underscores (e.g., service_feeService Fee)
  • Convert camelCase to readable text (e.g., serviceFeeService Fee)
  • Map similar values to a unified category

Best Practice

  • Do not hardcode a fixed list of values.
  • Always process all entries in additionalCosts.
  • Keep your implementation flexible and forward-compatible.