Skip to main content
GET
/
v1
/
withdrawal
/
{withdrawalId}
Get Withdrawal
curl --request GET \
  --url https://api.example.com/v1/withdrawal/{withdrawalId} \
  --header 'X-API-Key: <x-api-key>'
{
  "success": true,
  "data": {
    "withdrawalId": "<string>",
    "amount": "<string>",
    "currency": "<string>",
    "destinationAddress": "<string>",
    "status": "<string>",
    "transactionHash": "<string>",
    "feeAmount": "<string>",
    "metadata": {
      "netAmount": 123,
      "networkFee": 123,
      "serviceFee": 123,
      "confirmations": 123
    },
    "createdAt": "<string>",
    "processedAt": "<string>",
    "completedAt": "<string>",
    "description": "<string>",
    "failureReason": "<string>"
  },
  "message": "<string>",
  "statusCode": 123
}

Overview

This endpoint retrieves the current status and details of a withdrawal request, including transaction hash, confirmation status, and completion time. Use this endpoint to track the progress of your withdrawals.

Authentication

X-API-Key
string
required
Your InventPay API key Example: cmfnz7jei0005p54eekx4e6mb

Path Parameters

withdrawalId
string
required
The unique withdrawal identifier Example: "cmh789ghi012jkl"

Response

success
boolean
Indicates if the request was successful
data
object
Withdrawal details object
message
string
Success message Example: "Withdrawal retrieved successfully"
statusCode
number
HTTP status code Example: 200

Example Request

curl -X GET https://api.inventpay.io/v1/withdrawal/cmh789ghi012jkl \
  -H "X-API-Key: YOUR_API_KEY"

Example Response

200 - Pending Withdrawal
{
  "success": true,
  "data": {
    "withdrawalId": "cmh789ghi012jkl",
    "amount": "10",
    "currency": "USDT_BEP20",
    "destinationAddress": "0x1E3D6848dE165e64052f0F2A3dA8823A27CAc22D",
    "status": "PENDING",
    "feeAmount": "0.051",
    "metadata": {
      "netAmount": 9.949,
      "networkFee": 0.001,
      "serviceFee": 0.05
    },
    "createdAt": "2024-01-01T12:00:00.000Z",
    "description": "Monthly payout"
  },
  "message": "Withdrawal retrieved successfully",
  "statusCode": 200
}
200 - Processing Withdrawal
{
  "success": true,
  "data": {
    "withdrawalId": "cmh789ghi012jkl",
    "amount": "10",
    "currency": "USDT_BEP20",
    "destinationAddress": "0x1E3D6848dE165e64052f0F2A3dA8823A27CAc22D",
    "status": "PROCESSING",
    "transactionHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "feeAmount": "0.051",
    "metadata": {
      "netAmount": 9.949,
      "networkFee": 0.001,
      "serviceFee": 0.05,
      "confirmations": 5
    },
    "createdAt": "2024-01-01T12:00:00.000Z",
    "processedAt": "2024-01-01T12:05:00.000Z",
    "description": "Monthly payout"
  },
  "message": "Withdrawal retrieved successfully",
  "statusCode": 200
}
200 - Completed Withdrawal
{
  "success": true,
  "data": {
    "withdrawalId": "cmh789ghi012jkl",
    "amount": "10",
    "currency": "USDT_BEP20",
    "destinationAddress": "0x1E3D6848dE165e64052f0F2A3dA8823A27CAc22D",
    "status": "COMPLETED",
    "transactionHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "feeAmount": "0.051",
    "metadata": {
      "netAmount": 9.949,
      "networkFee": 0.001,
      "serviceFee": 0.05,
      "confirmations": 15
    },
    "createdAt": "2024-01-01T12:00:00.000Z",
    "processedAt": "2024-01-01T12:05:00.000Z",
    "completedAt": "2024-01-01T12:20:00.000Z",
    "description": "Monthly payout"
  },
  "message": "Withdrawal retrieved successfully",
  "statusCode": 200
}
200 - Failed Withdrawal
{
  "success": true,
  "data": {
    "withdrawalId": "cmh789ghi012jkl",
    "amount": "10",
    "currency": "USDT_BEP20",
    "destinationAddress": "0x1E3D6848dE165e64052f0F2A3dA8823A27CAc22D",
    "status": "FAILED",
    "feeAmount": "0.051",
    "failureReason": "Insufficient network funds for gas",
    "metadata": {
      "netAmount": 9.949,
      "networkFee": 0.001,
      "serviceFee": 0.05
    },
    "createdAt": "2024-01-01T12:00:00.000Z",
    "description": "Monthly payout"
  },
  "message": "Withdrawal retrieved successfully",
  "statusCode": 200
}
404 - Withdrawal Not Found
{
  "success": false,
  "error": "Withdrawal not found",
  "statusCode": 404
}
401 - Unauthorized
{
  "success": false,
  "error": "Invalid API key",
  "statusCode": 401
}

Withdrawal Status Lifecycle

StatusDescriptionNext Action
PENDINGWithdrawal queued for processingWait for system to process
PROCESSINGTransaction submitted to blockchainWait for confirmations
COMPLETEDTransaction confirmed on blockchainNo action needed
FAILEDWithdrawal failed, funds returnedCreate new withdrawal if needed

Tracking on Blockchain

Once a withdrawal is PROCESSING or COMPLETED, you can track it on the blockchain explorer:
NetworkExplorer URL
Bitcoinhttps://blockchair.com/bitcoin/transaction/{transactionHash}
Ethereumhttps://etherscan.io/tx/{transactionHash}
BSChttps://bscscan.com/tx/{transactionHash}
Litecoinhttps://blockchair.com/litecoin/transaction/{transactionHash}
Copy the transactionHash from the response and paste it into the appropriate blockchain explorer to see real-time confirmation status.

Failed Withdrawals

If a withdrawal fails:
  1. Funds are automatically returned to your available balance
  2. Check the failureReason to understand why it failed
  3. Resolve the issue (e.g., wait for network congestion to clear)
  4. Create a new withdrawal once the issue is resolved
Common failure reasons:
  • Network congestion (high gas prices)
  • Insufficient network funds for transaction
  • Invalid destination address
  • Blockchain network issues

Error Codes

Status CodeDescription
200Withdrawal retrieved successfully
404Withdrawal not found
401Invalid or missing API key
429Rate limit exceeded
500Internal server error