Confirm PayPal Withdrawal Request
Admin approval or denial of PayPal withdrawal requests with 2FA
Confirm PayPal Withdrawal Request
Approve or deny PayPal withdrawal requests with 2FA verification
ADMIN Only
Overview
The confirmPaypalWithdraw mutation allows administrators to approve or deny PayPal 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
confirmPaypalWithdraw(
  id: Int!,
  status: Int!,
  deniedReason: String,
  code: String!
): IntParameters
idInt! RequiredThe unique ID of the PayPal 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: "PayPal email not verified", "Suspicious activity detected", "Account limitations"
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 {
  confirmPaypalWithdraw(
    id: 123,
    status: 1,
    code: "654321"
  )
}{
  "data": {
    "confirmPaypalWithdraw": 1
  }
}mutation {
  confirmPaypalWithdraw(
    id: 124,
    status: 2,
    deniedReason: "PayPal account email does not match user verification records",
    code: "654321"
  )
}{
  "data": {
    "confirmPaypalWithdraw": 2
  }
}Implementation Example
async function reviewPayPalWithdrawal(
  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 ConfirmPayPal(
        $id: Int!,
        $status: Int!,
        $deniedReason: String,
        $code: String!
      ) {
        confirmPaypalWithdraw(
          id: $id,
          status: $status,
          deniedReason: $deniedReason,
          code: $code
        )
      }
    `, {
      id: requestId,
      status: approve ? 1 : 2,
      deniedReason: approve ? null : denialReason,
      code: twoFactorCode
    });
    if (approve) {
      console.log('✅ PayPal withdrawal approved');
      // Trigger PayPal payout
      await processPayPalPayout(requestId);
    } else {
      console.log('❌ PayPal withdrawal denied');
    }
    return result.confirmPaypalWithdraw;
  } catch (error) {
    console.error('PayPal withdrawal confirmation failed:', error);
    throw error;
  }
}Best Practices
Confirm PayPal email matches user's verified contact information
Verify the PayPal account is active and can receive payments
Ensure user has completed required KYC/verification for withdrawal amount
PayPal withdrawals can be processed quickly - aim for same-day approval when possible
Related Operations
Send Confirmation Code
Request 2FA SMS code for approval (ADMIN)
PayPal Withdrawal Request
User operation to request PayPal withdrawal
Confirm Crypto Withdrawal
Approve/deny crypto withdrawals (ADMIN)
Withdrawal Overview
Complete withdrawal API documentation