NYYU Logo
APIDeposit

Confirm Bank Deposit by Admin

Admin-only endpoint to verify and approve bank deposit transactions with SMS authentication

👨‍💼

Confirm Bank Deposit by Admin

Admin-only endpoint to verify and approve bank deposit transactions with SMS authentication

Admin Access Required

This endpoint is accessible only to users with ADMIN privileges. Regular users cannot access this mutation.

Overview

The confirmBankDeposit mutation allows administrators to confirm and approve bank deposit transactions initiated by users. This endpoint verifies the bank transfer details, validates the admin's identity through SMS verification, and credits the deposited funds to the user's wallet upon successful confirmation.

🔧 Mutation Schema

confirmBankDeposit(
  id: Int!,
  currencyCode: String!,
  amount: Float!,
  cryptoType: String!,
  code: String!
): BankDepositTransaction

Parameters

idRequired

Type: Int

The unique identifier of the bank deposit transaction to confirm. This ID is obtained from the deposit transaction list.

currencyCodeRequired

Type: String

The fiat currency code that the user paid in (e.g., "USD", "EUR", "GBP"). This should match the currency received in the bank account.

amountRequired

Type: Float

The amount that was deposited by the user. This should match the exact amount received in the bank transfer.

cryptoTypeRequired

Type: String

The type of cryptocurrency to be credited to the user's wallet (e.g., "USDT"). Note: This is currently a placeholder and may not be functional.

codeRequired

Type: String

The admin SMS verification code sent to the admin's registered phone number. This provides an additional layer of security for deposit confirmations.

Return Value

BankDepositTransaction

The mutation returns a BankDepositTransaction object with the following fields:

transactionIdUnique transaction identifier
userIdThe ID of the user who made the deposit
currencyCodeThe currency code of the deposit
amountThe confirmed deposit amount
cryptoTypeThe cryptocurrency type credited
statusUpdated transaction status (e.g., "confirmed")
createdAtTimestamp when the deposit was created
updatedAtTimestamp of the confirmation

Example Usage

Example Mutation

The following example demonstrates how an admin can confirm a bank deposit transaction:

mutation {
  confirmBankDeposit(
    id: 123,
    currencyCode: "USD",
    amount: 1000.0,
    cryptoType: "USDT",
    code: "123456"
  ) {
    transactionId
    userId
    currencyCode
    amount
    cryptoType
    status
    createdAt
    updatedAt
  }
}

Example Response

{
  "data": {
    "confirmBankDeposit": {
      "transactionId": "BDT_123",
      "userId": 456,
      "currencyCode": "USD",
      "amount": 1000.0,
      "cryptoType": "USDT",
      "status": "confirmed",
      "createdAt": "2024-01-15T10:30:00Z",
      "updatedAt": "2024-01-15T14:45:00Z"
    }
  }
}

Confirmation Workflow

Admin Confirmation Process

1
Review Pending Deposits

Admin queries unconfirmed bank deposit transactions using getUnconfirmedBankDepositTxns

2
Verify Bank Transfer

Admin checks the bank account to verify the transfer was received with the correct amount

3
Request SMS Code

Admin requests an SMS verification code to their registered phone number

4
Confirm Deposit

Admin calls this mutation with the transaction details and SMS code

5
Funds Credited

System credits the funds to the user's wallet and updates the transaction status

6
User Notification

User receives notification that their deposit has been confirmed and credited

Use Cases

Manual Verification

Verify bank transfers manually to ensure compliance and prevent fraudulent deposits.

📊

Reconciliation

Match user deposit requests with actual bank transfers received in the company account.

🔐

Secure Approval

Use SMS verification to ensure only authorized admins can approve deposit transactions.

📝

Audit Trail

Create comprehensive records of who approved each deposit and when it was confirmed.

Important Notes

SMS Verification Required

Each confirmation requires a valid SMS verification code. The admin must request and receive this code before attempting to confirm the deposit. Codes typically expire after a few minutes for security.

Amount Verification

Always verify that the amount parameter matches exactly what was received in the bank transfer. Mismatched amounts could lead to user disputes or financial discrepancies.

Transaction Finality

Once a bank deposit is confirmed, the transaction cannot be easily reversed. Ensure all details are verified before confirming the deposit.

💡 Best Practices

  • Always cross-reference the transaction ID with the bank transfer reference number
  • Verify the amount matches exactly, including any bank fees that may have been deducted
  • Check the user's identity and account status before confirming large deposits
  • Keep records of all bank statements and transfer confirmations for audit purposes
  • Process deposit confirmations within 24 hours to maintain good user experience
  • Implement a dual-approval system for deposits above a certain threshold

Get Unconfirmed Deposits

Retrieve all pending bank deposit transactions awaiting confirmation

getUnconfirmedBankDepositTxns

Create Bank Deposit

User endpoint to initiate a bank deposit request

bankForDeposit

Get Deposit by ID

Retrieve detailed information about a specific deposit transaction

getBankDepositTxnByIdByAdmin

Deny Deposit

Reject a bank deposit transaction if verification fails

denyBankWithdrawalRequest