Confirm Crypto Withdrawal Request
Admin approval or denial of cryptocurrency withdrawal requests with 2FA
Confirm Crypto Withdrawal Request
Approve or deny cryptocurrency withdrawal requests with 2FA verification
ADMIN Only
Overview
The confirmCryptoWithdraw mutation allows administrators to approve or deny cryptocurrency withdrawal requests. This operation requires 2FA SMS verification for security.
Admin-Only Operation
This mutation is accessible only to users with ADMIN privileges and requires a valid 2FA SMS code.
GraphQL Schema
confirmCryptoWithdraw(
  id: Int!,
  status: Int!,
  deniedReason: String,
  code: String!
): IntParameters
idInt! RequiredThe unique ID of the cryptocurrency withdrawal request to confirm
statusInt! RequiredAction to take on the withdrawal request
1: Approve withdrawal
2: Deny withdrawal
deniedReasonString OptionalReason for denial (required if status is 2)
Examples: "Insufficient verification", "Suspicious activity", "Invalid wallet address"
codeString! RequiredAdmin 2FA verification code received via SMS from sendWithdrawConfirmCode
Return Value
IntReturns an integer indicating the updated status of the withdrawal request (1 for approved, 2 for denied).
Example Mutations
mutation {
  confirmCryptoWithdraw(
    id: 123,
    status: 1,
    code: "654321"
  )
}{
  "data": {
    "confirmCryptoWithdraw": 1
  }
}mutation {
  confirmCryptoWithdraw(
    id: 124,
    status: 2,
    deniedReason: "Wallet address does not match verification records",
    code: "654321"
  )
}{
  "data": {
    "confirmCryptoWithdraw": 2
  }
}Implementation Example
async function reviewCryptoWithdrawal(
  requestId: number,
  approve: boolean,
  denialReason?: string
) {
  try {
    // Step 1: 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 2: Get 2FA code from admin
    const twoFactorCode = await promptAdminFor2FACode();
    // Step 3: Confirm withdrawal
    const result = await client.request(gql`
      mutation ConfirmCrypto(
        $id: Int!,
        $status: Int!,
        $deniedReason: String,
        $code: String!
      ) {
        confirmCryptoWithdraw(
          id: $id,
          status: $status,
          deniedReason: $deniedReason,
          code: $code
        )
      }
    `, {
      id: requestId,
      status: approve ? 1 : 2,
      deniedReason: approve ? null : denialReason,
      code: twoFactorCode
    });
    if (approve) {
      console.log('✅ Crypto withdrawal approved');
      // Trigger blockchain transaction
      await processBlockchainWithdrawal(requestId);
    } else {
      console.log('❌ Crypto withdrawal denied');
    }
    return result.confirmCryptoWithdraw;
  } catch (error) {
    console.error('Withdrawal confirmation failed:', error);
    throw error;
  }
}Admin Workflow
sendWithdrawConfirmCode to receive SMS verificationconfirmCryptoWithdrawSecurity Features
All approvals/denials require valid 2FA SMS verification code
Only users with ADMIN role can confirm withdrawal requests
When denying, must provide clear reason for user transparency
All approvals/denials logged with timestamp and admin identity
Best Practices
Check that destination wallet address is valid for the specified network
Ensure user has completed required KYC/verification for withdrawal amount
When denying, give specific actionable reasons so users can resolve issues
Review and process withdrawal requests quickly to maintain good user experience
Related Operations
Send Confirmation Code
Request 2FA SMS code for approval (ADMIN)
Crypto Withdrawal Request
User operation to request crypto withdrawal
Confirm PayPal Withdrawal
Approve/deny PayPal withdrawals (ADMIN)
Withdrawal Overview
Complete withdrawal API documentation