NYYU Logo
APIWithdraw

PayPal Withdraw Request

Fast and secure withdrawals directly to PayPal accounts

PayPal Withdraw Request

Fast cryptocurrency-to-fiat withdrawals directly to your PayPal account

USER Operation

Overview

The paypalWithdrawRequest mutation allows users to request withdrawals via PayPal. This provides a fast and convenient way to convert cryptocurrency to fiat currency in your PayPal account.

Admin Approval Required

This creates a withdrawal request that must be approved by an administrator before PayPal payout is processed.

GraphQL Schema

💳
Mutation Schema
Submit PayPal withdrawal request
paypalWithdrawRequest(
  email: String!,
  target: String!,
  amount: Float!,
  sourceToken: String!,
  code: String!
): PaypalWithdraw

Parameters

📋
Required Parameters
All fields are mandatory
emailString!

PayPal account email address to receive funds

Example: "user@example.com"

targetString!

Target fiat currency for PayPal payment

Examples: "USD", "EUR", "GBP", "CAD", "AUD"

amountFloat!

Amount to withdraw in target currency

sourceTokenString!

Cryptocurrency to withdraw from wallet (will be converted to target currency)

Examples: "BTC", "ETH", "USDT", "NYYU"

codeString!

Email verification code from generateWithdraw mutation

Return Value

PaypalWithdraw Object
PayPal withdrawal request details
type PaypalWithdraw {
  id: Int!
  userId: Int!
  email: String!
  target: String!
  amount: Float!
  sourceToken: String!
  status: Int!
  createdAt: Float
  updatedAt: Float
  deniedReason: String
}

Example Mutation

💻Withdraw $100 USD to PayPal
mutation {
  paypalWithdrawRequest(
    email: "user@example.com",
    target: "USD",
    amount: 100.0,
    sourceToken: "BTC",
    code: "123456"
  ) {
    id
    userId
    email
    target
    amount
    sourceToken
    status
    createdAt
    updatedAt
  }
}
Example Response
{
  "data": {
    "paypalWithdrawRequest": {
      "id": 12345,
      "userId": 789,
      "email": "user@example.com",
      "target": "USD",
      "amount": 100.0,
      "sourceToken": "BTC",
      "status": 0,
      "createdAt": 1699564800000,
      "updatedAt": 1699564800000
    }
  }
}

Implementation Example

async function withdrawToPayPal(
  email: string,
  amount: number,
  currency: string,
  sourceToken: string
) {
  try {
    // Step 1: Generate verification code
    const codeResult = await client.request(gql`
      mutation {
        generateWithdraw
      }
    `);

    if (codeResult.generateWithdraw !== 'Success') {
      throw new Error('Failed to generate verification code');
    }

    // Step 2: Get code from user
    const verificationCode = await promptUserForCode();

    // Step 3: Submit PayPal withdrawal
    const withdrawal = await client.request(gql`
      mutation PayPalWithdraw(
        $email: String!,
        $target: String!,
        $amount: Float!,
        $sourceToken: String!,
        $code: String!
      ) {
        paypalWithdrawRequest(
          email: $email,
          target: $target,
          amount: $amount,
          sourceToken: $sourceToken,
          code: $code
        ) {
          id
          status
          amount
          target
          createdAt
        }
      }
    `, {
      email,
      target: currency,
      amount,
      sourceToken,
      code: verificationCode
    });

    console.log('✅ PayPal withdrawal request submitted');
    return withdrawal.paypalWithdrawRequest;

  } catch (error) {
    console.error('❌ PayPal withdrawal failed:', error);
    throw error;
  }
}

Security Features

🔒Security Measures
📧
Email Verification

Verification code required from authenticated user's email

👨‍💼
Admin Review

All PayPal withdrawals reviewed and approved by admins with 2FA

✉️
PayPal Email Validation

PayPal email must be valid and associated with an active PayPal account

💰
Balance Verification

System verifies sufficient wallet balance before creating request

Best Practices

Verify PayPal Email

Ensure the PayPal email is correct and associated with an active verified PayPal account

Check Currency Support

Verify that PayPal supports the target currency in your region

Account for PayPal Fees

PayPal may charge receiving fees - check PayPal's fee structure for your region

Faster Processing

PayPal withdrawals typically process faster than bank transfers (1-3 business days)

💳
Fast & Convenient
PayPal withdrawals offer faster processing than bank transfers while maintaining security