NYYU Logo
APIDeposit

Create Crypto Payment for Deposit Into the Wallet

Generate a cryptocurrency deposit address to fund your wallet with blockchain-based assets

Create Crypto Payment for Deposit

Generate a cryptocurrency deposit address to fund your wallet with blockchain-based assets

Overview

The createChargeForDeposit mutation allows users to create a cryptocurrency payment for depositing funds into their wallet. This endpoint generates a unique deposit address on the specified blockchain network, enabling users to send crypto assets directly to their wallet. The transaction is tracked and credited once confirmed on the blockchain.

🔧 Mutation Schema

createChargeForDeposit(
  coin: String!,
  network: String!,
  cryptoType: String!
): CoinpaymentDepositTransaction

Parameters

coinRequired

Type: String

The cryptocurrency to deposit (e.g., "BTC", "ETH", "USDT"). This determines which coin will be accepted for the deposit.

networkRequired

Type: String

The blockchain network to use (e.g., "ERC20", "BEP20", "SOL", "Bitcoin"). Ensure you select the correct network to avoid loss of funds.

cryptoTypeRequired

Type: String

The type of cryptocurrency being deposited (e.g., "Bitcoin", "Ethereum", "Tether"). This should match the coin parameter.

Return Value

CoinpaymentDepositTransaction

The mutation returns a CoinpaymentDepositTransaction object with the following fields:

txnIdUnique transaction identifier
userIdThe ID of the user making the deposit
coinThe cryptocurrency being deposited
networkThe blockchain network used
depositAddressThe generated address where funds should be sent
statusCurrent transaction status
createdAtTimestamp when the deposit address was created
updatedAtTimestamp of the last update

Example Usage

Example Mutation

The following example demonstrates how to create a Bitcoin deposit address on the Bitcoin network:

mutation {
  createChargeForDeposit(
    coin: "BTC",
    network: "Bitcoin",
    cryptoType: "Bitcoin"
  ) {
    txnId
    userId
    coin
    network
    cryptoType
    depositAddress
    status
    createdAt
    updatedAt
  }
}

Example Response

{
  "data": {
    "createChargeForDeposit": {
      "txnId": "TXN_123456789",
      "userId": 12345,
      "coin": "BTC",
      "network": "Bitcoin",
      "cryptoType": "Bitcoin",
      "depositAddress": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
      "status": "pending",
      "createdAt": "2024-01-15T10:30:00Z",
      "updatedAt": "2024-01-15T10:30:00Z"
    }
  }
}

Use Cases

🔗

Blockchain Deposits

Enable users to deposit funds directly from their cryptocurrency wallets to the platform wallet.

🌐

Multi-Network Support

Accept deposits across multiple blockchain networks like ERC20, BEP20, and native chains.

Instant Address Generation

Quickly generate unique deposit addresses for each transaction to improve tracking and security.

🔐

Secure Transactions

Leverage blockchain technology for transparent, immutable, and secure deposit transactions.

Network Compatibility

Supported Networks

ERC20

Ethereum-based tokens (USDT, USDC, etc.)

BEP20

Binance Smart Chain tokens

Bitcoin

Native Bitcoin blockchain

SOL

Solana blockchain network

Important Notes

Critical Warning

Always verify that you're sending funds to the correct network. Sending cryptocurrency to an address on the wrong network will result in permanent loss of funds. For example, sending ERC20 USDT to a BEP20 address will cause the funds to be lost.

Confirmation Times

Cryptocurrency deposits require blockchain confirmations before being credited to your wallet. Confirmation times vary by network:

  • Bitcoin: ~10-60 minutes (1-6 confirmations)
  • Ethereum: ~5-15 minutes (12-35 confirmations)
  • BSC: ~3-5 minutes (15-20 confirmations)
  • Solana: ~30 seconds (32 confirmations)

💡 Best Practices

  • Double-check the network before sending funds to avoid irreversible losses
  • Store the deposit address and txnId for tracking purposes
  • Display the deposit address as both text and QR code for easier copying
  • Inform users about minimum deposit amounts and network fees
  • Implement status polling to notify users when deposits are confirmed