---
title: tm.orderfee
slug: db/tmorderfee
createdAt: 2023-12-14T14:12:37.747Z
---

Order fees can be defined to automatically add fees to an order in certain conditions. For example a fee for payment handling based on the payment method, or a fee for a specific delivery scenario.

## Fields

| FIELD        | TYPE           | DESCRIPTION                                                                                                                                       |
| ------------ | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| id           | `int`          | Unique ID                                                                                                                                         |
| name         | `mlstring`     | Name for the order fee                                                                                                                            |
| typeid       | `int`          | Type of the order fee. Can be Automatic (2401), Script (2402) or Manual (2403)<br />**References:** [tm.systemtype](docId\:YVf7OQ_iruf6NpUOHG2XQ) |
| rule         | `OrderfeeRule` | Definition of the rule that defines when the order fee will be applied                                                                            |
| createdts    | `timestamp`    | Created timestamp                                                                                                                                 |
| lastupdatets | `timestamp`    | Last updated timestamp                                                                                                                            |
| isarchived   | `bool`         | Whether or not this item is archived                                                                                                              |
| archivedts   | `timestamp`    | Archived timestamp                                                                                                                                |

