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

# Consultar saque

> Consulta um saque por ID com pagador, conta TurbofyPay e beneficiario do saque.

## Caso de uso

Use este endpoint para consultar os detalhes de um saque Pix especifico do merchant autenticado.

## Autenticacao

* `x-client-id`
* `x-client-secret`

## Request

Parametro principal:

* `id` (path): identificador Turbofy do saque.

## Response de sucesso

Em `200`, a API retorna o objeto do saque com:

* `payer`: merchant dono do saldo e pagador operacional do saque.
* `sourceAccount`: conta TurbofyPay do merchant, tratada como instituicao de pagamento.
* `beneficiary`: recebedor real do saque.
* `tracking`: identificadores usados para conciliacao Pix.

Exemplo parcial:

```json theme={null}
{
  "id": "withdrawal-1",
  "amountCents": 1690,
  "status": "COMPLETED",
  "provider": "PIX_GATEWAY",
  "payer": {
    "merchantId": "merchant-123",
    "name": "Loja Recebedora",
    "document": "12345678000195",
    "documentType": "CNPJ",
    "institution": "TurbofyPay",
    "account": {
      "institution": "TurbofyPay",
      "type": "Conta de pagamento",
      "holderName": "Loja Recebedora",
      "holderDocument": "12345678000195"
    }
  },
  "beneficiary": {
    "name": "Favorecido Teste",
    "document": "12345678901",
    "documentMasked": "123.***.***-01",
    "documentType": "CPF",
    "pixKey": "favorecido@example.com",
    "pixKeyMasked": "fa***om",
    "pixKeyType": "EMAIL",
    "account": {
      "institution": "Banco Destino",
      "branch": null,
      "account": null
    }
  },
  "tracking": {
    "providerTransferId": "wd-provider-1",
    "endToEndId": "E18236120260607183551695f8fa2a"
  },
  "createdAt": "2026-06-07T18:35:20.000Z",
  "processedAt": "2026-06-07T18:35:39.000Z"
}
```

## Erros comuns reais

| HTTP  | code                    | Quando ocorre                                  |
| ----- | ----------------------- | ---------------------------------------------- |
| `400` | `MERCHANT_ID_REQUIRED`  | Merchant nao resolvido na credencial.          |
| `400` | `INVALID_WITHDRAWAL_ID` | Identificador vazio ou invalido.               |
| `401` | `CREDENTIALS_REQUIRED`  | Credenciais ausentes.                          |
| `401` | `INVALID_CREDENTIALS`   | Credenciais invalidas.                         |
| `404` | `NOT_FOUND`             | Saque inexistente para o merchant autenticado. |

## Regras de negocio

* O saque so e retornado se pertencer a um usuario do merchant autenticado.
* A TurbofyPay aparece como instituicao da conta de pagamento do merchant, nao como beneficiario final.
* O beneficiario vem do snapshot persistido do saque; se o dado nao existir em saque antigo, a API retorna `null`.
* O endpoint nao retorna `rawPayload`, PDF base64, token ou nome real do fornecedor.

## Exemplo de codigo

```bash theme={null}
curl --request GET \
  --url https://api.turbofypay.com/sellers/saques/withdrawal-1 \
  --header "x-client-id: <client-id>" \
  --header "x-client-secret: <client-secret>"
```

## Proximos passos

1. Para obter a lista, use [Listar saques](/reference/saques/listar-saques).
2. Para baixar o PDF, use [Baixar comprovante de saque](/reference/comprovantes/baixar-comprovante-saque).


## OpenAPI

````yaml GET /sellers/saques/{id}
openapi: 3.0.3
info:
  title: Turbofy Public API
  version: 2.0.0
  description: >-
    Especificacao publica da API TurbofyPay para Cobranca PIX, Saques, Webhooks
    e Payouts.
  contact:
    name: Turbofy Team
    email: suporte@turbofy.com
    url: https://turbofy.com
  license:
    name: Proprietary
    url: https://turbofy.com/terms
servers:
  - url: http://localhost:3030
    description: Development Server
  - url: https://api.turbofypay.com
    description: Production Server
security: []
tags:
  - name: Cobranca PIX
    description: Operacoes de cobranca PIX para integradores.
  - name: Saques
    description: Operacoes de saque para sellers.
  - name: Webhooks
    description: Cadastro e consulta de webhooks.
  - name: Payouts
    description: Gestao de lotes de payout.
externalDocs:
  description: Documentação completa
  url: https://docs.turbofy.com
paths:
  /sellers/saques/{id}:
    get:
      tags:
        - Saques
      summary: Consultar saque
      description: >-
        Consulta os detalhes de um saque pelo identificador, restrito ao seller
        autenticado.
      operationId: getSaque
      parameters:
        - schema:
            type: string
            minLength: 1
            maxLength: 120
          in: path
          name: id
          required: true
          description: Identificador Turbofy do saque.
        - $ref: '#/components/parameters/XClientId'
        - $ref: '#/components/parameters/XClientSecret'
      responses:
        '200':
          description: Saque encontrado.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SaqueObject'
        '400':
          description: Merchant nao resolvido na credencial ou identificador invalido.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Credenciais ausentes ou invalidas.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Saque nao encontrado para o seller autenticado.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - clientCredentials: []
          clientSecret: []
components:
  parameters:
    XClientId:
      name: x-client-id
      in: header
      required: true
      schema:
        type: string
      description: Identificador do integrador.
    XClientSecret:
      name: x-client-secret
      in: header
      required: true
      schema:
        type: string
      description: Segredo de autenticacao do integrador.
  schemas:
    SaqueObject:
      type: object
      required:
        - id
        - amountCents
        - status
        - createdAt
        - payer
        - sourceAccount
        - beneficiary
        - tracking
      properties:
        id:
          type: string
        userId:
          type: string
        amountCents:
          type: integer
        feeCents:
          type: integer
        totalDebitedCents:
          type: integer
        status:
          type: string
        provider:
          type: string
          nullable: true
          description: >-
            Campo legado com valor generico PIX_GATEWAY quando houver gateway.
            Nao expõe fornecedor real.
        providerTransferId:
          type: string
          nullable: true
        providerEndToEndId:
          type: string
          nullable: true
        transferaTxId:
          type: string
          nullable: true
        failureReason:
          type: string
          nullable: true
        idempotencyKey:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
        processedAt:
          type: string
          format: date-time
          nullable: true
        payer:
          $ref: '#/components/schemas/SaquePayer'
        sourceAccount:
          $ref: '#/components/schemas/SaquePartyAccount'
        beneficiary:
          $ref: '#/components/schemas/SaqueBeneficiary'
        tracking:
          $ref: '#/components/schemas/SaqueTracking'
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
            details:
              type: object
              additionalProperties: true
            traceId:
              type: string
    SaquePayer:
      type: object
      nullable: true
      properties:
        merchantId:
          type: string
        name:
          type: string
          nullable: true
        email:
          type: string
          nullable: true
        document:
          type: string
          nullable: true
        documentType:
          type: string
          enum:
            - CPF
            - CNPJ
          nullable: true
        institution:
          type: string
          nullable: true
        account:
          $ref: '#/components/schemas/SaquePartyAccount'
    SaquePartyAccount:
      type: object
      properties:
        institution:
          type: string
          nullable: true
        type:
          type: string
          nullable: true
        holderName:
          type: string
          nullable: true
        holderDocument:
          type: string
          nullable: true
        branch:
          type: string
          nullable: true
        account:
          type: string
          nullable: true
    SaqueBeneficiary:
      type: object
      nullable: true
      properties:
        name:
          type: string
          nullable: true
        document:
          type: string
          nullable: true
        documentMasked:
          type: string
          nullable: true
        documentType:
          type: string
          enum:
            - CPF
            - CNPJ
          nullable: true
        pixKey:
          type: string
          nullable: true
        pixKeyMasked:
          type: string
          nullable: true
        pixKeyType:
          type: string
          enum:
            - CPF
            - CNPJ
            - EMAIL
            - PHONE
            - EVP
          nullable: true
        account:
          $ref: '#/components/schemas/SaquePartyAccount'
    SaqueTracking:
      type: object
      properties:
        providerTransferId:
          type: string
          nullable: true
        endToEndId:
          type: string
          nullable: true
  securitySchemes:
    clientCredentials:
      type: apiKey
      in: header
      name: x-client-id
      description: Client ID fornecido pela TurbofyPay.
    clientSecret:
      type: apiKey
      in: header
      name: x-client-secret
      description: Client Secret fornecido pela TurbofyPay.

````