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

# List payout methods with field metadata

> Returns payout method definitions (per country) including full field metadata for dynamic form rendering.
Each method includes an `enabled` flag derived from tenant configuration.

Use this endpoint to discover valid payout method IDs (`methods[].id`) and to learn which `details` keys are required
when creating payout accounts.




## OpenAPI

````yaml api/openapi.yaml get /api/v1/payout-methods
openapi: 3.1.0
info:
  title: MLM Platform API
  version: 1.0.0
  description: >
    The MLM Platform API enables tenant developers to integrate commission
    tracking,

    member management, and referral systems into their applications.


    ## Authentication

    All API requests require a tenant API key passed in the `x-tenant-api-key`
    header.


    ## Environments

    - **LIVE**: Production environment with real data

    - **SANDBOX**: Test environment for development and testing


    API keys are scoped to specific environments. Use sandbox keys for testing.


    The environment is derived from the API key used for the request.

    The platform returns the selected environment in the response header
    `X-Environment`.

    If you send an `X-Environment` request header, it is treated as
    optional/debug-only.
  contact:
    name: MLM Platform Support
    email: support@mlm-platform.example.com
  license:
    name: Proprietary
    url: https://mlm-platform.example.com/terms
servers:
  - url: https://app.mlm-platform.com
    description: Production API
  - url: http://localhost:3000
    description: Local Development
security:
  - TenantApiKey: []
tags:
  - name: Auth
    description: Token exchange, validation, refresh, and revocation for OIDC federation
  - name: Events
    description: Purchase and commission events
  - name: Users
    description: Member management
  - name: Leads
    description: Lead capture and tracking
  - name: Referrals
    description: Referral links and codes
  - name: Payout
    description: Payout methods metadata for dynamic payout setup forms
  - name: Payout Accounts
    description: Member payout accounts (create/list/update/delete)
  - name: KYC
    description: Member KYC start, status, and document submission
  - name: Admin KYC
    description: Admin KYC review queue, details, and actions
  - name: Widget
    description: Embeddable widget authentication
  - name: Webhooks
    description: Webhook receivers for third-party providers (Sumsub)
paths:
  /api/v1/payout-methods:
    get:
      tags:
        - Payout
      summary: List payout methods with field metadata
      description: >
        Returns payout method definitions (per country) including full field
        metadata for dynamic form rendering.

        Each method includes an `enabled` flag derived from tenant
        configuration.


        Use this endpoint to discover valid payout method IDs (`methods[].id`)
        and to learn which `details` keys are required

        when creating payout accounts.
      operationId: listPayoutMethods
      parameters:
        - name: country
          in: query
          required: true
          schema:
            type: string
            minLength: 2
            maxLength: 2
          description: ISO 3166-1 alpha-2 country code
      responses:
        '200':
          description: Payout methods for a country
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayoutMethodsResponse'
          headers:
            X-Environment:
              $ref: '#/components/headers/X-Environment'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: No payout methods for this country
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: No payout methods available for country
                code: NOT_FOUND
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    PayoutMethodsResponse:
      type: object
      required:
        - country
        - methods
      properties:
        country:
          type: string
        methods:
          type: array
          items:
            $ref: '#/components/schemas/PayoutMethodDefinition'
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message
        code:
          type: string
          description: Machine-readable error code
        details:
          type: object
          additionalProperties: true
          description: Additional error details
    PayoutMethodDefinition:
      type: object
      required:
        - id
        - name
        - category
        - provider
        - currency
        - enabled
        - fields
      properties:
        id:
          type: string
          description: Method ID to pass as `methodType` when creating a payout account
        name:
          type: string
          description: Display name for the payout method
        category:
          type: string
          description: High-level payout method category (bank account or e-wallet)
        provider:
          type: string
          description: Provider that handles this payout method
        currency:
          type: string
          description: ISO 4217 currency code used by this payout method
        enabled:
          type: boolean
          description: Whether the method is enabled for this tenant
        fields:
          type: array
          items:
            $ref: '#/components/schemas/FieldDefinition'
          description: Field definitions required for this payout method
    FieldDefinition:
      type: object
      required:
        - key
        - label
        - type
      properties:
        key:
          type: string
          description: The key to use inside the payout account `details` object
        label:
          type: string
          description: Human-readable label for UI display
        type:
          type: string
          description: Field type for UI rendering
        placeholder:
          type: string
          description: Optional placeholder text
        helpText:
          type: string
          description: Optional help text to guide end users
        validation:
          $ref: '#/components/schemas/FieldValidation'
        options:
          type: array
          items:
            $ref: '#/components/schemas/FieldOption'
          description: Options for select fields
    FieldValidation:
      type: object
      properties:
        required:
          type: boolean
          description: Whether the field must be provided
        minLength:
          type: integer
          description: Minimum string length
        maxLength:
          type: integer
          description: Maximum string length
        pattern:
          type: string
          description: Regular expression the value must match
    FieldOption:
      type: object
      required:
        - value
        - label
      properties:
        value:
          type: string
        label:
          type: string
  headers:
    X-Environment:
      description: >-
        Indicates the environment (LIVE or SANDBOX) the request was processed in
        (derived from API key)
      schema:
        type: string
        enum:
          - LIVE
          - SANDBOX
  responses:
    BadRequest:
      description: Bad Request - Invalid input
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Invalid request body
            code: VALIDATION_ERROR
            details:
              field: email
              message: Invalid email format
    Unauthorized:
      description: Unauthorized - Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missing_api_key:
              summary: Missing API key
              value:
                error: Authentication required
                code: UNAUTHORIZED
            invalid_api_key:
              summary: Invalid API key
              value:
                error: Invalid API key
                code: INVALID_API_KEY
    RateLimited:
      description: Too Many Requests - Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Rate limit exceeded. Try again in 60 seconds.
            code: RATE_LIMITED
      headers:
        Retry-After:
          description: Seconds until rate limit resets
          schema:
            type: integer
        X-RateLimit-Remaining:
          description: Remaining requests in the current window
          schema:
            type: integer
        X-RateLimit-Reset:
          description: Unix timestamp (seconds) when the rate limit window resets
          schema:
            type: integer
    InternalError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: An unexpected error occurred
            code: INTERNAL_ERROR
  securitySchemes:
    TenantApiKey:
      type: apiKey
      in: header
      name: x-tenant-api-key
      description: >
        Tenant API key for authentication. Keys are scoped to specific
        environments

        (LIVE or SANDBOX). Obtain keys from the admin dashboard.

````