Solicita saque via PIX para uma chave de destino, com callback de atualização.
/api/withdrawals/withdraw
| Parâmetro | Tipo | Descrição |
|---|---|---|
| amount * | number | Valor do saque. |
| external_id * | string | ID único no seu sistema. |
| pix_key * | string | Chave PIX do destinatário. |
| key_type * | string | CPF, CNPJ, EMAIL, PHONE. |
| clientCallbackUrl * | string | URL para notificação de status. |
| description | string | Descrição do saque. |
| gateway | string | Gateway opcional. |
curl -X POST 'https://api.vexuspay.com/api/withdrawals/withdraw' \
--header 'Authorization: Bearer SEU_JWT' \
--header 'Content-Type: application/json' \
--data '{
"amount": 25,
"external_id": "saque-001",
"pix_key": "cliente@email.com",
"key_type": "EMAIL",
"description": "Saque do usuário",
"clientCallbackUrl": "https://seusistema.com/webhooks/withdraw"
}'
{
"message": "Withdrawal processed successfully.",
"transactionId": "54345",
"withdrawal": {
"transaction_id": "54345",
"external_id": "saque-001",
"status": "PROCESSING",
"amount": 25,
"fee": 1.25,
"total": 26.25,
"type": "Withdrawal"
}
}