# Calculation on client & intake on Upvest side Upvest allows clients to trigger the collection of fees that they have calculated on their side. This method is useful if your fee calculation logic is more complex or if you want to keep the fee calculation logic on your side. ## Prerequisites The following requirements apply: - In order to use the fee collection function, Upvest must activate the corresponding API endpoints for you. - The user must have an active account group and an account. You can find out more about creating accounts and account groups [here](/products/tol/guides/accounts/accounts_implementation). ## Implementation steps Take the following steps to introduce this method of fee charging: Communication with Upvest Let Upvest know your desired fee structure. Even if the logic of charging fees is on your side, it is important that Upvest knows what fee you are charging and what components the fee consists of. In some of the cases, the transaction portion of the fee can later be used to reduce the user's tax burden. Define the fee collection method To collect the fees, Upvest will issue a sell order by default to cover the fees. For more details, see ['Sell-to-cover order'](/products/tol/guides/fees/fees_sell_to_cover) below. Further fee collection options can be implemented after consultation with Upvest. Trigger a fee collection For each fee collection you want to initiate, you can use the `/fees/collections` endpoint. See ['Create a Fee Collection'](/products/tol/guides/fees/fees_collection). Please note that you can only initiate a fee collection procedure for accounts that are **not in `PENDING_APPROVAL` or `CLOSED` status**. If the account is in one of these statuses, a `Bad Request` response code will be returned. Otherwise, you will receive a fee collection object with the fee collection ID in the response. You will receive an event `FEE_COLLECTION.CREATED`. Upvest starts fee collection process After receiving a fee collection request, Upvest initiates the collection process. If the selected collection strategy is ‘Sell-to-cover’, Upvest triggers the sell orders to collect the money. Orders that are created to cover fees can be recognised by the `initiation_flow` value in the order event `SELL_TO_COVER_FEES`. Fee intake finalised The fee collection is finalised after the sales order has been settled. You receive an event `FEE_COLLECTION.FINALISED`. All cash remaining from the sales orders that is not used for fees is available for withdrawal.