NYYU Logo
APIWithdraw

Fiat Withdrawal Request

Withdraw fiat currency via international or domestic bank transfer

Fiat Withdrawal Request

Withdraw fiat currency to bank accounts via international or domestic transfer

USER Operation

Overview

The bankWithdrawRequest mutation allows users to request fiat currency withdrawals via bank transfer. This supports both international and domestic transfers with comprehensive banking details.

Manual Processing Required

This creates a withdrawal request that requires manual admin approval and bank transfer processing. It does not create automatic payouts.

GraphQL Schema

🏦
Mutation Schema
Submit bank withdrawal request
bankWithdrawRequest(
  targetCurrency: String!,
  amount: Float!,
  sourceToken: String!,
  mode: Int!,
  country: String!,
  holderName: String!,
  bankName: String!,
  accNumber: String!,
  metadata: String!,
  address: String!,
  postCode: String!,
  code: String!
): BankWithdrawRequest

Parameters

📋
Required Parameters
All fields are mandatory
targetCurrencyString!

The fiat currency to receive in your bank account

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

amountFloat!

The amount to withdraw in target currency

sourceTokenString!

The currency type to withdraw from your wallet (will be converted to target currency)

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

modeInt!

Transfer mode selection

1: International Transfer

2: Domestic Transfer

countryString!

Country where the bank is located

holderNameString!

Full name of the bank account holder (must match bank records)

bankNameString!

Official name of the bank institution

accNumberString!

Bank account number or IBAN

metadataString!

Additional banking information (SWIFT/BIC code, routing number, etc.)

Example: "SWIFT: CHASUS33, Routing: 021000021"

addressString!

Physical address of the account holder

postCodeString!

Postal/ZIP code of the address

codeString!

Email verification code from generateWithdraw mutation

Return Value

BankWithdrawRequest Object
Bank withdrawal request details
type BankWithdrawRequest {
  id: Int!
  userId: Int!
  targetCurrency: String!
  amount: Float!
  sourceToken: String!
  mode: Int!
  country: String!
  holderName: String!
  bankName: String!
  accNumber: String!
  metadata: String
  address: String!
  postCode: String!
  status: Int!
  createdAt: Float
  updatedAt: Float
}

Example Mutation

💻International Bank Withdrawal
mutation {
  bankWithdrawRequest(
    targetCurrency: "USD",
    amount: 1000.0,
    sourceToken: "BTC",
    mode: 1,
    country: "USA",
    holderName: "John Doe",
    bankName: "Bank of America",
    accNumber: "123456789",
    metadata: "SWIFT: BOFAUS3N, Routing: 026009593",
    address: "123 Main St, Anytown, CA",
    postCode: "12345",
    code: "123456"
  ) {
    id
    userId
    targetCurrency
    amount
    sourceToken
    mode
    status
    createdAt
  }
}
Example Response
{
  "data": {
    "bankWithdrawRequest": {
      "id": 12345,
      "userId": 789,
      "targetCurrency": "USD",
      "amount": 1000.0,
      "sourceToken": "BTC",
      "mode": 1,
      "status": 0,
      "createdAt": 1699564800000
    }
  }
}

Implementation Example

async function withdrawToBank(withdrawalDetails: BankWithdrawalParams) {
  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 verification code from user
    const verificationCode = await promptUserForCode();

    // Step 3: Submit bank withdrawal request
    const withdrawal = await client.request(gql`
      mutation BankWithdraw(
        $targetCurrency: String!,
        $amount: Float!,
        $sourceToken: String!,
        $mode: Int!,
        $country: String!,
        $holderName: String!,
        $bankName: String!,
        $accNumber: String!,
        $metadata: String!,
        $address: String!,
        $postCode: String!,
        $code: String!
      ) {
        bankWithdrawRequest(
          targetCurrency: $targetCurrency,
          amount: $amount,
          sourceToken: $sourceToken,
          mode: $mode,
          country: $country,
          holderName: $holderName,
          bankName: $bankName,
          accNumber: $accNumber,
          metadata: $metadata,
          address: $address,
          postCode: $postCode,
          code: $code
        ) {
          id
          status
          amount
          targetCurrency
          createdAt
        }
      }
    `, {
      ...withdrawalDetails,
      code: verificationCode
    });

    console.log('✅ Bank withdrawal request submitted');
    console.log('Request ID:', withdrawal.bankWithdrawRequest.id);

    return withdrawal.bankWithdrawRequest;

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

Transfer Modes

1
International Transfer

For withdrawals to banks in different countries

Requires SWIFT/BIC code
Longer processing time (3-5 business days)
May have higher fees
Currency conversion may apply
2
Domestic Transfer

For withdrawals within the same country

Routing number (US) or sort code (UK)
Faster processing (1-2 business days)
Lower fees
No currency conversion

Security Features

🔒Security Measures
📧
Email Verification

Verification code required from authenticated user's email

👨‍💼
Manual Admin Review

All bank withdrawals manually reviewed and approved by admins with 2FA

✍️
Name Verification

Account holder name must match verified user identity

🏦
Banking Details Validation

Bank account details verified for correctness and fraud prevention

Best Practices

Verify All Banking Details

Double-check account number, routing/SWIFT codes, and account holder name for accuracy

Choose Correct Transfer Mode

Select mode 1 for international or mode 2 for domestic transfers

Include Complete Metadata

Provide all necessary routing codes (SWIFT, BIC, routing number) in metadata field

Match Currency to Region

Ensure target currency matches your bank's country (USD for US banks, EUR for European banks, etc.)

⏱️
Allow Processing Time

Bank transfers require manual processing - allow 3-7 business days for completion

🏦
Manual Processing Required
Bank withdrawals require manual admin verification and transfer - expect longer processing times than crypto withdrawals