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

# Create payout request

> Creates a payout request for a submerchant in the Fast Connect context.

The amount must be provided in reais (BRL), not cents (e.g., 100 for R$ 100.00).
Currency is always `BRL` for submerchants.
Destination is always PIX using the submerchant's CNPJ as key.



## OpenAPI

````yaml /api-reference/openapi.yaml post /v1/submerchants/{merchantId}/payout-requests
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/{merchantId}/payout-requests:
    post:
      tags:
        - FastConnect
      summary: Create payout request
      description: >-
        Creates a payout request for a submerchant in the Fast Connect context.


        The amount must be provided in reais (BRL), not cents (e.g., 100 for R$
        100.00).

        Currency is always `BRL` for submerchants.

        Destination is always PIX using the submerchant's CNPJ as key.
      parameters:
        - name: merchantId
          in: path
          required: true
          description: ID of the submerchant requesting the payout
          schema:
            type: string
            example: 2vorkDcXyvzifL63YX09S9VqcnI
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSubMerchantPayoutRequest'
      responses:
        '201':
          description: Payout request created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateSubMerchantPayoutRequestResponse'
        '401':
          description: Unauthorized - invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                statusCode: 401
                message: Unauthorized
        '403':
          description: Forbidden - Fast Connect is not enabled for this merchant
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                statusCode: 403
                message: Fast Connect not enabled.
        '404':
          description: Submerchant not found or does not belong to the merchant master
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                statusCode: 404
                message: SubMerchant not found
                error: Not Found
        '422':
          description: Unprocessable Entity - Business validations failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                submerchantInactive:
                  summary: Inactive submerchant
                  value:
                    statusCode: 422
                    message: SubMerchant is not active
                    error: Unprocessable Entity
                cnpjNotConfigured:
                  summary: CNPJ not configured
                  value:
                    statusCode: 422
                    message: SubMerchant CNPJ not configured
                    error: Unprocessable Entity
                feesNotConfigured:
                  summary: Payout fees not configured
                  value:
                    statusCode: 422
                    message: Payout fees not configured
                    error: Unprocessable Entity
                invalidAmount:
                  summary: Invalid amount
                  value:
                    statusCode: 422
                    message: amount must be a positive number
                    error: Unprocessable Entity
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                statusCode: 500
                message: Internal server error
      security:
        - bearer: []
components:
  schemas:
    CreateSubMerchantPayoutRequest:
      type: object
      required:
        - amount
      properties:
        amount:
          type: number
          description: >-
            Payout amount in reais (BRL). Accepts decimals (e.g., 100.50 = R$
            100.50). Minimum R$ 1.00.
          minimum: 1
          example: 100
      example:
        amount: 100
    CreateSubMerchantPayoutRequestResponse:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the created payout request
          example: 2vorkDcXyvzifL63YX09S9VqcnI
      example:
        id: 2vorkDcXyvzifL63YX09S9VqcnI
    ErrorResponse:
      type: object
      properties:
        statusCode:
          type: integer
          description: HTTP status code
          example: 422
        message:
          type: string
          description: Descriptive error message
          example: SubMerchant is not active
        error:
          type: string
          description: Error type
          example: Unprocessable Entity
  securitySchemes:
    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}'.

````