Pular para o conteúdo

Saques (Cashout)

Endpoints para solicitar cashouts (saques) via Pix e consultar seu status.

Método Endpoint Descrição
POST /api/withdrawals Solicita um cashout Pix
GET /api/withdrawals Consulta cashouts (filtros: magic_id, status, external_ref, end_to_end, limit, resend)

POST /api/withdrawals

Headers obrigatórios: Content-Type, x-api-key, x-token, idempotency-key. Header opcional: x-timezone.

Campo Tipo Descrição
amount number Valor do saque (em BRL)
description string Descrição do saque (opcional)
requester.name string Nome do recebedor
requester.key string Chave Pix de destino
requester.key_type string Tipo da chave: cpf, cnpj, email, phone ou evp
transfer_method string Método de transferência — Pix
external_ref string Sua referência externa (opcional)

O formato da key deve corresponder ao key_type — veja Formatos de Chave Pix.

POST /api/withdrawals — key_type: cpf
curl --request POST \
--url https://api.simpixpagamentos.com/api/withdrawals \
--header 'Content-Type: application/json' \
--header 'x-api-key: <API_KEY>' \
--header 'x-token: <TOKEN>' \
--header 'x-timezone: America/Sao_Paulo' \
--header 'idempotency-key: <UNIQUE_KEY>' \
--data '{
"amount": 3.00,
"description": "Withdrawing",
"requester": {
"name": "John Doe",
"key": "95876150096",
"key_type": "cpf"
},
"transfer_method": "Pix",
"external_ref": "Zc1ULDLzSYjMpolha11g3"
}'

O saque nasce com status CREATED e informa a fee cobrada:

201 — Withdrawal created
{
"code": 201,
"content": {
"magic_id": "wth_03UdoKvLNLHg",
"fee": 0.15,
"amount": 3.00,
"currency": "BRL",
"status": "CREATED",
"transfer_method": "Pix",
"external_ref": "Zc1ULDLzSYjMpolha11g3",
"created_at": "2025-02-19T17:15:25.688Z",
"updated_at": "2025-02-19T17:15:26.703Z"
},
"message": "Withdrawal created",
"timestamp": "2025-02-19T17:15:26.703Z"
}

GET /api/withdrawals

Parâmetros de query disponíveis:

Parâmetro Descrição
magic_id Identificador do saque na SimPix
status Filtra por status (ex.: CREATED)
external_ref Filtra pela sua referência externa
end_to_end Filtra pelo identificador end-to-end do Pix
limit Quantidade máxima de resultados
resend true para reenviar o webhook do saque
GET /api/withdrawals — Listar
curl --request GET \
--url 'https://api.simpixpagamentos.com/api/withdrawals?limit=20' \
--header 'x-api-key: <API_KEY>' \
--header 'x-token: <TOKEN>' \
--header 'x-timezone: America/Sao_Paulo'
GET /api/withdrawals — Por magic_id
curl --request GET \
--url 'https://api.simpixpagamentos.com/api/withdrawals?magic_id=9Wlp_2kGy4t9' \
--header 'x-api-key: <API_KEY>' \
--header 'x-token: <TOKEN>' \
--header 'x-timezone: America/Sao_Paulo'
GET /api/withdrawals — Múltiplos filtros
curl --request GET \
--url 'https://api.simpixpagamentos.com/api/withdrawals?magic_id=9Wlp_2kGy4t9&status=CREATED&external_ref=Zc1ULDLzSYjMpolha11g3&end_to_end=E607894312025071873189DAHJSKH12&limit=20' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <API_KEY>' \
--header 'x-token: <TOKEN>' \
--header 'x-timezone: America/Sao_Paulo'
GET /api/withdrawals — Com reenvio de webhook
curl --request GET \
--url 'https://api.simpixpagamentos.com/api/withdrawals?magic_id=9Wlp_2kGy4t9&resend=true' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <API_KEY>' \
--header 'x-token: <TOKEN>' \
--header 'x-timezone: America/Sao_Paulo'