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

# Create boleto

> Creates a boleto



## OpenAPI

````yaml api-reference/banking-api/openapi.json POST /banking/cashin/boletos
openapi: 3.0.0
info:
  title: Banking API
  version: 1.0.0
servers:
  - url: https://api.sandbox.trio.com.br
    variables: {}
  - url: https://api.qa.trio.com.br
    variables: {}
  - url: https://api.trio.com.br
    variables: {}
security: []
tags: []
paths:
  /banking/cashin/boletos:
    post:
      tags:
        - cashin
      summary: Create boleto
      description: Creates a new boleto
      operationId: TrioFoundationWeb.Banking.Cashin.BoletoController.create
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Boleto_create_params'
        description: Boleto payload
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Boleto_Response'
          description: Created
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401'
          description: Unauthorized
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/500'
          description: Internal server error
      callbacks: {}
      security:
        - {}
        - basic:
            - Base64encode(<client_id>:<client_secret>)
components:
  schemas:
    '401':
      example:
        error:
          error_code: UNAUTHORIZED
          error_message: Invalid credentials
      properties:
        error:
          properties:
            error_code:
              description: Error code
              type: string
            error_message:
              description: Error message
              type: string
          type: object
      title: '401'
      type: object
    '500':
      example:
        error:
          error_code: INTEGRATION_ERROR
          error_message: An unexpected issue occurred
      properties:
        error:
          properties:
            error_code:
              description: Error code
              type: string
            error_message:
              description: Error message
              type: string
          type: object
      title: '500'
      type: object
    Boleto_create_params:
      description: Body params to create a boleto
      example:
        amount: 402
        counterparty:
          address: Rua sem nome, 100
          city: Curitiba
          district: Centro
          name: NOME DO PARTICIPANTE
          postal_code: '83706160'
          state: PR
          tax_number: '05964110000197'
        description: Pago a trio.com.br
        due_detail:
          discount:
            fixed_until_due:
              amounts:
                - amount: 10
                  date: '2025-12-13'
                - amount: 9
                  date: '2025-12-14'
                - amount: 8
                  date: '2025-12-15'
              calculation_type: amount | percentage
            per_day_antecipated:
              amount: 10
              calculation_days: working | calendar
              calculation_type: amount | percentage
          due_date: '2025-12-16'
          fine:
            amount: 10
            calculation_type: amount | percentage
          interest:
            amount: 10
            calculation_type: daily_rate | monthly_fee | exempt | bank_control
        expiration_date: '2025-12-10'
        external_id: external id 123
        invoice_type: invoice
        virtual_account_id: 0196f83d-cafa-f412-1f1d-129cdf2dda49
        wallet_type: book_entry_electronic_bloquete
      properties:
        amount:
          description: Amount of the boleto
          type: integer
        counterparty:
          properties:
            address:
              maxLength: 40
              minLength: 1
              type: string
            city:
              maxLength: 20
              minLength: 1
              type: string
            district:
              maxLength: 20
              minLength: 1
              type: string
            name:
              maxLength: 40
              minLength: 3
              type: string
            postal_code:
              maxLength: 8
              minLength: 8
              pattern: ^[0-9]{8}$
              type: string
            state:
              description: >-
                Allowed values:
                ACALAPAMBACEDFESGOMAMTMSMGPAPBPRPEPIRJRNRSRORRSCSPSETO
              enum:
                - AC
                - AL
                - AP
                - AM
                - BA
                - CE
                - DF
                - ES
                - GO
                - MA
                - MT
                - MS
                - MG
                - PA
                - PB
                - PR
                - PE
                - PI
                - RJ
                - RN
                - RS
                - RO
                - RR
                - SC
                - SP
                - SE
                - TO
              type: string
            tax_number:
              description: Document must contain only digits with length between 11 and 14
              maxLength: 14
              minLength: 11
              pattern: ^[0-9]{11,14}$
              type: string
          required:
            - tax_number
            - name
            - address
            - district
            - city
            - state
            - postal_code
          type: object
        description:
          maxLength: 25
          nullable: true
          type: string
        due_detail:
          $ref: '#/components/schemas/Boleto_due_detail_params'
        expiration_date:
          format: date
          type: string
        external_id:
          description: External ID
          maxLength: 40
          nullable: true
          type: string
        invoice_type:
          $ref: '#/components/schemas/Boleto_invoice_type'
        notes:
          items:
            type: string
          maxLength: 3
          nullable: true
          type: array
        virtual_account_id:
          $ref: '#/components/schemas/UUID'
        wallet_type:
          $ref: '#/components/schemas/Boleto_wallet_type'
      required:
        - virtual_account_id
        - invoice_type
        - wallet_type
        - amount
        - expiration_date
        - counterparty
        - due_detail
      title: Boleto_create_params
      type: object
    Boleto_Response:
      description: Response for boleto
      example:
        data:
          amount: 10000
          barcode: '12341111222233334444555566667777888899990000'
          boleto_url: https://example.com/boleto_1
          description: description
          digitable_line: '12341111222233334444555566667777888899990000'
          due_detail:
            discount:
              fixed_until_due:
                amounts:
                  - amount: 10
                    date: '2024-08-13'
                  - amount: 9
                    date: '2024-08-14'
                  - amount: 8
                    date: '2024-08-15'
                calculation_type: amount
              per_day_antecipated:
                amount: 2
                calculation_days: working
                calculation_type: amount
            due_date: '2024-08-10'
            fine:
              amount: 10
              calculation_type: percentage
            interest:
              amount: 20
              calculation_type: daily_rate
          expiration_date: '2024-08-30T23:59:59.999999Z'
          external_id: 0190b2a4-8a3b-d123-050e-8d659ace1e2d
          id: 0196f83d-cafa-f412-1f1d-129cdf2dda49
          invoice_type: commercial_duplicate
          issue_date: '2024-07-24T10:00:00.000000Z'
          notes:
            - note 1
            - note 2
            - note 3
          status: confirmed
          virtual_account_id: 0196f83d-cafa-f412-1f1d-129cdf2dda49
          wallet_type: direct_electronic_partial_emission_booklet
      properties:
        data:
          $ref: '#/components/schemas/Boleto_Response_Params'
      title: Boleto_Response
      type: object
    Boleto_due_detail_params:
      description: Body params for boleto due detail
      example:
        discount:
          fixed_until_due:
            amounts:
              - amount: 10
                date: '2026-07-09'
              - amount: 10
                date: '2026-07-10'
              - amount: 10
                date: '2026-07-11'
            calculation_type: amount
          per_day_antecipated:
            amount: 10
            calculation_days: working
            calculation_type: amount
        due_date: '2026-07-12'
        fine:
          amount: 10
          calculation_type: percentage
        interest:
          amount: 10
          calculation_type: daily_rate
      nullable: true
      properties:
        discount:
          nullable: true
          properties:
            fixed_until_due:
              nullable: true
              properties:
                amounts:
                  items:
                    properties:
                      amount:
                        description: Discount amount fixed until due date of due detail
                        nullable: true
                        type: integer
                      date:
                        description: Discount date fixed until due date of due detail
                        format: date
                        nullable: true
                        type: string
                    required:
                      - amount
                      - date
                    type: object
                  type: array
                calculation_type:
                  $ref: >-
                    #/components/schemas/Boleto_due_detail_discount_calculation_type
              required:
                - calculation_type
                - amounts
              type: object
            per_day_antecipated:
              nullable: true
              properties:
                amount:
                  description: Discount amount per day antecipated of due detail
                  nullable: true
                  type: integer
                calculation_days:
                  $ref: >-
                    #/components/schemas/Boleto_due_detail_discount_calculation_days
                calculation_type:
                  $ref: >-
                    #/components/schemas/Boleto_due_detail_discount_calculation_type
              required:
                - amount
                - calculation_type
                - calculation_days
              type: object
          type: object
        due_date:
          description: Due date of the boleto
          format: date
          type: string
        fine:
          nullable: true
          properties:
            amount:
              description: Fine amount of the boleto due detail
              nullable: true
              type: integer
            calculation_type:
              $ref: '#/components/schemas/Boleto_due_detail_fine_calculation_type'
          required:
            - amount
            - calculation_type
          type: object
        interest:
          nullable: true
          properties:
            amount:
              description: Interest amount of the boleto due detail
              nullable: true
              type: integer
            calculation_type:
              $ref: >-
                #/components/schemas/Mora_interest_due_detail_interest_calculation_type
          required:
            - amount
            - calculation_type
          type: object
      required:
        - due_date
      title: Boleto_due_detail_params
      type: object
    Boleto_invoice_type:
      description: >-
        Boleto invoice type. See the [Invoice Type
        guide](/guides/boleto-types#invoice-type).
      enum:
        - commercial_duplicate
        - indicated_commercial_duplicate
        - service_duplicate
        - indicated_service_duplicate
        - rural_duplicate
        - bill_of_exchange
        - commercial_credit_note
        - export_credit_note
        - industrial_credit_note
        - rural_credit_note
        - promissory_note
        - rural_promissory_note
        - triplicate_commercial
        - triplicate_service
        - insurance_note
        - receipt
        - invoice
        - debit_note
        - insurance_policy
        - school_fee
        - consortium_installment
        - invoice_note
        - debt_document
        - rural_product_certificate
        - warrant
        - state_active_debt
        - municipal_active_debt
        - federal_active_debt
        - condominium_fee
        - credit_card
        - others
      nullable: true
      title: Boleto_invoice_type
      type: string
    UUID:
      description: Unique identifier
      format: uuid
      title: UUID
      type: string
    Boleto_wallet_type:
      description: >-
        Boleto wallet type. See the [Wallet Type
        guide](/guides/boleto-types#wallet-type).
      enum:
        - direct_electronic_partial_emission_booklet
        - book_entry_electronic_booklet
        - direct_electronic_with_emission_booklet
        - direct_electronic_no_emission_block_client
        - direct_electronic_no_emission_block_us
        - book_entry_electronic_bloquete
        - direct_electronic_no_emission_block_client2
        - direct_electronic_partial_emission_bloquete
        - direct_electronic_with_emission_bloquete
        - direct_electronic_no_emission_us_emission
        - direct_electronic_our_number_emission_banks_bloquete
        - direct_electronic_our_number_emission_banks_booklet
      title: Boleto_wallet_type
      type: string
    Boleto_Response_Params:
      description: Response Params for boleto
      example:
        data:
          amount: 10000
          barcode: '12341111222233334444555566667777888899990000'
          boleto_url: https://example.com/boleto_1
          description: description
          digitable_line: '12341111222233334444555566667777888899990000'
          due_detail:
            discount:
              fixed_until_due:
                amounts:
                  - amount: 10
                    date: '2024-08-13'
                  - amount: 9
                    date: '2024-08-14'
                  - amount: 8
                    date: '2024-08-15'
                calculation_type: amount
              per_day_antecipated:
                amount: 2
                calculation_days: working
                calculation_type: amount
            due_date: '2024-08-10'
            fine:
              amount: 10
              calculation_type: percentage
            interest:
              amount: 20
              calculation_type: daily_rate
          expiration_date: '2024-08-30T23:59:59.999999Z'
          external_id: 0190b2a4-8a3b-d123-050e-8d659ace1e2d
          id: 0196f83d-cafa-f412-1f1d-129cdf2dda49
          issue_date: '2024-07-24T10:00:00.000000Z'
          notes:
            - note 1
            - note 2
            - note 3
          status: confirmed
          virtual_account_id: 0196f83d-cafa-f412-1f1d-129cdf2dda49
      properties:
        amount:
          description: Amount of the boleto
          type: integer
        barcode:
          description: Barcode of the boleto
          type: string
        boleto_url:
          description: URL of the boleto
          type: string
        description:
          description: Description of the boleto
          type: string
        digitable_line:
          description: Digitable line of the boleto
          type: string
        due_detail:
          properties:
            discount:
              properties:
                fixed_until_due:
                  properties:
                    amounts:
                      items:
                        properties:
                          amount:
                            description: Amount of the discount
                            type: integer
                          date:
                            description: Date of the discount
                            type: string
                        type: object
                      type: array
                    calculation_type:
                      description: Calculation type of the discount
                      type: string
                  type: object
                per_day_antecipated:
                  properties:
                    amount:
                      description: Amount of the discount
                      type: integer
                    calculation_days:
                      description: Calculation days of the discount
                      type: string
                    calculation_type:
                      description: Calculation type of the discount
                      type: string
                  type: object
              type: object
            due_date:
              description: Due date of the DueDetail
              type: string
            fine:
              properties:
                amount:
                  description: Amount of the fine
                  type: integer
                calculation_type:
                  description: Calculation type of the fine
                  type: string
              type: object
            interest:
              properties:
                amount:
                  description: Amount of the interest
                  type: integer
                calculation_type:
                  description: Calculation type of the interest
                  type: string
              type: object
          type: object
        expiration_date:
          description: Expiration date of the boleto
          type: string
        external_id:
          description: External ID of the boleto
          type: string
        id:
          description: ID of the boleto
          type: string
        invoice_type:
          description: Invoice type of the boleto
          type: string
        issue_date:
          description: Issue date of the boleto
          type: string
        notes:
          items:
            type: string
          type: array
        status:
          description: Status of the boleto
          type: string
        virtual_account_id:
          description: Virtual account ID of the boleto
          type: string
        wallet_type:
          description: Wallet type of the boleto
          type: string
      title: Boleto_Response_Params
      type: object
    Boleto_due_detail_discount_calculation_type:
      description: Discount calculation type of boleto with due detail
      items:
        enum:
          - amount
          - percentage
        type: string
      nullable: true
      title: Boleto_due_detail_discount_calculation_type
      type: string
    Boleto_due_detail_discount_calculation_days:
      description: Discount calculation days of boleto with due detail
      items:
        enum:
          - calendar
          - working
        type: string
      nullable: true
      title: Boleto_due_detail_discount_calculation_days
      type: string
    Boleto_due_detail_fine_calculation_type:
      description: Fine calculation type of boleto with due detail
      items:
        enum:
          - amount
          - percentage
        type: string
      nullable: true
      title: Boleto_due_detail_fine_calculation_type
      type: string
    Mora_interest_due_detail_interest_calculation_type:
      description: Mora interest calculation type of boleto with due detail
      items:
        enum:
          - daily_rate
          - monthly_fee
          - exempt
          - bank_control
        type: string
      nullable: true
      title: Mora_interest_due_detail_interest_calculation_type
      type: string
  securitySchemes:
    basic:
      scheme: basic
      type: http

````