Approve Fiat Withdrawal Request
Admin approval of bank withdrawal after manual fund transfer
Approve Fiat Withdrawal Request
Confirm manual bank transfer completion with 2FA verification
ADMIN Only
Overview
The approveBankWithdrawRequest mutation allows administrators to approve bank withdrawal requests after manually transferring funds. Since bank transfers cannot be automated, admins must physically send the funds and then call this mutation to update the request status.
Manual Transfer Required
The admin must manually transfer funds to the specified bank account before calling this mutation to mark the request as approved.
GraphQL Schema
approveBankWithdrawRequest(
  id: Int!,
  code: String!
): IntParameters
idInt! RequiredThe unique ID of the bank withdrawal request to approve
codeString! RequiredAdmin 2FA verification code received via SMS from sendWithdrawConfirmCode
Return Value
IntReturns an integer indicating the updated status of the withdrawal request (typically 1 for approved).
Example Mutation
mutation {
  approveBankWithdrawRequest(
    id: 123,
    code: "654321"
  )
}{
  "data": {
    "approveBankWithdrawRequest": 1
  }
}Implementation Example
async function approveBankWithdrawal(requestId: number) {
  try {
    // Step 1: Verify funds have been manually transferred
    const confirmed = await confirmManualTransferComplete(requestId);
    if (!confirmed) {
      throw new Error('Funds must be transferred before approval');
    }
    // Step 2: Request 2FA code
    const codeRequest = await client.request(gql`
      mutation {
        sendWithdrawConfirmCode
      }
    `);
    if (!codeRequest.sendWithdrawConfirmCode) {
      throw new Error('Failed to send 2FA code');
    }
    console.log('✅ 2FA code sent to admin phone');
    // Step 3: Get 2FA code from admin
    const twoFactorCode = await promptAdminFor2FACode();
    // Step 4: Approve the withdrawal
    const result = await client.request(gql`
      mutation ApproveBank($id: Int!, $code: String!) {
        approveBankWithdrawRequest(
          id: $id,
          code: $code
        )
      }
    `, {
      id: requestId,
      code: twoFactorCode
    });
    console.log('✅ Bank withdrawal approved in system');
    // Step 5: Notify user
    await notifyUserOfApproval(requestId);
    return result.approveBankWithdrawRequest;
  } catch (error) {
    console.error('Bank withdrawal approval failed:', error);
    throw error;
  }
}Admin Workflow
sendWithdrawConfirmCode to receive SMS verificationapproveBankWithdrawRequest with 2FA code to update statusSecurity Features
All approvals require valid 2FA SMS verification code
Only users with ADMIN role can approve bank withdrawals
Admin must confirm funds were actually transferred before approval
All approvals logged with timestamp, admin identity, and transfer details
Best Practices
Always confirm funds were successfully sent before calling this mutation
Record bank transaction reference number for dispute resolution
Verify account number, routing codes, and account holder name match request
Send notification to user confirming transfer completion with expected arrival time
Inform users that bank transfers may take 3-7 business days to appear in their account
Related Operations
Send Confirmation Code
Request 2FA SMS code for approval (ADMIN)
Fiat Withdrawal Request
User operation to request bank withdrawal
Deny Bank Withdrawal
Deny bank withdrawal with reason (ADMIN)
Withdrawal Overview
Complete withdrawal API documentation