> ## 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 all submerchants

> Get all submerchants related to MerchantMaster



## OpenAPI

````yaml /api-reference/openapi.yaml get /v1/submerchants
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/submerchants:
    get:
      tags:
        - FastConnect
      summary: Get all submerchants
      description: Get all submerchants related to MerchantMaster
      parameters:
        - name: status
          in: query
          required: false
          description: Filters merchants by current status.
          schema:
            type: string
            enum:
              - active
              - inactive
              - pending
              - rejected
              - blocked
          example: active
        - name: companyTaxId
          in: query
          required: false
          description: Merchant tax identification number (e.g. CNPJ).
          schema:
            type: string
          example: '1234567890'
        - name: legalName
          in: query
          required: false
          description: Merchant legal (registered) name.
          schema:
            type: string
          example: Legal Name
        - name: tradeName
          in: query
          required: false
          description: Merchant trade or business name.
          schema:
            type: string
          example: Trade Name
        - name: createdAt
          in: query
          required: false
          description: Filters merchants created at a specific date.
          schema:
            type: string
            format: date
          example: '2021-01-01'
        - name: updatedAt
          in: query
          required: false
          description: Filters merchants last updated at a specific date.
          schema:
            type: string
            format: date
          example: '2021-01-01'
        - name: approvedAt
          in: query
          required: false
          description: Filters merchants approved at a specific date.
          schema:
            type: string
            format: date
          example: '2021-01-01'
        - name: rejectedAt
          in: query
          required: false
          description: Filters merchants rejected at a specific date.
          schema:
            type: string
            format: date
          example: '2021-01-01'
        - name: blockedAt
          in: query
          required: false
          description: Filters merchants blocked at a specific date.
          schema:
            type: string
            format: date
          example: '2021-01-01'
        - name: inactivatedAt
          in: query
          required: false
          description: Filters merchants inactivated at a specific date.
          schema:
            type: string
            format: date
          example: '2021-01-01'
        - name: currency
          in: query
          required: false
          description: Filters merchants by operating currency.
          schema:
            type: string
            example: BRL
        - name: page
          in: query
          description: Page number (starts at 1)
          required: false
          schema:
            type: integer
            example: 1
            default: 1
        - name: size
          in: query
          description: Number of items per page
          required: false
          schema:
            type: integer
            example: 20
            default: 10
        - name: orderBy
          in: query
          description: |-
            Order results by fields (comma-separated).
            Prefix with - for descending order.
          required: false
          schema:
            type: string
            example: legalName,-createdAt
      responses:
        '200':
          description: Successfully retrieved the list of submerchants
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedSubMerchantList'
        '401':
          description: Unauthorized - invalid credentials
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    example: 401
                  message:
                    type: string
                    example: Unauthorized
        '403':
          description: Forbidden - insufficient permissions
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    example: 403
                  message:
                    type: string
                    example: Forbidden
      security:
        - basic: []
components:
  schemas:
    PaginatedSubMerchantList:
      type: object
      properties:
        data:
          type: array
          description: Array of merchants in the current page
          items:
            $ref: '#/components/schemas/SubMerchant'
        page:
          type: integer
          description: Current page number
          example: 1
        pages:
          type: integer
          description: Total number of pages available
          example: 10
        total:
          type: integer
          description: Total number of charges across all pages
          example: 100
        size:
          type: integer
          description: Number of charges per page
          example: 10
    SubMerchant:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the merchant.
          example: 36OO3bcGjhPjjF3tzrqOGcmQuKo
        tradeName:
          type: string
          description: Merchant trade name.
          example: ACME
        legalName:
          type: string
          description: Merchant legal name.
          example: ACME Corp
        companyTaxId:
          type: string
          description: Merchant tax identification number.
          example: '12345678000199'
        averageMonthlyRevenue:
          type: number
          description: Average monthly revenue (decimal as string).
          example: 5000
        averageOrderValue:
          type: number
          description: Average order value (decimal as string).
          example: 100
        productType:
          type: string
          enum:
            - digital
            - physical
            - both
          description: Type of product sold by the merchant.
          example: digital
        website:
          type: string
          format: uri
          description: Merchant website URL.
          example: https://google.com
        gatewayId:
          type: string
          description: Gateway identifier linked to the merchant.
          example: 36O08tjxJCxtEFApVPyWbryktP3
        approvedAt:
          type: string
          format: date-time
          nullable: true
          description: Date when the merchant was approved.
          example: '2025-12-04T20:02:51.762Z'
        inactivatedAt:
          type: string
          format: date-time
          nullable: true
          description: Date when the merchant was inactivated.
          example: null
        status:
          type: string
          enum:
            - active
            - pending
            - pre_approved
            - correcting
            - inactive
            - rejected
            - blocked
          description: Current merchant status.
          example: active
        metrics:
          type: object
          description: >-
            Aggregated metrics of the sub-account (returned by GET
            /v1/submerchants/{id}).
          properties:
            totalVolume:
              type: number
              description: >-
                Total charge volume of the sub-account (sum of charge amounts),
                in reais.
              example: 15000
            splitBalance:
              type: number
              description: Total split amount received by this sub-account, in reais.
              example: 450
            splitRate:
              type: number
              description: Average split percentage applied to the sub-account.
              example: 3
        contactEmail:
          type: string
          format: email
          description: Merchant contact email.
          example: contact@merchant.com
        productDescription:
          type: string
          description: Description of products or services offered.
          example: We sell electronic gadgets and accessories.
        softDescriptor:
          type: string
          nullable: true
          description: Soft descriptor shown on card statements.
          example: null
        createdAt:
          type: string
          format: date-time
          description: Merchant creation timestamp.
          example: '2025-12-04T18:45:52.988Z'
        totalSales:
          type: number
          description: Total number of sales for the merchant.
          example: 0
  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.

````