跳转到主要内容

创建提款

POST /api/v2/savings/withdrawal
{
  "source": {
    "savingsAccountId": "savings-id"
  },
  "destination": {
    "savingsAccountId": "savings-id",
    "externalAccountId": "bank-or-wallet-id"
  },
  "amount": 1000,
  "comment": "提款到银行"
}

示例

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: '用户提款'
      })
    }
  );
  
  return await response.json();
};

处理时间

  • 到银行(ACH): 1-3 个工作日
  • 到银行(电汇): 当天
  • 到加密货币: 5-30 分钟

下一步

交易历史

查看储蓄 API 文档