Pular para o conteúdo principal

Criando Saque

POST /api/v2/savings/withdrawal
{
  "source": {
    "savingsAccountId": "savings-id"
  },
  "destination": {
    "savingsAccountId": "savings-id",
    "externalAccountId": "bank-ou-wallet-id"
  },
  "amount": 1000,
  "comment": "Saque para banco"
}

Exemplo

const withdraw = async (savingsAccountId, destinationAccountId, amount) => {
  const response = await fetch(
    'https://teste-94u93qnn.uc.gateway.dev/api/v2/savings/withdrawal',
    {
      method: 'POST',
      headers: {
        'Authorization': `Bearer ${token}`
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        source: {
          savingsAccountId: savingsAccountId
        },
        destination: {
          savingsAccountId: savingsAccountId,
          externalAccountId: destinationAccountId
        },
        amount: amount,
        comment: 'Saque do usuário'
      })
    }
  );
  
  return await response.json();
};

Tempos de Processamento

  • Para Banco (ACH): 1-3 dias úteis
  • Para Banco (Wire): Mesmo dia
  • Para Cripto: 5-30 minutos

Próximos Passos

Histórico de Transações

Veja a documentação da API de poupança