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

# Criar saque PIX



## OpenAPI

````yaml /reference/openapi.json post /v1/payouts
openapi: 3.1.0
info:
  title: SwytchPay API
  version: 0.1.0
  description: 'Gateway de pagamentos multi-provedor (PIX). Auth: x-api-key + x-api-secret.'
servers:
  - url: https://api.swytchpay.app
security: []
paths:
  /v1/payouts:
    post:
      tags:
        - Payouts
      summary: Criar saque PIX
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PayoutCreate'
      responses:
        '200':
          description: external_id repetido — retorna o existente (idempotente)
          content:
            application/json:
              schema:
                type: object
                properties:
                  payout:
                    $ref: '#/components/schemas/Payout'
                required:
                  - payout
        '201':
          description: Saque criado
          content:
            application/json:
              schema:
                type: object
                properties:
                  payout:
                    $ref: '#/components/schemas/Payout'
                required:
                  - payout
components:
  schemas:
    PayoutCreate:
      type: object
      properties:
        amount_cents:
          type: integer
          minimum: 0
          exclusiveMinimum: true
        external_id:
          type: string
          minLength: 1
          maxLength: 120
        pix_key:
          type: string
          minLength: 3
        pix_key_type:
          type: string
          enum:
            - cpf
            - cnpj
            - email
            - phone
            - random
        recipient:
          type: object
          properties:
            name:
              type: string
              minLength: 3
              maxLength: 64
            document:
              type: string
              minLength: 11
            email:
              type: string
              maxLength: 255
            phone:
              type: string
              maxLength: 20
          required:
            - name
            - document
        kind:
          type: string
          enum:
            - PLAYER_PAYOUT
            - SETTLEMENT
        enforce_ownership:
          type: boolean
      required:
        - amount_cents
        - external_id
        - pix_key
        - pix_key_type
        - recipient
    Payout:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
          enum:
            - payout
        external_id:
          type: string
        status:
          type: string
          enum:
            - PENDING
            - PROCESSING
            - PAID
            - FAILED
            - REJECTED
        amount_cents:
          type: integer
        fee_cents:
          type: integer
        pix_key:
          type: string
        pix_key_type:
          type: string
          enum:
            - cpf
            - cnpj
            - email
            - phone
            - random
        recipient:
          type: object
          properties:
            name:
              type: string
            document:
              type: string
          required:
            - name
            - document
          additionalProperties:
            nullable: true
        kind:
          type: string
          enum:
            - PLAYER_PAYOUT
            - SETTLEMENT
        e2e_id:
          type: string
          nullable: true
        failure_reason:
          type: string
          nullable: true
        failure_message:
          type: string
          nullable: true
        environment:
          type: string
          enum:
            - live
            - test
      required:
        - id
        - object
        - external_id
        - status
        - amount_cents
        - fee_cents
        - pix_key
        - pix_key_type
        - recipient
        - kind
        - e2e_id
        - failure_reason
        - failure_message
        - environment
      additionalProperties:
        nullable: true

````