Wallet Query & Withdrawal

In the DogPay PAAS ecosystem, once a user's payment order is settled, the funds will enter your Crypto Wallet. This guide will show you how to query your available balance and withdraw funds to your specified external on-chain addresses.

🔍 1. Query Wallets & Available Balance

Before executing an on-chain withdrawal, you must first obtain the unique id of the corresponding wallet and confirm that its available balance (available) is sufficient.

You can call the Get Wallet List endpoint to retrieve your asset status.

Request Parameters Overview

This is a GET request, supporting the following common query parameters:

  • currency: Filter by cryptocurrency (e.g., USDT, USDC).
  • nickname: Filter by the alias you set when creating the wallet.

📦 Complete Response Example

The data array in the response will contain your basic wallet information along with the core balance.available field.

{
    "code": 0,
    "message": "success",
    "timestamp": 1712350000,
    "data": [
        {
            "id": "1234567890",
            "nickname": "USDT Wallet",
            "currency": "USDT",
            "balance": {
                "id": "bal_00123",
                "available": "5000.50"
            },
            "callId": "req_init_001"
        }
    ]
}

Note: Please securely save the wallet id returned here (e.g., "1234567890"), as it will be passed as the cryptoWalletId in the subsequent withdrawal endpoint.


⛽ 2. Estimate Withdrawal Fee

Since on-chain transfers require paying miner fees (Gas Fee) to the blockchain network, we strongly recommend calling the Estimate Withdrawal Fee endpoint to get real-time network fee estimates before initiating a formal withdrawal.

📦 Complete Request Example

{
    "cryptoWalletId": "1234567890",
    "currencyConfigId": "config_eth_usdt_001",
    "address": "0xB0a2821fAa9AD8c08D2764EAF85C414518137620",
    "amount": 1000.00
}

📦 Complete Response Example

{
    "code": 0,
    "message": "success",
    "timestamp": 1712350500,
    "data": {
        "feeAmount": "2.50",
        "currency": "USDT",
        "estimateNetworkTime": 300
    }
}

🚀 3. Initiate On-Chain Withdrawal

After confirming the balance and fees, you can call the Initiate Withdrawal endpoint to extract stablecoins to your external cold wallet, exchange, or a user's address.

📘

Business Use Cases

The withdrawal endpoint is not only suitable for merchants' daily profit payouts. When you need to process user chargebacks or refund requests, you can also call this endpoint to directly remit the corresponding funds back to the user's original payment address, thereby completing the reverse return of funds flexibly and efficiently.

🚧

KYT Risk Review

When initiating a withdrawal, you can directly pass in any valid external on-chain address. To ensure compliance and fund security, the DogPay system will conduct a real-time KYT (Know Your Transaction) review on the target address. If the address hits high-risk or black-market address databases, the system's risk control engine will intercept or freeze the withdrawal request.

🛠️ Core Parameters Overview

ParameterRequiredDescription
callIdYesA unique request ID generated by your business system, used to ensure request Idempotency.
cryptoWalletIdYesThe ID of the crypto wallet to be deducted (obtained in Step 1).
currencyConfigIdYesThe combined configuration ID for the chain and currency, which determines through which public chain the funds will be remitted.
addressYesThe receiving external on-chain wallet address.
amountYesThe amount you plan to withdraw.

📦 Complete Request Example

{
    "callId": "withdraw_req_1712360000",
    "cryptoWalletId": "1234567890",
    "currencyConfigId": "config_eth_usdt_001",
    "address": "0xB0a2821fAa9AD8c08D2764EAF85C414518137620",
    "amount": 1000.00
}

📦 Complete Response Example

{
    "code": 0,
    "message": "success",
    "timestamp": 1712360005,
    "data": {
        "id": "wd_8899aabbccdd",
        "status": "processing",
        "createdAt": "2026-04-15T14:24:00Z"
    }
}

🔗 4. Track Withdrawal Status

On-chain block generation and network confirmation take some time. The status synchronously returned by the withdrawal endpoint is usually processing. You can track whether the withdrawal has ultimately been completed by listening to withdrawal-related Webhook events or polling the query endpoint.