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

# Generate a Recurrence

> Generate a recurrence



## OpenAPI

````yaml api-reference/banking-api/openapi.json POST /banking/cashin/pix/recurrences
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/pix/recurrences:
    post:
      tags:
        - Recurrences
      summary: Generate a recurrence
      description: Generate a recurrence
      operationId: TrioFoundationWeb.Banking.Cashin.RecurrenceController.generate
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateRecurrenceParameters'
        description: The recurrence generate attributes
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateRecurrenceResponse'
          description: Generate Recurrence Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonErrorResponse'
          description: Unprocessable Entity
      callbacks: {}
components:
  schemas:
    GenerateRecurrenceParameters:
      description: GenerateRecurrenceParameters
      example:
        amounts:
          minimum: 100
        contract_number: '123456789'
        counterparty:
          bank_account:
            branch: '1234'
            digit: '1'
            ispb: '12345678'
            number: '123456'
          name: John Doe
          tax_number: '05964110000197'
        description: Monthly payment for services
        external_id: external_id_123
        first_payment:
          amount: 100
          dict_key: pixkey@mail.com
          due_detail:
            discount: 2
            discount_amounts: []
            discount_antecipation_type: per_day_antecipated
            discount_calculation_days: working
            discount_calculation_type: amount
            discount_dates: []
            due_date: '2026-07-02'
            fine: 10
            fine_calculation_type: percentage
            interest: 20
            interest_calculation_days: calendar
            interest_calculation_period: month
            interest_calculation_type: amount
            rebate: 50
            rebate_calculation_type: percentage
        options:
          authorization_type: app
          automatic_schedule: false
          next_working_day: true
          qrcode_expiration_seconds: 86400
          retry_policy: 3r_7d
        periodicity: mnth
        start_date: '2026-07-02T19:00:15.192371Z'
        virtual_account_id: 019f2433-fed8-9e20-0fc5-e0c4e7b7f6e4
      properties:
        amounts:
          description: >-
            Recurrence Amount, use fixed for fixed amount recurences. For
            variable amount recurrences, a minimum can be defined. If defined,
            the counterparty cannot define a limit lower than the minimum.
            Variable amount recurrences need to be updated with the amount
            before each collecting date. If left blank, a variable amount
            recurrence will be created with no minimum
          nullable: true
          properties:
            fixed:
              description: Fixed Amount in cents, used for fixed amount recurrences
              nullable: true
              type: integer
            minimum:
              description: Minimum Amount in cents, used for variable amount recurrences
              nullable: true
              type: integer
          type: object
        contract_number:
          description: Contract Number
          maxLength: 35
          type: string
        counterparty:
          description: Counterparty
          properties:
            bank_account:
              description: >-
                Counterparty Bank Account, required for authorization type
                'app', this is the bank account that will receive the request to
                approve the recurrence
              nullable: true
              properties:
                branch:
                  description: Counterparty Bank Account Branch
                  pattern: ^[0-9]+$
                  type: string
                digit:
                  description: Counterparty Bank Account Digit
                  pattern: ^[0-9]$
                  type: string
                ispb:
                  description: Counterparty Bank Account ISPB
                  pattern: ^[0-9]{8}$
                  type: string
                number:
                  description: Counterparty Bank Account Number
                  pattern: ^[0-9]+$
                  type: string
              required:
                - ispb
                - number
                - branch
                - digit
              type: object
            info:
              description: Counterparty Info
              nullable: true
              properties:
                address:
                  description: Counterparty Address
                  nullable: true
                  type: string
                city:
                  description: Counterparty City
                  nullable: true
                  type: string
                email:
                  description: Counterparty Email
                  nullable: true
                  type: string
                postal_code:
                  description: Counterparty Postal Code
                  nullable: true
                  type: string
                state:
                  description: Counterparty State
                  nullable: true
                  type: string
              type: object
            name:
              description: Counterparty Name
              type: string
            tax_number:
              description: Counterparty Tax Number
              type: string
          required:
            - tax_number
            - name
          type: object
        description:
          description: Description
          maxLength: 35
          type: string
        end_date:
          description: Recurrence End Date
          format: date-time
          nullable: true
          type: string
        external_id:
          description: Recurrence External ID
          nullable: true
          type: string
        first_payment:
          $ref: '#/components/schemas/FirstPaymentWithDueDetail'
        options:
          description: Recurrence options
          nullable: true
          properties:
            authorization_type:
              default: qrcode
              description: >-
                Authorization type of the recurrence. Use 'qrcode' for
                requesting directly to the counterparty banking app or 'qrcode'
                for generating a QRCode
              enum:
                - app
                - qrcode
              nullable: true
              type: string
            automatic_schedule:
              default: true
              description: >-
                Automated Collecting on the defined periodicity. If not set, the
                recurrence must be scheduled each time. i.e. if periodicity is
                'mnth', the recurrence needs to be scheduled each month, between
                2 and 10 days before the next payment date
              nullable: true
              type: boolean
            automated_attempt_retry:
              default: true
              description: >-
                Automatically manages retry attempts when a payment fails. If
                set to true, Trio creates and manages retries according to the
                configured retry_policy. If false, retry attempts must be
                created and managed by the client application.
              nullable: true
              type: boolean
            next_working_day:
              default: false
              description: >-
                Do not bill on Holidays, bill on the counterparty's next working
                day
              nullable: true
              type: boolean
            qrcode_expiration_seconds:
              default: 86400
              description: >-
                Expiration time in seconds for the dynamic QR code. If the
                generated QR code is static, this field is disconsidered as the
                static QR code does not expire.
              nullable: true
              type: integer
            retry_policy:
              default: 3r_7d
              description: >-
                Recurrence retry policy. '3r_7d': if the collecting fails, it
                will be retried 3 times in a 7 days period, on alternating days.
                'none': no retry
              enum:
                - none
                - 3r_7d
              nullable: true
              type: string
          type: object
        periodicity:
          description: >-
            'week': every week, 'mnth': every month, 'qurt': every 3 months,
            'mian': every 6 months, 'year': every year
          enum:
            - week
            - mnth
            - qurt
            - mian
            - year
          type: string
        start_date:
          description: Recurrence Start Date
          format: date-time
          type: string
        virtual_account_id:
          description: Virtual Account ID
          format: uuid
          type: string
      required:
        - virtual_account_id
        - counterparty
        - description
        - periodicity
        - contract_number
        - start_date
      title: GenerateRecurrenceParameters
      type: object
    GenerateRecurrenceResponse:
      description: Generate Recurrence response
      example:
        data:
          counterparty_bank_account_id: 019f2433-fe07-5f35-54f6-4a305e17cc78
          start_date: '2026-07-02T19:00:14.983685Z'
          counterparty_id: 019f2433-fe07-b1fc-c037-076bca4192e6
          type: in
          entity_id: 019f2433-fe07-1908-f771-055c0cbd759c
          reference_id: 019f2433-fe07-d705-a3dd-49aa251c3eeb
          minimum_amount:
            amount: 10
            currency: BRL
          ispb: '19947272'
          first_payment_date: '2026-07-02T19:00:14.983681Z'
          virtual_account_id: 019f2433-fe07-c3a0-0cd9-d48cb9882b4f
          company_id: 019f2433-fe07-209c-d0ff-2586f01636c4
          automatic_schedule: false
          automated_attempt_retry: true
          end_date: '2026-07-02T19:00:14.983686Z'
          status: approved
          next_working_day: true
          description: Descrição da recorrência
          id: 019f2433-fe07-b59d-13e1-50e9363c91bc
          id_rec: 019f2433-fe07-b576-1678-4d507e601b35
          fixed_amount:
            amount: 10
            currency: BRL
          contract_number: '123'
          txid: HASHEDER3E1287317823
          journey: aut1
          external_id: Teste 1
          retry_policy: none
          timestamp: '2026-07-02T19:00:14.983669Z'
          org_id: 019f2433-fe07-792a-d6f7-5c402eb44c06
          first_payment_amount:
            amount: 10
            currency: BRL
          maximum_amount:
            amount: 10
            currency: BRL
          reference_type: qrdn
          periodicity: week
          qrcode:
            hash: 0000BResdasadjvajsidunajkTTrioTecnologia
            id: 019f2433-fe07-e587-cda1-5c292d1e8e80
            type: dynamic
          bank_account_id: 019f2433-fe07-577b-629a-8c33e20ab286
          counterparty_info_id: 019f2433-fe07-6443-55ef-6584f0a49b46
          counterparty_seq: '12'
      properties:
        data:
          description: Generate recurrence response data
          properties:
            counterparty_bank_account_id:
              description: Counterparty Bank Account ID
              format: uuid
              type: string
            start_date:
              description: Recurrence Start Date
              format: date-time
              type: string
            counterparty_id:
              description: Counterparty ID
              format: uuid
              type: string
            type:
              $ref: '#/components/schemas/RecurrenceType'
            entity_id:
              description: Entity ID
              format: uuid
              type: string
            reference_id:
              description: Reference ID
              format: uuid
              type: string
            minimum_amount:
              description: Minimum Amount
              properties:
                amount:
                  description: Amount integer in cents
                  type: string
                currency:
                  description: Amount currency
                  type: string
              type: object
            ispb:
              description: ISPB
              type: string
            first_payment_date:
              description: First Payment Date
              format: date-time
              type: string
            virtual_account_id:
              description: Virtual Account ID
              format: uuid
              type: string
            company_id:
              description: Company ID
              format: uuid
              type: string
            automatic_schedule:
              description: Automated Collecting
              type: string
            end_date:
              description: Recurrence End Date
              format: date-time
              type: string
            status:
              $ref: '#/components/schemas/RecurrenceStatus'
            next_working_day:
              description: Next Working Day
              type: string
            description:
              description: Description
              type: string
            id:
              description: Recurrence ID
              format: uuid
              type: string
            id_rec:
              description: ID Rec
              type: string
            fixed_amount:
              description: Fixed Amount
              properties:
                amount:
                  description: Amount integer in cents
                  type: string
                currency:
                  description: Amount currency
                  type: string
              type: object
            contract_number:
              description: Contract Number
              type: string
            txid:
              description: Txid
              type: string
            journey:
              $ref: '#/components/schemas/Journey'
            external_id:
              description: External ID
              format: uuid
              type: string
            retry_policy:
              $ref: '#/components/schemas/RecurrenceRetryPolicy'
            timestamp:
              description: Timestamp
              type: string
            org_id:
              description: Org ID
              format: uuid
              type: string
            first_payment_amount:
              description: First payment Amount
              properties:
                amount:
                  description: Amount integer in cents
                  type: string
                currency:
                  description: Amount currency
                  type: string
              type: object
            maximum_amount:
              description: Maximum Amount
              properties:
                amount:
                  description: Amount integer in cents
                  type: string
                currency:
                  description: Amount currency
                  type: string
              type: object
            reference_type:
              $ref: '#/components/schemas/RecurrenceReferenceType'
            periodicity:
              $ref: '#/components/schemas/RecurrencePeriodicity'
            qrcode:
              description: 'QR Code data, only present when approval_type ''qrcode'' '
              nullable: true
              properties:
                hash:
                  description: QR Code Hash
                  type: string
                id:
                  description: QR Code ID
                  format: uuid
                  type: string
                type:
                  description: QR Code type
                  enum:
                    - dynamic
                    - static
                  type: string
              type: object
            bank_account_id:
              description: Bank Account ID
              format: uuid
              type: string
            counterparty_info_id:
              description: Counterparty Info ID
              format: uuid
              type: string
            counterparty_seq:
              description: Counterparty Seq
              type: string
          type: object
      title: GenerateRecurrenceResponse
      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
    FirstPaymentWithDueDetail:
      description: Schema for the first payment with due detail
      nullable: true
      properties:
        amount:
          description: First Payment amount in cents
          nullable: true
          type: integer
        dict_key:
          description: Virtual Account Pix Key
          nullable: true
          type: string
        due_detail:
          $ref: '#/components/schemas/DynamicBrcodeDueDetailParams'
        expiration_seconds:
          description: >-
            [Deprecated] use the 'options.qrcode_expiration_seconds' field
            instead.
          nullable: true
          type: integer
        recurrence_required:
          default: true
          description: >-
            If set to false, the counterparty is able to make the first payment
            and refuse the recurrence. If set to true, the recurrence and first
            payment are approved in a single authorization.
          nullable: true
          type: boolean
      title: FirstPaymentWithDueDetail
      type: object
    RecurrenceType:
      description: Types of recurrence type
      enum:
        - in
        - out
      title: RecurrenceType
      type: string
    RecurrenceStatus:
      description: Types of recurrence status
      enum:
        - created
        - approved
        - rejected
        - expired
        - cancelled
      title: RecurrenceStatus
      type: string
    Journey:
      description: Types of recurrence journey
      enum:
        - aut1
        - aut2
        - aut3
        - aut4
      title: Journey
      type: string
    RecurrenceRetryPolicy:
      description: Types of recurrence retry policy
      enum:
        - none
        - 3r_7d
      title: RecurrenceRetryPolicy
      type: string
    RecurrenceReferenceType:
      description: >-
        Recurrence reference types, 'requ' = app, 'qrdn' = dynamicQRCode, 'qres'
        = staticQRCode
      enum:
        - requ
        - qrdn
        - qres
      title: RecurrenceReferenceType
      type: string
    RecurrencePeriodicity:
      description: >-
        'week': every week, 'mnth': every month, 'qurt': every 3 months, 'mian':
        every 6 months, 'year': every year
      enum:
        - week
        - mnth
        - qurt
        - mian
        - year
      title: RecurrencePeriodicity
      type: string
    DynamicBrcodeDueDetailParams:
      description: Body params for dynamic brcode due detail
      nullable: true
      properties:
        discount:
          description: Discount of the due detail
          nullable: true
          type: integer
        discount_amounts:
          description: Discount amounts of the due detail
          items:
            type: integer
          nullable: true
          type: array
        discount_antecipation_type:
          $ref: '#/components/schemas/DynamicBrcodeDueDetailDiscountAntecipationType'
        discount_calculation_days:
          $ref: '#/components/schemas/DynamicBrcodeDueDetailDiscountCalculationDays'
        discount_calculation_type:
          $ref: '#/components/schemas/DynamicBrcodeDueDetailDiscountCalculationType'
        discount_dates:
          description: Discount dates of the due detail
          items:
            format: date
            type: string
          nullable: true
          type: array
        due_date:
          description: Due date of the dynamic brcode
          format: date
          type: string
        fine:
          description: Fine of the due detail
          nullable: true
          type: integer
        fine_calculation_type:
          $ref: '#/components/schemas/DynamicBrcodeDueDetailFineCalculationType'
        interest:
          description: Interest of the due detail
          nullable: true
          type: integer
        interest_calculation_days:
          $ref: '#/components/schemas/DynamicBrcodeDueDetailInterestCalculationDays'
        interest_calculation_period:
          $ref: '#/components/schemas/DynamicBrcodeDueDetailInterestCalculationPeriod'
        interest_calculation_type:
          $ref: '#/components/schemas/DynamicBrcodeDueDetailInterestCalculationType'
        rebate:
          description: Rebate of the due detail
          nullable: true
          type: integer
        rebate_calculation_type:
          $ref: '#/components/schemas/DynamicBrcodeDueDetailRebateCalculationType'
      required:
        - due_date
      title: DynamicBrcodeDueDetailParams
      type: object
    DynamicBrcodeDueDetailDiscountAntecipationType:
      description: Discount antecipation type of dynamic brcode with due detail
      enum:
        - fixed_until_due
        - per_day_antecipated
      nullable: true
      title: DynamicBrcodeDueDetailDiscountAntecipationType
      type: string
    DynamicBrcodeDueDetailDiscountCalculationDays:
      description: Discount calculation days of dynamic brcode with due detail
      enum:
        - calendar
        - working
      nullable: true
      title: DynamicBrcodeDueDetailDiscountCalculationDays
      type: string
    DynamicBrcodeDueDetailDiscountCalculationType:
      description: Discount calculation type of dynamic brcode with due detail
      enum:
        - amount
        - percentage
      nullable: true
      title: DynamicBrcodeDueDetailDiscountCalculationType
      type: string
    DynamicBrcodeDueDetailFineCalculationType:
      description: Fine calculation type of dynamic brcode with due detail
      enum:
        - amount
        - percentage
      nullable: true
      title: DynamicBrcodeDueDetailFineCalculationType
      type: string
    DynamicBrcodeDueDetailInterestCalculationDays:
      description: Interest calculation days of dynamic brcode with due detail
      enum:
        - calendar
        - working
      nullable: true
      title: DynamicBrcodeDueDetailInterestCalculationDays
      type: string
    DynamicBrcodeDueDetailInterestCalculationPeriod:
      description: Interest calculation period of dynamic brcode with due detail
      enum:
        - day
        - month
        - year
      nullable: true
      title: DynamicBrcodeDueDetailInterestCalculationPeriod
      type: string
    DynamicBrcodeDueDetailInterestCalculationType:
      description: Interest calculation type of dynamic brcode with due detail
      enum:
        - amount
        - percentage
      nullable: true
      title: DynamicBrcodeDueDetailInterestCalculationType
      type: string
    DynamicBrcodeDueDetailRebateCalculationType:
      description: Rebate calculation type of dynamic brcode with due detail
      enum:
        - amount
        - percentage
      nullable: true
      title: DynamicBrcodeDueDetailRebateCalculationType
      type: string

````