> ## 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.

# Pay DARF (v2)

> Generate a DARF payment using the v2 endpoint



## OpenAPI

````yaml api-reference/banking-api/openapi.json POST /banking/cashout/darf/pay/v2
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/cashout/darf/pay/v2:
    post:
      tags:
        - cashout
      summary: Pay DARF v2
      description: Generate a pay DARF v2
      operationId: >-
        TrioFoundationWeb.Banking.Cashout.TaxManual.TaxManualController.generate_v2
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Generate_V2_Darf_create_params'
        description: DARF V2 payload
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Generate_V2_Darf_Response'
          description: Created
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonErrorResponse'
          description: Unprocessable Entity
        '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
    Generate_V2_Darf_create_params:
      description: Body params to generate a DARF V2
      example:
        accumulated_revenue_amount: 100
        amount: 100
        assessment_date: '2026-01-01'
        authentication_date: '2026-01-01'
        description: Consectetur esse sed irure incididunt est culpa nostrud.
        due_date: '2026-01-01'
        external_id: 5b760495-cb55-4043-95e8-0cff5776b014
        federal_revenue_id: '05964110000197'
        fine_amount: 10
        interest_amount: 5
        name: John Doe
        percentage: 2
        phone: '+5541999381724'
        reference_number: 123456789
        tax_number: '05964110000197'
        virtual_account_id: 1a760495-cb95-4023-96e8-0cff5776b010
      properties:
        accumulated_revenue_amount:
          description: Accumulated revenue amount
          type: integer
        amount:
          description: Amount
          type: integer
        assessment_date:
          description: Assessment date
          type: string
        authentication_date:
          description: Authentication date
          type: string
        description:
          description: Description of the DARF
          nullable: true
          type: string
        due_date:
          description: Due date
          type: string
        external_id:
          description: External ID of the DARF for reference
          nullable: true
          type: string
        federal_revenue_id:
          description: Federal revenue ID
          type: string
        fine_amount:
          description: Fine amount
          type: integer
        interest_amount:
          description: Interest amount
          type: integer
        name:
          description: Name
          type: string
        percentage:
          description: Percentage
          type: integer
        phone:
          description: Phone number
          type: string
        reference_number:
          description: Reference number
          nullable: true
          type: integer
        tax_number:
          description: Tax number
          type: string
        virtual_account_id:
          $ref: '#/components/schemas/UUID'
      required:
        - virtual_account_id
        - tax_number
        - name
        - federal_revenue_id
        - amount
        - fine_amount
        - interest_amount
        - percentage
        - assessment_date
        - due_date
        - authentication_date
        - phone
        - accumulated_revenue_amount
      title: Generate_V2_Darf_create_params
      type: object
    Generate_V2_Darf_Response:
      description: Response schema for a single DARF V2 generation
      example:
        data:
          payment_document_id: 1a760495-cb95-4023-96e8-0cff5776b010
      properties:
        data:
          properties:
            payment_document_id:
              $ref: '#/components/schemas/UUID'
          type: object
      title: Generate_V2_Darf_Response
      type: object
    JsonErrorResponse:
      properties:
        errors:
          items:
            properties:
              detail:
                example: null value where string expected
                type: string
              source:
                properties:
                  pointer:
                    example: /data/attributes/petName
                    type: string
                required:
                  - pointer
                type: object
              title:
                example: Invalid value
                type: string
            required:
              - title
              - source
              - detail
            type: object
          type: array
      required:
        - errors
      title: JsonErrorResponse
      type: object
    UUID:
      description: Unique identifier
      format: uuid
      title: UUID
      type: string
  securitySchemes:
    basic:
      scheme: basic
      type: http

````