> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corebanq.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Calculate fee

> Calculate transaction fee



## OpenAPI

````yaml post /v1/tariffs/calculate-fee
openapi: 3.0.0
info:
  title: Tariffs API
  version: 1.0.0
  description: API for managing tariffs and fee calculations
servers: []
security:
  - bearerAuth: []
tags:
  - name: Tariffs
    description: Tariff management operations
  - name: Fee Ranges
    description: Fee range operations
  - name: Fee Calculation
    description: Fee calculation operations
  - name: Dictionaries
    description: Dictionary data operations
paths:
  /v1/tariffs/calculate-fee:
    post:
      tags:
        - Fee Calculation
      summary: Calculate fee
      description: Calculate transaction fee
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CalculateFeeRequest'
      responses:
        '200':
          description: Fee calculation result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CalculateFeeResponse'
components:
  schemas:
    CalculateFeeRequest:
      type: object
      required:
        - amount
        - asset
        - from_channel
        - to_channel
        - media
        - reference_id
      properties:
        tariff_id:
          type: string
          format: uuid
        customer_id:
          type: string
          format: uuid
        amount:
          type: number
          minimum: 0
        asset:
          type: string
        from_channel:
          type: string
        to_channel:
          type: string
        media:
          type: string
        reference_id:
          type: string
        commit:
          type: boolean
          default: false
    CalculateFeeResponse:
      type: object
      properties:
        tariff_id:
          type: string
          format: uuid
        tariff_name:
          type: string
        fee_range_id:
          type: string
          format: uuid
        fixed_fee:
          type: number
        percent_fee:
          type: number
        total_fee:
          type: number
        method:
          type: string
          enum:
            - fixed
            - percentage
            - greater
            - lesser
            - sum
        is_fallback:
          type: boolean
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````