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

# Onboarding PF

> Inicia o onboarding assíncrono de subconta pessoa física via multipart/form-data. Retorna 202 com registration_id e status.

`POST /v2/submerchants/onboarding/pf`

Inicia o onboarding de uma subconta **PF**. A requisição é `multipart/form-data`
e retorna `202 Accepted` com o `registration_id` e o status inicial.

<Note>
  Inicia o onboarding assíncrono de subconta pessoa física. Retorna `202` com
  `registration_id`. Exige headers `client-id` + `client-secret` e
  `x-idempotency-key` (UUID v4).
</Note>

## Arquivos (multipart)

Envie **uma** das opções de documento de identidade, mais a selfie:

| Campo             | Obrigatório | Descrição                                 |
| ----------------- | ----------- | ----------------------------------------- |
| `documentoFrente` | Condicional | Frente do RG/CIN                          |
| `documentoVerso`  | Condicional | Verso do RG/CIN                           |
| `cnhCompleta`     | Condicional | CNH completa (alternativa a frente+verso) |
| `selfie`          | Sim         | Selfie do titular (rosto)                 |

Regras:

* Envie `documentoFrente` **e** `documentoVerso`, **ou** `cnhCompleta`.
* O campo da selfie é `selfie` (não use mais `selfieComDocumento`).

<Warning>
  Envie `documentoFrente` e `documentoVerso`, ou envie `cnhCompleta`. O campo
  da selfie é `selfie`. Não use `selfieComDocumento`. Depois do `202`, consulte
  o status com o `registration_id`. Veja o guia [Subcontas](/subcontas).
</Warning>


## OpenAPI

````yaml POST /v2/submerchants/onboarding/pf
openapi: 3.0.0
info:
  title: UvviPay Public API
  description: >-
    Endpoints públicos da plataforma UvviPay para integração de subcontas
    (submerchants).
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.uvvipay.com.br
    description: Produção
  - url: https://api-staging.uvvipay.com.br
    description: Staging
security:
  - client-id: []
    client-secret: []
tags: []
paths:
  /v2/submerchants/onboarding/pf:
    post:
      tags:
        - Submerchants
      summary: Onboarding PF (API)
      description: >-
        Inicia o onboarding assíncrono de subconta pessoa física via
        multipart/form-data. Retorna 202 com registration_id e status.
      operationId: apiOnboardingSubmerchantPf
      parameters:
        - name: client-secret
          in: header
          description: Secret da credencial do merchant
          required: true
          schema:
            type: string
        - name: client-id
          in: header
          description: ID público da credencial do merchant
          required: true
          schema:
            type: string
        - name: x-idempotency-key
          in: header
          description: UUID v4 gerado pelo cliente. Usado como externalId da subconta.
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ApiOnboardingSubmerchantPfDto'
      responses:
        '202':
          description: Onboarding iniciado
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiOnboardingSubmerchantResponseDto'
        '400':
          description: Dados ou documentos inválidos
        '401':
          description: Credenciais inválidas ou ausentes
        '403':
          description: Recurso não habilitado para este merchant
        '409':
          description: Idempotency key já utilizada com payload diferente
        '429':
          description: Limite de requisições excedido
components:
  schemas:
    ApiOnboardingSubmerchantPfDto:
      type: object
      properties:
        document:
          type: string
          description: CPF do titular (11 dígitos)
          example: '12345678901'
        fullName:
          type: string
          description: Nome completo do titular
          example: João da Silva
          maxLength: 255
        birthDate:
          type: string
          format: date
          description: Data de nascimento (YYYY-MM-DD)
          example: '1990-01-15'
        email:
          type: string
          format: email
          description: Email de contato (opcional)
          example: joao@exemplo.com
          maxLength: 255
        phone:
          type: string
          description: Telefone no formato E.164
          example: '+5511999999999'
        addressZipCode:
          type: string
          description: CEP
          example: '01310100'
          maxLength: 10
        addressStreet:
          type: string
          description: Logradouro
          example: Avenida Paulista
          maxLength: 255
        addressNumber:
          type: string
          description: Número do endereço
          example: '1000'
          maxLength: 20
        addressComplement:
          type: string
          description: Complemento do endereço
          example: Apto 101
          maxLength: 255
        addressNeighborhood:
          type: string
          description: Bairro
          example: Bela Vista
          maxLength: 100
        addressCity:
          type: string
          description: Cidade
          example: São Paulo
          maxLength: 100
        addressState:
          type: string
          description: UF (2 caracteres)
          example: SP
          maxLength: 2
        bankAccount:
          description: Dados bancários. Em multipart, envie como JSON string.
          allOf:
            - $ref: '#/components/schemas/ApiOnboardingSubmerchantBankAccountDto'
        documentoFrente:
          type: string
          format: binary
          description: >-
            Frente do RG/CIN. Obrigatório com documentoVerso, se não enviar
            cnhCompleta.
        documentoVerso:
          type: string
          format: binary
          description: >-
            Verso do RG/CIN. Obrigatório com documentoFrente, se não enviar
            cnhCompleta.
        cnhCompleta:
          type: string
          format: binary
          description: CNH completa. Alternativa a documentoFrente + documentoVerso.
        selfie:
          type: string
          format: binary
          description: Selfie do titular (rosto). Não use selfieComDocumento.
      required:
        - document
        - fullName
        - birthDate
        - phone
        - addressZipCode
        - addressStreet
        - addressNumber
        - addressNeighborhood
        - addressCity
        - addressState
        - bankAccount
        - selfie
      anyOf:
        - required:
            - documentoFrente
            - documentoVerso
        - required:
            - cnhCompleta
    ApiOnboardingSubmerchantResponseDto:
      type: object
      properties:
        registration_id:
          type: string
          format: uuid
          description: ID do registro de onboarding
          example: 2f1c8b9a-4d3e-4f6a-9b1c-0a1b2c3d4e5f
        status:
          type: string
          description: Status do onboarding após o submit ou reenvio
          example: submitted
      required:
        - registration_id
        - status
    ApiOnboardingSubmerchantBankAccountDto:
      type: object
      properties:
        bankAccountType:
          type: string
          description: Tipo da conta bancária
          enum:
            - conta_corrente
            - conta_poupanca
          example: conta_corrente
        bankName:
          type: string
          description: Nome do banco
          example: Banco do Brasil
          maxLength: 100
        bankCode:
          type: string
          description: Código compe do banco (3 dígitos)
          example: '001'
          maxLength: 3
        bankAgency:
          type: string
          description: Agência bancária
          example: '1234'
          maxLength: 20
        bankAccount:
          type: string
          description: Número da conta
          example: '56789'
          maxLength: 30
        bankAccountDv:
          type: string
          description: Dígito verificador da conta
          example: '0'
          maxLength: 5
        ispb:
          type: string
          description: ISPB do banco (8 dígitos)
          example: '00000000'
          maxLength: 8
      required:
        - bankAccountType
        - bankName
        - bankCode
        - bankAgency
        - bankAccount
        - bankAccountDv
        - ispb
  securitySchemes:
    client-id:
      type: apiKey
      in: header
      name: client-id
    client-secret:
      type: apiKey
      in: header
      name: client-secret

````