---
updatedAt: 2026-07-17T18:00:07.000Z
---

Fetch the complete documentation index at: https://developers.pismo.io/pismo-docs/llms.txt. Use this file to discover all available pages before exploring further.

# Get fee model

Get a fee model given its ID in the path.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Platform setup - Rates and fees",
    "description": "Rates and fees API endpoint documentation.",
    "contact": {
      "name": "API Support",
      "url": "https://developers.pismo.io/support/"
    },
    "license": {
      "name": "Copyright Pismo"
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://sandbox.pismolabs.io/rates",
      "description": "Sandbox API server for testing"
    }
  ],
  "tags": [
    {
      "name": "Fee models",
      "description": "Fee model endpoints."
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "components": {
    "parameters": {
      "AuthNoAccount": {
        "name": "Authorization",
        "in": "header",
        "schema": {
          "type": "string"
        },
        "required": true,
        "description": "Access token, not an account-specific token. Tokens can expire quickly, which can result in an <b>401 Unauthorized</b> message\n"
      },
      "ModelIDpath": {
        "name": "model_id",
        "in": "path",
        "schema": {
          "type": "string"
        },
        "description": "Fee model ID",
        "required": true
      },
      "WithAttachmentsResumequery": {
        "in": "query",
        "name": "withAttachmentsResume",
        "description": "Allows you to add information relating to model attachments to the query result",
        "required": false,
        "schema": {
          "type": "boolean",
          "default": false
        }
      }
    },
    "schemas": {
      "AdditionalFee": {
        "type": "object",
        "required": [
          "calculation",
          "id",
          "description",
          "type"
        ],
        "properties": {
          "description": {
            "type": "string",
            "description": "Fee description.",
            "example": "Foreign currency surchange."
          },
          "type": {
            "description": "Fee type, represents the fee classification, and is linked with the `id` field.",
            "type": "string",
            "example": "sellos"
          },
          "id": {
            "$ref": "#/components/schemas/FeeID"
          },
          "calculation": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/FeeCalculationFixed"
              },
              {
                "$ref": "#/components/schemas/FeeCalculationGreater"
              },
              {
                "$ref": "#/components/schemas/FeeCalculationPercentage"
              }
            ]
          }
        }
      },
      "BadRequestError": {
        "type": "object",
        "properties": {
          "error_code": {
            "type": "string",
            "description": "Error code ID",
            "example": "RCAPI-INVALID-REQUEST-PAYLOAD"
          },
          "message": {
            "type": "string",
            "description": "Error description",
            "example": "The request payload is invalid"
          }
        }
      },
      "CalculationMethodSubset": {
        "type": "string",
        "description": "Calculation method.",
        "enum": [
          "FIXED",
          "PERCENTAGE"
        ],
        "example": "FIXED"
      },
      "DayCountMethod": {
        "type": "string",
        "description": "Day count convention used to calculate interest",
        "example": "MONTH_30_YEAR_360",
        "enum": [
          "MONTH_30_YEAR_360",
          "MONTH_ACTUAL_YEAR_365"
        ]
      },
      "Error": {
        "type": "object",
        "properties": {
          "error_code": {
            "type": "string",
            "example": "RCAPI-DOMAIN-VIOLATION",
            "description": "Error code ID."
          },
          "message": {
            "type": "string",
            "example": "Internal server error",
            "description": "Error description."
          }
        }
      },
      "Fee": {
        "type": "object",
        "required": [
          "description",
          "id",
          "type",
          "calculation",
          "filters"
        ],
        "properties": {
          "description": {
            "type": "string",
            "description": "Fee description.",
            "minLength": 1,
            "maxLength": 255,
            "example": "Fee wdl"
          },
          "id": {
            "$ref": "#/components/schemas/FeeID"
          },
          "type": {
            "description": "Fee type, represents the fee classification, and is linked with the `id` field.\n",
            "type": "string",
            "example": "sellos"
          },
          "precedence": {
            "description": "Calculation order. All fees with the same precedence number are calculated in the same iteration. The next iteration uses the previous output as its calculation basis.\n",
            "type": "integer",
            "example": 0
          },
          "deduct_from_transaction_value": {
            "description": "Should fee be deducted from transaction value flag. Default=`false`.\n",
            "type": "boolean",
            "example": true
          },
          "calculation_basis": {
            "type": "string",
            "description": "* `PRINCIPAL_AMOUNT` - Taxes are applied to original transaction amount only. This is the default.\n* `CONTRACT_AMOUNT` -  Taxes are applied to original transaction amount plus fees.\n",
            "example": "PRINCIPAL_AMOUNT"
          },
          "calculation": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/FeeCalculationFixed"
              },
              {
                "$ref": "#/components/schemas/FeeCalculationGreater"
              },
              {
                "$ref": "#/components/schemas/FeeCalculationPercentage"
              },
              {
                "$ref": "#/components/schemas/FeeCalculationDailyPercentage"
              },
              {
                "$ref": "#/components/schemas/FeeCalculationCompoundInterest"
              },
              {
                "$ref": "#/components/schemas/FeeCalculationAccumulator"
              },
              {
                "$ref": "#/components/schemas/FeeCalculationDynamicByAmount"
              },
              {
                "$ref": "#/components/schemas/FeeCalculationPriceTable"
              },
              {
                "$ref": "#/components/schemas/FeeCalculationEqualInstallments"
              },
              {
                "$ref": "#/components/schemas/FeeCalculationAging"
              },
              {
                "$ref": "#/components/schemas/FeeCalculationIof"
              },
              {
                "$ref": "#/components/schemas/FeeCalculationConstantRepayment"
              }
            ]
          },
          "filters": {
            "$ref": "#/components/schemas/Filters"
          },
          "additional_fees": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdditionalFee"
            }
          }
        }
      },
      "FeeCalculationAccumulator": {
        "type": "object",
        "description": "Fee calculation for ACCUMULATOR model.",
        "required": [
          "calculation_method",
          "index",
          "identifier",
          "rules"
        ],
        "properties": {
          "calculation_method": {
            "type": "string",
            "description": "Calculation method - `ACCUMULATOR`.",
            "enum": [
              "ACCUMULATOR"
            ]
          },
          "index": {
            "type": "string",
            "description": "Field used to index the calculation.\n  `AMOUNT` - Fee is based on transaction totals.\n  `QUANTITY` - Fee is based on number of transactions.\n",
            "enum": [
              "AMOUNT",
              "QUANTITY"
            ],
            "example": "QUANTITY"
          },
          "identifier": {
            "type": "string",
            "description": "Accumulator configuration ID. Client-assigned and passed to the <a href=\"https://developers.pismo.io/pismo-docs/reference/post-v1-accumulator-config\" target=\"_blank\">Create accumulator configuration</a> endpoint.\n",
            "example": "ACC_CASH_OUT"
          },
          "rules": {
            "type": "array",
            "description": "Ranges and strategies",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/RuleRange"
                },
                {
                  "$ref": "#/components/schemas/RuleGreater"
                }
              ]
            }
          }
        }
      },
      "FeeCalculationDynamicByAmount": {
        "type": "object",
        "description": "Fee calculation for `DYNAMIC_BY_AMOUNT` model.",
        "required": [
          "calculation_method",
          "rules"
        ],
        "properties": {
          "calculation_method": {
            "type": "string",
            "description": "Calculation method - `DYNAMIC_BY_AMOUNT`.",
            "enum": [
              "DYNAMIC_BY_AMOUNT"
            ]
          },
          "rules": {
            "type": "array",
            "description": "Ranges and strategies",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/RuleRange"
                },
                {
                  "$ref": "#/components/schemas/RuleGreater"
                }
              ]
            }
          }
        }
      },
      "FeeCalculationAging": {
        "type": "object",
        "required": [
          "calculation_method",
          "rate"
        ],
        "properties": {
          "calculation_method": {
            "type": "string",
            "description": "Calculation method - `AGING`.",
            "enum": [
              "AGING"
            ]
          },
          "index": {
            "type": "string",
            "description": "Define range type when rate is dynamic.",
            "enum": [
              "DAY"
            ]
          },
          "rate": {
            "$ref": "#/components/schemas/Rate"
          }
        }
      },
      "FeeCalculationPriceTable": {
        "type": "object",
        "required": [
          "calculation_method",
          "fixed_iof_rate",
          "interest_rate",
          "daily_iof_rate"
        ],
        "properties": {
          "calculation_method": {
            "type": "string",
            "description": "Calculation method - `PRICE_TABLE`.",
            "enum": [
              "PRICE_TABLE"
            ]
          },
          "index": {
            "type": "string",
            "description": "Define range type when interest rate is dynamic.",
            "enum": [
              "INSTALLMENT"
            ]
          },
          "fixed": {
            "type": "number",
            "description": "Fixed fee amount as decimal field.",
            "example": 50
          },
          "percentage": {
            "type": "number",
            "description": "Percentage amount as decimal field.",
            "example": 1.3
          },
          "fixed_iof_rate": {
            "type": "number",
            "description": "Percentage amount as decimal field. IOF = Brazilian tax.",
            "example": 0.38
          },
          "daily_iof_rate": {
            "type": "number",
            "description": "Percentage amount as decimal field. IOF = Brazilian tax.",
            "example": 0.0082
          },
          "interest_rate": {
            "$ref": "#/components/schemas/InterestRate"
          }
        }
      },
      "FeeCalculationEqualInstallments": {
        "type": "object",
        "required": [
          "calculation_method",
          "interest_rate",
          "precedence",
          "fees",
          "calculation"
        ],
        "properties": {
          "calculation": {
            "type": "object",
            "properties": {
              "calculation_method": {
                "type": "string",
                "description": "Calculation method - `EQUAL_INSTALLMENTS`.",
                "enum": [
                  "EQUAL_INSTALLMENTS"
                ]
              },
              "day_count_method": {
                "$ref": "#/components/schemas/DayCountMethod"
              },
              "interest_rate": {
                "$ref": "#/components/schemas/InterestRateWithGracePeriod"
              },
              "fees": {
                "$ref": "#/components/schemas/fees"
              }
            }
          }
        }
      },
      "FeeCalculationCompoundInterest": {
        "type": "object",
        "required": [
          "calculation_method",
          "value",
          "days_range"
        ],
        "properties": {
          "calculation_method": {
            "type": "string",
            "description": "Calculation method - `COMPOUND_INTEREST`. Applied to loan-type products.",
            "enum": [
              "COMPOUND_INTEREST"
            ]
          },
          "value": {
            "type": "number",
            "description": "Percentage amount as decimal field.",
            "example": 1.3
          },
          "days_range": {
            "type": "integer",
            "description": "Calculation's range of days.\n\nFor example: 10% interest and `days_range` = 20 for $100 purchase; considering 10 days between purchase and cycle close, is applied 0.5% per day (10/20). In the first day, the value will be 0.5 (100 x 0.5%), in the second day the value will be 0.55 (100.05 x 0.5%), and so on.\n",
            "example": 30
          }
        }
      },
      "FeeCalculationDailyPercentage": {
        "type": "object",
        "required": [
          "calculation_method",
          "value"
        ],
        "properties": {
          "calculation_method": {
            "type": "string",
            "description": "Calculation method - `DAILY_PERCENTAGE`. Applied to credit card cash advances and other loan-type products.",
            "enum": [
              "DAILY_PERCENTAGE"
            ]
          },
          "value": {
            "type": "number",
            "description": "Percentage amount as decimal field.",
            "example": 1.3
          }
        }
      },
      "FeeCalculationFixed": {
        "type": "object",
        "required": [
          "calculation_method",
          "value"
        ],
        "properties": {
          "calculation_method": {
            "type": "string",
            "description": "Calculation method - `FIXED`",
            "enum": [
              "FIXED"
            ]
          },
          "value": {
            "type": "number",
            "description": "Fixed fee amount as decimal field.",
            "example": 2.5
          }
        }
      },
      "FeeCalculationIof": {
        "type": "object",
        "required": [
          "calculation_method",
          "value"
        ],
        "properties": {
          "calculation_method": {
            "type": "string",
            "description": "Calculation method - `IOF`.",
            "enum": [
              "IOF"
            ]
          },
          "value": {
            "type": "number",
            "description": "Percentage amount as decimal and used as base to calculate the fee amount.",
            "example": 100
          }
        }
      },
      "FeeCalculationGreater": {
        "type": "object",
        "required": [
          "calculation_method",
          "fixed",
          "percentage"
        ],
        "properties": {
          "calculation_method": {
            "type": "string",
            "description": "Calculation method - `GREATER`. Whichever value is greater - `fixed` or `percentage` is applied.",
            "enum": [
              "GREATER"
            ]
          },
          "fixed": {
            "type": "number",
            "description": "Fixed fee amount as decimal field.",
            "example": 50
          },
          "percentage": {
            "type": "number",
            "description": "Percentage amount as decimal field.",
            "example": 1.3
          }
        }
      },
      "FeeCalculationPercentage": {
        "type": "object",
        "required": [
          "calculation_method",
          "value"
        ],
        "properties": {
          "calculation_method": {
            "type": "string",
            "description": "Calculation method - `PERCENTAGE`.",
            "enum": [
              "PERCENTAGE"
            ]
          },
          "value": {
            "type": "number",
            "description": "Percentage amount as decimal field.",
            "example": 1.3
          }
        }
      },
      "FeeCalculationConstantRepayment": {
        "type": "object",
        "required": [
          "calculation_method",
          "day_count_method",
          "interest_rate"
        ],
        "properties": {
          "calculation_method": {
            "type": "string",
            "description": "Calculation method - `CONSTANT_REPAYMENT`",
            "enum": [
              "CONSTANT_REPAYMENT"
            ]
          },
          "day_count_method": {
            "$ref": "#/components/schemas/DayCountMethod"
          },
          "payment_postponement_rules": {
            "type": "object",
            "description": "Rules for payment postponement.",
            "properties": {
              "basis": {
                "type": "string",
                "description": "Postponement basis.",
                "enum": [
                  "PRINCIPAL",
                  "INTEREST"
                ],
                "example": "INTEREST"
              },
              "cycles": {
                "type": "string",
                "description": "Number of cycles to postpone.",
                "example": "1"
              }
            }
          },
          "interest_rate": {
            "$ref": "#/components/schemas/InterestRate"
          },
          "fees": {
            "type": "array",
            "description": "List of additional fees.",
            "items": {
              "type": "object",
              "required": [
                "calculation",
                "id",
                "precedence",
                "value",
                "calculation_basis"
              ],
              "properties": {
                "calculation": {
                  "type": "string",
                  "enum": [
                    "FIXED",
                    "PERCENTAGE",
                    "DAILY_PERCENTAGE"
                  ],
                  "example": "FIXED"
                },
                "id": {
                  "type": "string",
                  "example": "tax1"
                },
                "precedence": {
                  "type": "integer",
                  "example": 1
                },
                "value": {
                  "type": "number",
                  "example": 10
                },
                "calculation_basis": {
                  "type": "string",
                  "enum": [
                    "PRINCIPAL_AMOUNT",
                    "CONTRACT_AMOUNT"
                  ],
                  "example": "PRINCIPAL_AMOUNT"
                }
              }
            }
          }
        }
      },
      "FeeID": {
        "type": "string",
        "description": "Fee ID - a reference from transaction postings. The Pismo transaction team uses fee ID fields to make accounting entries. Talk to your Pismo representative about getting fee IDs for your operations.\n",
        "example": "sellos_baires"
      },
      "FeeModel": {
        "type": "object",
        "required": [
          "model_description",
          "fees"
        ],
        "properties": {
          "model_description": {
            "type": "string",
            "description": "Model description.",
            "minLength": 1,
            "maxLength": 255,
            "example": "Fee model applied to org"
          },
          "fees": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Fee"
            }
          }
        }
      },
      "Filters": {
        "type": "object",
        "required": [
          "processing_codes"
        ],
        "properties": {
          "processing_codes": {
            "type": "array",
            "example": [
              "02",
              "0040"
            ],
            "description": "Processing codes to apply the fee to.  Processing codes identify an operation, such as purchases or debits. Each financial operation within the platform has its processing code. Some you can configure, while others are fixed in the card network flow. Talk to your Pismo representative to get, or create, processing codes. For more information, see <a href=\"https://developers.pismo.io/pismo-docs/docs/processing-codes-and-transaction-types\" target=\"_blank\">Processing codes and transaction types</a>.\n",
            "items": {
              "type": "string"
            }
          },
          "operation_types": {
            "type": "array",
            "description": "Operation types to apply the fee to. If not specified, fees will be applied to all types.",
            "items": {
              "type": "string",
              "enum": [
                "authorization",
                "confirmation"
              ],
              "example": "authorization"
            }
          },
          "amount_range": {
            "type": "object",
            "description": "Optional amount range filter. When specified, the fee is applied only to operations whose amount falls within the given range. When the object is sent, only `minimum` is required; `maximum` remains optional. When two fees share at least one `processing_code`, their `amount_range` intervals must not overlap — a fee with no `maximum` is treated as unbounded above.",
            "required": [
              "minimum"
            ],
            "properties": {
              "minimum": {
                "type": "number",
                "format": "double",
                "description": "Minimum amount (inclusive) for the fee to be applied. BigDecimal value. Required when `amount_range` is provided.",
                "example": 10
              },
              "maximum": {
                "type": "number",
                "format": "double",
                "description": "Maximum amount (inclusive) for the fee to be applied. BigDecimal value. Optional — when present, must be greater than or equal to `minimum`.",
                "example": 1000
              }
            }
          },
          "merchant_category": {
            "type": "object",
            "description": "Optional merchant category filter. When specified, the fee is applied only to operations whose Merchant Category Code (MCC) matches the given include/exclude criteria. MCC is treated as an opaque string — no ISO 8583 validation is performed. Omitting the object, or leaving both lists empty, bypasses the filter. Server-side validation — `include` and `exclude` each must not contain duplicate MCC values, and the two lists must not share any MCC value; violations return HTTP 400.",
            "properties": {
              "include": {
                "type": "array",
                "description": "When non-empty, the fee is applied only if the request MCC is in this list. A request without an MCC does not match when `include` is populated.",
                "items": {
                  "type": "string"
                },
                "example": [
                  "7995",
                  "5411"
                ]
              },
              "exclude": {
                "type": "array",
                "description": "When non-empty, the fee is NOT applied if the request MCC is in this list.",
                "items": {
                  "type": "string"
                },
                "example": [
                  "9999"
                ]
              }
            }
          }
        }
      },
      "fees": {
        "type": "array",
        "description": "List of additional fees.",
        "items": {
          "type": "object",
          "required": [
            "calculation",
            "id",
            "precedence",
            "value",
            "calculation_basis"
          ],
          "properties": {
            "calculation": {
              "type": "string",
              "enum": [
                "FIXED",
                "PERCENTAGE",
                "DAILY_PERCENTAGE",
                "IOF"
              ],
              "example": "FIXED"
            },
            "id": {
              "type": "string",
              "example": "tax1"
            },
            "precedence": {
              "type": "integer",
              "example": 1
            },
            "value": {
              "type": "number",
              "example": 10
            },
            "calculation_basis": {
              "type": "string",
              "enum": [
                "PRINCIPAL_AMOUNT",
                "CONTRACT_AMOUNT"
              ],
              "example": "PRINCIPAL_AMOUNT"
            },
            "fixed_iof_rate": {
              "type": "number",
              "example": 3.5
            },
            "daily_iof_rate": {
              "type": "number",
              "example": 0.0082
            }
          }
        }
      },
      "InterestRateWithGracePeriod": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "Fee type:\n  `FIXED` - Field `value` is required and will be used as interest rate.\n  `DYNAMIC` - Field `rules` is required and the value used as interest rate will be selected according to the installment ranges configured.\n",
            "enum": [
              "FIXED",
              "DYNAMIC"
            ],
            "example": "FIXED"
          },
          "value": {
            "type": "number",
            "description": "Percentage amount as decimal field. Value used as interest rate. **REQUIRED** for `FIXED` type.",
            "example": 0.2
          },
          "grace_period": {
            "type": "object",
            "description": "Optional grace period before interest begins.\n\n**Only processed for the `EQUAL_INSTALLMENTS` calculation method.** Silently ignored for all other methods.\n",
            "required": [
              "type",
              "value"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "FIXED"
                ],
                "example": "FIXED"
              },
              "value": {
                "type": "number",
                "minimum": 0,
                "description": "Number of periods to skip before interest begins.",
                "example": 1
              }
            }
          },
          "rules": {
            "type": "array",
            "description": "Installment ranges responsible to configure the value used as interest rate. **REQUIRED** for `DYNAMIC` type.",
            "items": {
              "$ref": "#/components/schemas/InterestRateRule"
            }
          }
        }
      },
      "InterestRate": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "Fee type:\n  `FIXED` - Field `value` is required and will be used as interest rate. Field `grace_period` is optional.\n  `DYNAMIC` - Field `rules` is required and the value used as interest rate will be selected according to the installment ranges configured.\n",
            "enum": [
              "FIXED",
              "DYNAMIC"
            ],
            "example": "FIXED"
          },
          "value": {
            "type": "number",
            "description": "Percentage amount as decimal field. Value used as interest rate. **REQUIRED** for `FIXED` type.",
            "example": 0.2
          },
          "grace_period": {
            "type": "object",
            "description": "Optional grace period before interest begins. Only applicable when interest rate `type` is `FIXED`.\n\n**Only processed for the `EQUAL_INSTALLMENTS` calculation method.** Silently ignored for all other methods (e.g., `PRICE_TABLE`, `DAILY_PERCENTAGE`).\n",
            "required": [
              "type",
              "value"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "FIXED"
                ],
                "example": "FIXED"
              },
              "value": {
                "type": "number",
                "minimum": 0,
                "description": "Number of periods to skip before interest begins.",
                "example": 1
              }
            }
          },
          "rules": {
            "type": "array",
            "description": "Installment ranges responsible to configure the value used as interest rate. **REQUIRED** for `DYNAMIC` type.",
            "items": {
              "$ref": "#/components/schemas/InterestRateRule"
            }
          }
        }
      },
      "InterestRateRule": {
        "type": "object",
        "required": [
          "minimum",
          "maximum",
          "calculation"
        ],
        "properties": {
          "minimum": {
            "type": "number",
            "minimum": 1,
            "description": "First installment the rule is applied to. For example, if you enter \"4\", rule application begins on the 4th installment.\nMust be 1 or higher.\n",
            "example": 10
          },
          "maximum": {
            "type": "number",
            "maximum": 70,
            "description": "Last installment the rule is applied to. For example, if you enter \"10\", rule application ends after the 10th installment.\n",
            "example": 30
          },
          "calculation": {
            "$ref": "#/components/schemas/RuleCalculation"
          },
          "progression": {
            "$ref": "#/components/schemas/Progression"
          }
        }
      },
      "minimumRule": {
        "type": "number",
        "description": "First tranasction this rule is applied to. For example, if you enter \"4\", the rule starts being applied on the 4th transaction.\n",
        "example": 4
      },
      "maximumRule": {
        "type": "number",
        "description": "Last transaction the rule is applied to. For example, if you enter \"10\", rule application ends after the 10th transaction.\n",
        "example": 100
      },
      "NotFoundModelError": {
        "type": "object",
        "properties": {
          "error_code": {
            "type": "string",
            "description": "Error code ID",
            "example": "RCAPI-NOT_FOUND-VIOLATION"
          },
          "message": {
            "type": "string",
            "description": "Error description.",
            "example": "Model with the provided key does not exist"
          }
        }
      },
      "Progression": {
        "type": "object",
        "description": "Rate progression configuration.",
        "required": [
          "value",
          "steps"
        ],
        "properties": {
          "value": {
            "type": "number",
            "description": "Percentage amount as decimal field added to `rule.calculation.value` base value.",
            "example": 0.02
          },
          "steps": {
            "type": "integer",
            "description": "Frequency `value` is applied.",
            "example": 10
          }
        }
      },
      "Rate": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "Fee type:\n  `FIXED` - Field `value` is **REQUIRED** and used as rate.\n  `DYNAMIC` - Field `rules` is **REQUIRED** and the value used as rate is selected according to the day ranges configured.\n",
            "enum": [
              "FIXED",
              "DYNAMIC"
            ],
            "example": "FIXED"
          },
          "value": {
            "type": "number",
            "description": "Percentage amount as decimal field. Value is used as rate. **REQUIRED** for `FIXED` type.",
            "example": 0.2
          },
          "rules": {
            "type": "array",
            "description": "Ranges responsible to configure the value used as rate. **REQUIRED** for `DYNAMIC` type.",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/RateRuleRange"
                },
                {
                  "$ref": "#/components/schemas/RateRuleGreater"
                }
              ]
            }
          }
        }
      },
      "RateRuleRange": {
        "type": "object",
        "required": [
          "calculation",
          "minimum",
          "maximum"
        ],
        "properties": {
          "calculation": {
            "$ref": "#/components/schemas/RuleCalculation"
          },
          "minimum": {
            "$ref": "#/components/schemas/minimumRule"
          },
          "maximum": {
            "$ref": "#/components/schemas/maximumRule"
          },
          "progression": {
            "$ref": "#/components/schemas/Progression"
          }
        }
      },
      "RateRuleGreater": {
        "type": "object",
        "required": [
          "greater_than",
          "calculation"
        ],
        "properties": {
          "greater_than": {
            "type": "number",
            "description": "Rule is applied to numbers greater than this value.",
            "example": 10
          },
          "calculation": {
            "$ref": "#/components/schemas/RuleCalculation"
          },
          "progression": {
            "$ref": "#/components/schemas/Progression"
          }
        }
      },
      "RuleRange": {
        "type": "object",
        "required": [
          "calculation",
          "minimum",
          "maximum"
        ],
        "properties": {
          "calculation": {
            "$ref": "#/components/schemas/RuleCalculation"
          },
          "minimum": {
            "$ref": "#/components/schemas/minimumRule"
          },
          "maximum": {
            "$ref": "#/components/schemas/maximumRule"
          }
        }
      },
      "RuleGreater": {
        "type": "object",
        "required": [
          "greater_than",
          "calculation"
        ],
        "properties": {
          "greater_than": {
            "type": "number",
            "description": "Rule applies to numbers greater than this value. For example, if you enter \"4\", accumulation starts on the 5th transaction.",
            "example": 10
          },
          "calculation": {
            "$ref": "#/components/schemas/RuleCalculation"
          }
        }
      },
      "RuleCalculation": {
        "type": "object",
        "required": [
          "calculation_method",
          "value"
        ],
        "properties": {
          "calculation_method": {
            "$ref": "#/components/schemas/CalculationMethodSubset"
          },
          "value": {
            "type": "number",
            "description": "Value to be applied",
            "example": 0.04
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "responses": {
      "400BadRequestError": {
        "description": "Bad request",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/BadRequestError"
            }
          }
        }
      },
      "401Unauthorized": {
        "description": "InvalidToken",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "404ModelNotFound": {
        "description": "Fee model not found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/NotFoundModelError"
            }
          }
        }
      },
      "500InternalServerError": {
        "description": "Internal Server Error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  },
  "paths": {
    "/v1/fee/models/{model_id}": {
      "get": {
        "summary": "Get fee model",
        "description": "Get a fee model given its ID in the path.",
        "operationId": "getModel",
        "tags": [
          "Fee models"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ModelIDpath"
          },
          {
            "$ref": "#/components/parameters/AuthNoAccount"
          },
          {
            "$ref": "#/components/parameters/WithAttachmentsResumequery"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeeModel"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400BadRequestError"
          },
          "401": {
            "$ref": "#/components/responses/401Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/404ModelNotFound"
          },
          "500": {
            "$ref": "#/components/responses/500InternalServerError"
          }
        }
      }
    }
  }
}
```