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

# Get sub-account fees and registration info

> Retorna as taxas (transacionais `tx_spread` e de antecipação
`anticipation`), a razão social e o CNPJ de uma subconta do Fast Connect.

O retorno depende de **qual conta** está autenticada — não apenas do `:id`:

- **Conta master:** usa o `:id` informado e retorna a subconta vinculada
  (`parent_merchant_id = master`). Id de outra master, inexistente, ou o
  próprio id do master retorna `404`. Exige `enable_fast_connect`
  habilitado na master (caso contrário, `403`).
- **Subconta:** retorna **sempre os próprios dados**; o `:id` é
  **ignorado** (não depende de `enable_fast_connect`).

As taxas vêm como lista plana: a rota **não** mescla overrides de bandeira
(`brand: visa/mastercard/elo`) com a taxa padrão (`brand: null`), nem faz
fallback para taxas default do gateway — calcular a taxa efetiva por
bandeira/parcela é responsabilidade do consumidor.



## OpenAPI

````yaml /api-reference/openapi.yaml get /v1/fast-connect/sub-accounts/{id}/fees-info
openapi: 3.0.0
info:
  title: FastPay API
  version: 1.0.0
  description: >-
    API for creating and managing payment charges.


    ## Authentication


    This API uses **Basic Authentication** for direct API access, such as
    creating charges.

    Use your API key as the username and an empty string as password.

    The header should be formatted as:


    `Authorization: Basic {base64(apiKey:)}`.


    For example:


    ```

    Authorization: Basic YWxleG91dG9uOiIi

    ```


    ## Webhooks


    FastPay sends webhooks to notify your application about charge status
    changes in real-time.

    Webhooks are sent via HTTP POST requests to your configured webhook
    endpoints.


    ### Webhook Events


    The following webhook events are available for charges:


    - `charge.created` - Sent when a new charge is created

    - `charge.pending` - Sent when a charge is pending payment

    - `charge.paid` - Sent when a charge is successfully paid

    - `charge.updated` - Sent when a charge is updated


    ### Webhook Payload Structure


    All webhook payloads follow this structure:


    ```json

    {
      "id": "webhook_event_id",
      "event": "charge.paid",
      "data": {
        // Complete charge object
      }
    }

    ```


    ### Webhook Delivery


    - Webhooks are sent via HTTP POST requests

    - Content-Type: `application/json`

    - Retry logic is implemented for failed deliveries

    - Webhook events are stored in the database for audit purposes

    - Delivery logs are maintained for debugging and monitoring


    ### Webhook Security


    - Webhooks are sent to pre-configured endpoints

    - Endpoints can be enabled/disabled per merchant

    - Event filtering is supported (only receive specific events)

    - Failed deliveries are retried with exponential backoff
servers:
  - url: https://api-global.fastpaybrasil.com
    description: Produção e Sandbox (diferenciados pela API key)
security: []
paths:
  /v1/fast-connect/sub-accounts/{id}/fees-info:
    get:
      tags:
        - FastConnect
      summary: Get sub-account fees and registration info
      description: >-
        Retorna as taxas (transacionais `tx_spread` e de antecipação

        `anticipation`), a razão social e o CNPJ de uma subconta do Fast
        Connect.


        O retorno depende de **qual conta** está autenticada — não apenas do
        `:id`:


        - **Conta master:** usa o `:id` informado e retorna a subconta vinculada
          (`parent_merchant_id = master`). Id de outra master, inexistente, ou o
          próprio id do master retorna `404`. Exige `enable_fast_connect`
          habilitado na master (caso contrário, `403`).
        - **Subconta:** retorna **sempre os próprios dados**; o `:id` é
          **ignorado** (não depende de `enable_fast_connect`).

        As taxas vêm como lista plana: a rota **não** mescla overrides de
        bandeira

        (`brand: visa/mastercard/elo`) com a taxa padrão (`brand: null`), nem
        faz

        fallback para taxas default do gateway — calcular a taxa efetiva por

        bandeira/parcela é responsabilidade do consumidor.
      parameters:
        - name: id
          in: path
          required: true
          description: >-
            Id (KSUID) da subconta. Obrigatório quando autenticado como conta
            master; ignorado quando autenticado como subconta.
          schema:
            type: string
            example: 2v2TGGb4NHTQWCiMmnelz2WVOZP
      responses:
        '200':
          description: Taxas e dados cadastrais da subconta
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubAccountFeesInfo'
        '401':
          description: Unauthorized - invalid credentials
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    example: 401
                  message:
                    type: string
                    example: Não autorizado
        '403':
          description: >-
            Forbidden - conta não-merchant ou Fast Connect não habilitado na
            master
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    example: 403
                  message:
                    type: string
                    example: Fast Connect não habilitado para esta conta
        '404':
          description: >-
            Subconta não encontrada (não vinculada, inexistente, ou id do
            próprio master)
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    example: 404
                  message:
                    type: string
                    example: Subconta não encontrada
      security:
        - basic: []
        - bearer: []
components:
  schemas:
    SubAccountFeesInfo:
      type: object
      properties:
        merchant:
          type: object
          description: Dados cadastrais da subconta
          properties:
            id:
              type: string
              description: Id (KSUID) da subconta
              example: 2v2TGGb4NHTQWCiMmnelz2WVOZP
            legalName:
              type: string
              description: Razão social
              example: ACME PAGAMENTOS DIGITAIS LTDA
            companyTaxId:
              type: string
              description: CNPJ (somente dígitos, 14 caracteres)
              example: '12345678000190'
        fees:
          type: array
          description: >-
            Linhas de taxa próprias da subconta (lista plana, ordenada por

            tipo/método/moeda/bandeira). Array vazio quando a subconta não
            possui

            taxas próprias configuradas.
          items:
            type: object
            properties:
              feeType:
                type: string
                enum:
                  - tx_spread
                  - anticipation
                description: >-
                  Tipo da taxa: tx_spread (transacional) ou anticipation
                  (antecipação)
                example: tx_spread
              paymentMethod:
                type: string
                nullable: true
                description: >-
                  Método de pagamento (ex.: credit_card, pix, qrcode). null para
                  taxas sem método associado.
                example: credit_card
              currencyCode:
                type: string
                nullable: true
                description: >-
                  Código da moeda (ISO 4217, ex.: BRL, USD). null quando não se
                  aplica.
                example: BRL
              brand:
                type: string
                nullable: true
                description: >-
                  Bandeira do cartão (visa, mastercard, elo). null representa a
                  taxa padrão (vale para qualquer bandeira sem override).
                example: visa
              definition:
                type: object
                properties:
                  fixed:
                    type: number
                    description: Taxa fixa por transação, na moeda do item.
                    example: 0.5
                  percentages:
                    type: array
                    items:
                      type: number
                    description: >-
                      Taxa percentual por parcela: índice 0 = à vista (1x) …
                      índice 11 = 12x. Um único valor para taxas sem
                      parcelamento.
                    example:
                      - 2.99
                      - 3.49
                      - 3.99
                      - 4.49
                      - 4.99
                      - 5.49
                      - 5.99
                      - 6.49
                      - 6.99
                      - 7.49
                      - 7.99
                      - 8.49
  securitySchemes:
    basic:
      type: http
      scheme: basic
      description: |-
        HTTP Basic authentication. Use your secret key as the
        username and an empty string as password. The API key
        should be base64 encoded in the format 'username:' when
        sending the Authorization header.
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |-
        JWT Bearer token authentication. Use the JWT token obtained
        from the login endpoint in the Authorization header as 'Bearer {token}'.

````