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

# Preview jurisdiction tax amounts

> Computes disbursement IOF tax amounts using the active compiled jurisdiction profile without persisting data.



## OpenAPI

````yaml /pt/openapi/v3-current/lender.yaml post /api/v1/br/tax/preview
openapi: 3.1.0
info:
  contact:
    email: contact@lerian.studio
    name: Lerian Studio
    url: https://lerian.studio
  description: >-
    Code-first OpenAPI 3.1 surface for the Lender service. Routes that move
    money are at-most-once per X-Idempotency: when one answers 5xx, the
    X-Idempotency-Fenced response header says whether that key is now refusing
    resends (true) or free to retry (false or absent).
  license:
    name: Lerian Studio General License
  title: Lender API
  version: 1.0.0
servers:
  - url: https://lender.sandbox.lerian.net
security:
  - BearerAuth: []
tags:
  - description: >-
      Caller session projection: validated subject and effective permissions for
      the presented token.
    name: Session
  - description: >-
      Ledger accounting operations: journal entries and accrual postings for
      loan accounts.
    name: Accounting
  - description: >-
      Loan application intake and lifecycle: submission, decisioning, and
      status.
    name: LoanApplications
  - description: >-
      Loan product catalog: definition, versioning, and activation of lending
      products.
    name: LoanProducts
  - description: >-
      Loan account servicing operations: balances, schedules, and account-level
      actions.
    name: Loan Accounts
  - description: >-
      Portfolio dashboard read operations: aggregated portfolio and performance
      views.
    name: Dashboard
  - description: >-
      Jurisdiction registry: supported jurisdiction profiles and their
      capabilities.
    name: Jurisdictions
  - description: >-
      Jurisdiction-specific loan application operations (Brazil origination
      surface).
    name: Loan Applications
  - description: >-
      Tax computation operations for jurisdiction-specific lending (e.g. Brazil
      IOF).
    name: Tax
  - description: >-
      Brazil consignado privado operations: contract lifecycle, exclusion
      repair, and compensating adjustments.
    name: Consignado
  - description: >-
      Credit-instrument document template registry: versioned drafting and
      publication of CCB clausulado.
    name: DocumentTemplates
paths:
  /api/v1/br/tax/preview:
    post:
      tags:
        - Tax
      summary: Preview jurisdiction tax amounts
      description: >-
        Computes disbursement IOF tax amounts using the active compiled
        jurisdiction profile without persisting data.
      operationId: previewTax
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaxPreviewHumaBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaxPreviewEnvelopeResponse'
          description: OK
        '401':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Unauthorized
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Forbidden
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Unprocessable Entity
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Internal Server Error
        '503':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Service Unavailable
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Error
components:
  schemas:
    TaxPreviewHumaBody:
      additionalProperties: false
      properties:
        borrowerKind:
          description: >-
            Kind of taxpayer the credit is granted to. Brazil sets a different
            daily IOF aliquota per kind (Decreto 6.306/2007, art. 7, I, "b"), so
            the preview quotes the rate priced for the kind named here. The
            deployment ships pricing pessoaFisica, which is also what an omitted
            value previews; pessoaJuridica and any further kind (Simples
            Nacional, MEI) are priced by seeding a rate-table row, with no
            schema change, which is why this is not a closed list. A kind the
            deployment does not price is refused 422 LENDER-0900 rather than
            previewed at another kind's rate.
          examples:
            - pessoaFisica
          type: string
        disbursementDate:
          description: Disbursement date (RFC3339).
          examples:
            - '2026-06-14T12:00:00Z'
          format: date-time
          type: string
        finalDueDate:
          description: Final due date (RFC3339).
          examples:
            - '2026-06-14T12:00:00Z'
          format: date-time
          type: string
        firstDueDate:
          description: >-
            Day the first instalment falls due (RFC3339 or YYYY-MM-DD). Omit it
            and the ladder falls on the day the schedule generator strikes by
            itself, one month after the disbursement date clamped to the month's
            last day. Supply it and it becomes the ladder's anchor: the first
            period runs from the disbursement date to this day, longer or
            shorter than a month and charged by its real days, so the IOF quoted
            here moves with it. Ignored without requestedInstallments and
            requestedInterestRate, because there is no ladder to anchor.
          examples:
            - '2026-03-10'
          type: string
        grossAmount:
          description: >-
            Gross disbursement amount in major currency units (e.g.
            "100000.00").
          examples:
            - '100000.00'
          type: string
        jurisdictionCode:
          description: ISO 3166-1 alpha-2 jurisdiction code (e.g. "BR").
          examples:
            - BR
          maxLength: 2
          minLength: 2
          type: string
        loanProductVersionId:
          description: >-
            Loan product version whose admitted first-due-date window this quote
            should be bounded by. Optional: omit it and the quote prices
            whatever the arithmetic allows, which is what a quote made before a
            product is picked needs. Supply it together with firstDueDate,
            requestedInstallments and requestedInterestRate and the quote
            answers the same refusal booking will, rather than quoting a tax on
            a ladder the door will not take. The window is read only on a quote
            that strikes a ladder: without both ladder inputs there is no first
            due date to bound, so this version is not consulted and no window
            refusal can come back.
          examples:
            - 018f4e4e-7a3f-7c2e-9a1b-2c3d4e5f6071
          format: uuid
          type: string
        netDeliveredAmount:
          description: Optional net delivered amount in major currency units.
          examples:
            - '99949.66'
          type: string
        requestedInstallments:
          description: >-
            Number of monthly instalments the contract amortises over. Supply it
            together with requestedInterestRate and the quote is computed on the
            instalment ladder the schedule generator strikes, which is the
            ladder the disbursement door withholds against. Omit either and the
            quote values the operation as a single window from the disbursement
            date to the final due date, which is what a bullet operation is.
          examples:
            - 12
          format: int64
          maximum: 600
          minimum: 0
          type: integer
        requestedInterestRate:
          description: >-
            Monthly interest rate as a decimal FRACTION, not a percentage:
            "0.02" is 2% a month. Required together with requestedInstallments
            to quote on the instalment ladder.
          examples:
            - '0.02'
          type: string
        taxRegime:
          description: Tax regime selector understood by the jurisdiction tax engine.
          type: string
      required:
        - grossAmount
        - disbursementDate
        - finalDueDate
        - taxRegime
        - jurisdictionCode
      type: object
    TaxPreviewEnvelopeResponse:
      additionalProperties: false
      properties:
        data:
          $ref: '#/components/schemas/TaxPreviewResponse'
          description: >-
            The computed tax-preview result (IOF, PIS, COFINS, and net delivered
            amount) for the requested disbursement.
      required:
        - data
      type: object
    Detail:
      additionalProperties: true
      properties:
        code:
          description: >-
            Stable, machine-readable domain error code scoped to the emitting
            service (format: <SERVICE>-NNNN).
          type: string
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
        upstream:
          $ref: '#/components/schemas/Upstream'
          description: >-
            RFC 9457 extension member: the error a proxied third-party provider
            reported. Absent unless the emitting service explicitly surfaced
            one.
      type: object
    TaxPreviewResponse:
      additionalProperties: false
      properties:
        cofins:
          description: >-
            COFINS contribution amount, decimal string in major currency units
            (scale 2).
          examples:
            - '0.00'
          type: string
        grossAmount:
          description: >-
            Gross disbursement amount before tax, decimal string in major
            currency units (scale 2).
          examples:
            - '100000.00'
          type: string
        iofAdditional:
          description: >-
            Additional fixed-rate IOF component, decimal string in major
            currency units (scale 2).
          examples:
            - '38.00'
          type: string
        iofDaily:
          description: >-
            Daily IOF component, decimal string in major currency units (scale
            2).
          examples:
            - '12.34'
          type: string
        jurisdictionCode:
          description: ISO 3166-1 alpha-2 jurisdiction code (e.g. "BR").
          examples:
            - BR
          type: string
        netDeliveredAmount:
          description: >-
            Net amount delivered to the borrower after tax deduction, decimal
            string in major currency units (scale 2).
          examples:
            - '99949.66'
          type: string
        pis:
          description: >-
            PIS contribution amount, decimal string in major currency units
            (scale 2).
          examples:
            - '0.00'
          type: string
        profileVersion:
          description: >-
            Compiled jurisdiction profile version used to compute the preview
            (e.g. "1.0.0").
          examples:
            - 1.0.0
          type: string
        rateTableSnapshotId:
          description: >-
            Identifier of the rate-table snapshot whose rates produced these
            amounts.
          examples:
            - 550e8400-e29b-41d4-a716-446655440002
          type: string
        taxRegime:
          description: Tax regime selector applied by the jurisdiction tax engine.
          type: string
        totalIof:
          description: >-
            Sum of daily and additional IOF, decimal string in major currency
            units (scale 2).
          examples:
            - '50.34'
          type: string
        totalTax:
          description: >-
            Total tax (IOF + PIS + COFINS), decimal string in major currency
            units (scale 2).
          examples:
            - '50.34'
          type: string
      required:
        - iofDaily
        - iofAdditional
        - totalIof
        - pis
        - cofins
        - totalTax
        - grossAmount
        - netDeliveredAmount
        - taxRegime
        - jurisdictionCode
        - profileVersion
        - rateTableSnapshotId
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
    Upstream:
      additionalProperties: false
      properties:
        code:
          description: The upstream provider's own error code, verbatim.
          examples:
            - E4001
          type: string
        message:
          description: >-
            The upstream provider's own error message, verbatim (bounded, never
            its raw response body).
          examples:
            - account not found at provider
          type: string
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.