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

# Create recurrence request (Pix Automático)

> Creates a recurrence confirmation request (SolicRec) with a server-generated idSolicRec. Pix API POST /solicrec. The rail sends the request to the payer's PSP (pain.009) asynchronously. It stays CRIADA until it is sent, becomes ENVIADA when BACEN accepts the message and RECEBIDA when the payer's PSP confirms receipt, then ACEITA or REJEITADA by the payer's answer.



## OpenAPI

````yaml /pt/openapi/v3-current/spi-brcode.yaml post /api/v1/brcode/solicrec
openapi: 3.1.0
info:
  contact:
    email: contact@lerian.studio
    name: Lerian Studio
    url: https://lerian.studio
  description: BR Code service for QR code generation and decoding (EMV QRCPS-MPM).
  license:
    name: Lerian Studio General License
  title: Lerian SPI — BR Code API
  version: 1.0.0
servers:
  - url: https://api.example.com
    description: >-
      Replace the example host with the URL provided during environment
      onboarding.
security: []
tags:
  - description: EMV BR Code payload generation, decoding, validation, info, and lookup.
    name: BRCode
  - description: >-
      Pix charges (Cob/CobV/LoteCobV): create, retrieve by TxID, list, cancel,
      reconcile, and resolve public payloads.
    name: Charges
  - description: >-
      Flow (mandatory order): create cob/cobv → generate QR/payload. A dynamic
      BR Code payload references a charge, so the cob/cobv charge MUST be
      created first; the payload links to it by txid/locator.
    name: charge
paths:
  /api/v1/brcode/solicrec:
    post:
      tags:
        - SolicRec
      summary: Create recurrence request (Pix Automático)
      description: >-
        Creates a recurrence confirmation request (SolicRec) with a
        server-generated idSolicRec. Pix API POST /solicrec. The rail sends the
        request to the payer's PSP (pain.009) asynchronously. It stays CRIADA
        until it is sent, becomes ENVIADA when BACEN accepts the message and
        RECEBIDA when the payer's PSP confirms receipt, then ACEITA or REJEITADA
        by the payer's answer.
      operationId: postSolicRec
      parameters:
        - description: Idempotency key, max 255 characters.
          in: header
          name: X-Idempotency
          required: true
          schema:
            description: Idempotency key, max 255 characters.
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SolicRecBody'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolicRecCompleta'
          description: Created
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Not Found
        '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
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Error
      security:
        - BearerAuth: []
components:
  schemas:
    SolicRecBody:
      additionalProperties: false
      properties:
        calendario:
          $ref: '#/components/schemas/SolicRecCalendarioDTO'
          description: Calendário da solicitação.
        destinatario:
          $ref: '#/components/schemas/SolicRecDestinatarioDTO'
          description: Destinatário (conta + participante, CPF ou CNPJ).
        idRec:
          description: Identificador da recorrência (Rec) a confirmar.
          examples:
            - RN123456782024011577825445612
          pattern: ^[a-zA-Z0-9]{29}$
          type: string
      required:
        - idRec
        - calendario
        - destinatario
      type: object
    SolicRecCompleta:
      additionalProperties: false
      properties:
        atualizacao:
          items:
            $ref: '#/components/schemas/SolicRecAtualizacaoDTO'
          type: array
        calendario:
          $ref: '#/components/schemas/SolicRecCalendarioDTO'
        destinatario:
          $ref: '#/components/schemas/SolicRecDestinatarioDTO'
        idRec:
          pattern: ^[a-zA-Z0-9]{29}$
          type: string
        idSolicRec:
          description: Identificador da solicitação.
          pattern: ^[a-zA-Z0-9]{29}$
          type: string
        recPayload:
          $ref: '#/components/schemas/RecPayloadDTO'
        status:
          enum:
            - CRIADA
            - ENVIADA
            - RECEBIDA
            - REJEITADA
            - ACEITA
            - EXPIRADA
            - CANCELADA
          type: string
      required:
        - idSolicRec
        - idRec
        - calendario
        - destinatario
        - status
        - atualizacao
      type: object
    Detail:
      additionalProperties: false
      properties:
        code:
          description: >-
            Stable, machine-readable domain error code scoped to the emitting
            service (format: <SERVICE>-NNNN).
          type: string
        correlationId:
          description: Request-scoped correlation identifier echoing X-Request-ID.
          examples:
            - req-7a3f9c2e
          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.
      required:
        - correlationId
      type: object
    SolicRecCalendarioDTO:
      additionalProperties: false
      properties:
        dataExpiracaoSolicitacao:
          description: Data de expiração da solicitação enviada ao pagador (RFC 3339).
          examples:
            - '2023-12-20T12:17:11Z'
          format: date-time
          pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2})$
          type: string
      required:
        - dataExpiracaoSolicitacao
      type: object
    SolicRecDestinatarioDTO:
      additionalProperties: false
      properties:
        agencia:
          description: Agência do destinatário.
          examples:
            - '2569'
          maxLength: 4
          type: string
        cnpj:
          description: CNPJ do destinatário (PJ). Mutuamente exclusivo com cpf.
          pattern: ^[0-9A-Z]{14}$
          type: string
        conta:
          description: Conta do destinatário.
          examples:
            - '550689'
          maxLength: 20
          type: string
        cpf:
          description: CPF do destinatário (PF). Mutuamente exclusivo com cnpj.
          examples:
            - '15231470190'
          pattern: ^\d{11}$
          type: string
        ispbParticipante:
          description: ISPB do participante destinatário.
          examples:
            - '91193552'
          pattern: ^[0-9A-Z]{8}$
          type: string
      required:
        - conta
        - ispbParticipante
      type: object
    SolicRecAtualizacaoDTO:
      additionalProperties: false
      properties:
        data:
          description: Instante da atualização (RFC 3339).
          type: string
        status:
          description: Status da solicitação no instante.
          enum:
            - CRIADA
            - ENVIADA
            - RECEBIDA
            - REJEITADA
            - ACEITA
            - EXPIRADA
            - CANCELADA
          type: string
      required:
        - status
        - data
      type: object
    RecPayloadDTO:
      additionalProperties: false
      properties:
        atualizacao:
          items:
            $ref: '#/components/schemas/RecAtualizacaoDTO'
          type: array
        calendario:
          $ref: '#/components/schemas/RecCalendarioDTO'
        idRec:
          description: Identificador da recorrência.
          pattern: ^[a-zA-Z0-9]{29}$
          type: string
        politicaRetentativa:
          enum:
            - NAO_PERMITE
            - PERMITE_3R_7D
          type: string
        recebedor:
          $ref: '#/components/schemas/RecPayloadRecebedorDTO'
        valor:
          $ref: '#/components/schemas/RecValorDTO'
        vinculo:
          $ref: '#/components/schemas/RecVinculoDTO'
      required:
        - idRec
        - vinculo
        - calendario
        - recebedor
        - politicaRetentativa
        - atualizacao
      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
    RecAtualizacaoDTO:
      additionalProperties: false
      properties:
        data:
          description: Instante da atualização (RFC 3339).
          type: string
        status:
          description: Status da recorrência no instante.
          enum:
            - CRIADA
            - APROVADA
            - REJEITADA
            - EXPIRADA
            - CANCELADA
          type: string
      required:
        - status
        - data
      type: object
    RecCalendarioDTO:
      additionalProperties: false
      properties:
        dataFinal:
          description: >-
            Data final (apenas vigência fixa; ausente para indeterminada)
            (YYYY-MM-DD). Não pode ser anterior a dataInicial.
          type: string
        dataInicial:
          description: >-
            Data estimada do primeiro pagamento (YYYY-MM-DD). Não pode ser
            anterior à data de criação da recorrência.
          examples:
            - '2027-01-15'
          type: string
        periodicidade:
          description: Cadência da recorrência.
          enum:
            - SEMANAL
            - MENSAL
            - TRIMESTRAL
            - SEMESTRAL
            - ANUAL
          examples:
            - MENSAL
          type: string
      required:
        - dataInicial
        - periodicidade
      type: object
    RecPayloadRecebedorDTO:
      additionalProperties: false
      properties:
        cnpj:
          pattern: ^[0-9A-Z]{14}$
          type: string
        ispbParticipante:
          pattern: ^[0-9A-Z]{8}$
          type: string
        nome:
          maxLength: 140
          type: string
      required:
        - cnpj
        - nome
        - ispbParticipante
      type: object
    RecValorDTO:
      additionalProperties: false
      properties:
        valorMinimoRecebedor:
          description: Piso do recebedor (mutuamente exclusivo com valorRec).
          pattern: ^\d{1,10}\.\d{2}$
          type: string
        valorRec:
          description: Valor fixo da recorrência.
          examples:
            - '99.90'
          pattern: ^\d{1,10}\.\d{2}$
          type: string
      type: object
    RecVinculoDTO:
      additionalProperties: false
      properties:
        contrato:
          description: Identificador do contrato/pedido.
          examples:
            - contrato-12345
          maxLength: 35
          type: string
        devedor:
          $ref: '#/components/schemas/RecDevedorDTO'
          description: Devedor da recorrência (PF/PJ).
        objeto:
          description: Descrição livre do objeto da recorrência.
          maxLength: 35
          type: string
      required:
        - contrato
        - devedor
      type: object
    RecDevedorDTO:
      additionalProperties: false
      properties:
        cnpj:
          description: CNPJ do devedor (PJ). Mutuamente exclusivo com cpf.
          examples:
            - 12ABC34501DE35
          pattern: ^[0-9A-Z]{14}$
          type: string
        cpf:
          description: CPF do devedor (PF). Mutuamente exclusivo com cnpj.
          examples:
            - '12345678901'
          pattern: ^\d{11}$
          type: string
        nome:
          description: Nome do devedor.
          examples:
            - Fulano de Tal
          maxLength: 140
          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.