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

# Criar assinatura



## OpenAPI

````yaml POST /pix-automatic/recurrences
openapi: 3.0.0
info:
  title: payera-api
  description: Documentação de endpoints e entidades da payera
  version: '1.0'
  contact: {}
servers:
  - url: https://api.rivoopay.com
security:
  - ApiKeyAuth: []
paths:
  /pix-automatic/recurrences:
    post:
      tags:
        - Recurrences
      summary: Criar recorrência Pix Automático para um produto recorrente
      operationId: RecurrenceController_create
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRecurrenceDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecurrenceResponseDto'
        '400':
          description: Produto inválido / valor abaixo do mínimo
        '404':
          description: Produto ou cliente não encontrado
        '409':
          description: Recorrência ativa já existe
components:
  schemas:
    CreateRecurrenceDto:
      type: object
      properties:
        productId:
          type: string
          example: prod_abc123
        customerId:
          type: string
          example: customer_abc123
      required:
        - productId
        - customerId
    RecurrenceResponseDto:
      type: object
      properties:
        status:
          type: number
        message:
          type: string
        data:
          $ref: '#/components/schemas/RecurrenceDto'
      required:
        - status
        - message
        - data
    RecurrenceDto:
      type: object
      properties:
        id:
          type: string
        status:
          type: string
          enum:
            - OPEN
            - COMPLETED
            - EXPIRED
            - CANCELED
        productId:
          type: string
        productName:
          type: string
        customerId:
          type: string
        customerName:
          type: string
        value:
          type: string
          description: Valor recorrente em centavos
        frequency:
          type: string
          enum:
            - WEEKLY
            - MONTHLY
            - SEMIANNUAL
            - ANNUAL
        dayDue:
          type: number
        dayGenerateCharge:
          type: number
        externalRecurrenceId:
          type: string
        paymentLinkUrl:
          type: string
        emv:
          type: string
        qrCode:
          type: string
          description: QR do EMV em PNG base64 (data URL), gerado pelo backend
        recurrenceAuthStatus:
          type: string
          enum:
            - CREATED
            - APPROVED
            - REJECTED
            - CANCELED
            - EXPIRED
        isRecurringTemplate:
          type: boolean
          description: true se é um link self-serve (template) sem acordo ainda
        createdAt:
          format: date-time
          type: string
      required:
        - id
        - status
        - productId
        - customerId
        - value
        - createdAt
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````