Skip to main content

Access & Budget

To grant access & budget to an employee, you can do so via the Set Access Endpoint. You can control if a module is available to the employee via the allowedModules field. To further restrict access to a module, we allow to override the Default Tax Rules by adding a Template to the FlexEmployeeAccessDetails.

Tax Rules

Basics

Tax rules determine the budget available to the employee for each submodule, as well as some additional settings for the Meals and Mobility module.
class FlexBaseTaxRule {
    module: FlexModuleType // Meals, Health ... ;
    budgets?: Array<FlexTaxRuleBudget> | null;
}

class FlexTaxRuleBudget {
    interval!: FlexBudgetInterval // Day, Month, Year;
    budget!: MonetaryAmountInput;
}
When granting access to flex, the tax rules applied for all available benefits are determined by the system via the TaxAffiliation of the company associated with the Employee. These tax rules are maintained by become1 and kept up to date.

Orverride default tax rules (Templates)

If you want to override the default tax rules, Templates come into play. You can create a Template with the Create Flex Template Endpoint
Templates are Immutable and can not be updated.
This template can then be appended to the Set Access Endpoint.
The custom and default rules get merged.

If you define a custom tax rule for the internet module, but allow internet and meals, the custom rule for meals will apply, as well as the default rule for meals.

All modules

As mentioned above, all modules allow the generic restriction of budgets for the Day, Month and Year Intervals.
class FlexBaseTaxRule {
    module: FlexModuleType // Meals, Health ... ;
    budgets?: Array<FlexTaxRuleBudget> | null;
}

class FlexTaxRuleBudget {
    interval!: FlexBudgetInterval // Day, Month, Year;
    budget!: MonetaryAmountInput;
}

Meals

Since the tax regulations for meals require to limit the days per month, the maxDaysPerMonth field is an addition to the MealsTaxRule.
class MealsTaxRule {
    module: "MEALS"
    budgets: Array<FlexTaxRuleBudget>;
    maxDaysPerMonth: number | null
}

Mobility

For mobility, it is possible to additionally specify isOnlyPublicTransportAllowed
class MealsTaxRule {
    module: "MOBILITY"
    budgets: Array<FlexTaxRuleBudget>;
    isOnlyPublicTransportAllowed: boolean | null
}

Example

POST /api/v2/flex-tax-rule-templates
Body
{
    "companyIds": ["4ac30a1c-edc8-48ad-9a4a-45ead3fec134"],
    "name" : "API_TEMPLATE_123",
    "rules" : [
        {
            "module" : "MOBILITY",
            "budgets" : [
                {
                    "interval" : "MONTH",
                    "budget" : {
                        "value" : 10000,
                        "currency" : "EUR_CENT"
                    }

                }
            ],
            "isOnlyPublicTransportAllowed" : true
        },
        {
            "module" : "MEALS",
            "budgets" : [
                {
                    "interval" : "MONTH",
                    "budget" : {
                        "value" : 10000,
                        "currency" : "EUR_CENT"
                    }

                },
                {
                    "interval" : "DAY",
                    "budget" : {
                        "value" : 2000,
                        "currency" : "EUR_CENT"
                    }

                }
            ],
            "maxDaysPerMonth" : 10
        },
        {
            "module" : "HOLIDAY",
            "budgets" : [
                {
                    "interval" : "YEAR",
                    "budget" : {
                        "value" : 25000,
                        "currency" : "EUR_CENT"
                    }

                }
            ]
        }
    ]
}

Resulting Template ID : “2ac30a1c-edc8-48ad-9a4a-45ead3fec132”
POST /api/v2/employees/{employeeId}/flex
Body
{
  "budget": {
    "value": 10000,
    "currency": "EUR_CENT"
  },
  "allowedModules": [
    "MEALS",
    "INTERNET",
    "MOBILITY",
    "HOLIDAY"
  ],
  "accumulateBudget": true,
  "flexTaxRuleTemplateId": "2ac30a1c-edc8-48ad-9a4a-45ead3fec132",
  "startDate": "2023-11-07T05:31:56Z",
  "endDate": "2023-11-07T05:31:56Z"
}

Completely overwrite flex access

By default, calling the Set Flex Access Endpoint will only overwrite the existing flex access for the period of the input. Example
Flex AccessstardDate & endDate
Existing Flex Acccess (E)Jan 2024 - Dec 2026
Input (I)Feb 2024 - Dec 2025
The resulting flex access settings would be:
Flex AccessstardDate & endDate
Existing Flex Acccess (E)Jan 2024 - Feb 2024
Input (I)Feb 2024 - Dec 2025
Existing Flex Acccess (E)Jan 2026 - Dec 2026
To prevent this, you can either send a request to the Revoke Flex Access Endpoint before or after the updating request to terminate all settings after the end date of the updated settings. Setting the validUntil to null in the updating request will also overwrite all future settings. Example
Flex AccessstardDate & endDate
Existing Flex Acccess (E)Jan 2024 - Dec 2026
Input (I)Feb 2024 - null
The resulting flex access settings would be:
Flex AccessstardDate & endDate
Existing Flex Acccess (E)Jan 2024 - Feb 2024
Input (I)Feb 2024 - null

Payroll Transactions

PayrollTransactions represent allocation of receipts to a specific month in the payroll. They can be retrieved via the Get Payroll Transactions Endpoint All payroll transactions are set to the first day of the month they occur in the payroll.
Meals and moblity - self proof documents are the exception.
Those have the payrollReferenceDate set to the respective day of occurence.