HooPay Logo Developer API Docs

Transaction History API

Access unified transaction history across all deposits and withdrawals. Perfect for reporting, analytics, and monitoring.

📊 Unified Transaction View

The Transaction History API provides a consolidated view of all your partner transactions, combining both deposits (Pay User) and withdrawals (Collect From User) into a single, sortable feed.

Use these APIs to:

  • Build internal dashboards and reports
  • Track transaction volume and trends
  • Monitor specific users or transaction types
  • Export data for accounting and analytics
  • Get quick summary statistics

List Transactions

GET /transactions

Retrieve a paginated list of all your transactions (deposits and withdrawals) with powerful filtering options.

Query Parameters

Parameter Type Description
type string Filter: deposit, withdrawal, all (default: all)
status string Filter by status (e.g., completed, pending, failed)
user_wallet_id string Filter by user wallet ID (6-digit)
from_date date Start date (YYYY-MM-DD)
to_date date End date (YYYY-MM-DD)
per_page integer Results per page (1-100, default: 20)
page integer Page number (default: 1)

Example: All Transactions (Default)

cURL
curl https://hoopaywallet.com/api/v1/partner/transactions \
  -H "X-API-Key: hpk_live_your_key" \
  -H "X-Signature: your_hmac_signature"

Example: Only Completed Deposits

cURL
curl "https://hoopaywallet.com/api/v1/partner/transactions?type=deposit&status=completed" \
  -H "X-API-Key: hpk_live_your_key" \
  -H "X-Signature: your_hmac_signature"

Response 200 OK

{
  "success": true,
  "data": [
    {
      "type": "deposit",
      "id": "dep_abc123xyz",
      "reference_id": "ORDER-2025-001",
      "amount": 50.00,
      "currency": "USD",
      "status": "completed",
      "user_wallet_id": "310146",
      "description": "Trading profit payout",
      "created_at": "2025-01-28T10:30:00Z",
      "completed_at": "2025-01-28T10:31:00Z"
    },
    {
      "type": "withdrawal",
      "id": "pwd_xyz789abc",
      "reference_id": "WITHDRAWAL-456",
      "amount": 100.00,
      "fee_amount": 2.50,
      "net_amount": 97.50,
      "currency": "USD",
      "status": "completed",
      "user_wallet_id": "123456",
      "description": "User funding trading account",
      "created_at": "2025-01-28T09:15:00Z",
      "completed_at": "2025-01-28T09:16:00Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "last_page": 5,
    "per_page": 20,
    "total": 95
  }
}

Get Transaction Summary

GET /transactions/summary

Get aggregated statistics about your transactions including counts, totals, and fees collected.

Query Parameters

Parameter Type Description
from_date date Start date (YYYY-MM-DD)
to_date date End date (YYYY-MM-DD)

Example Request

cURL
curl "https://hoopaywallet.com/api/v1/partner/transactions/summary?from_date=2025-01-01&to_date=2025-01-31" \
  -H "X-API-Key: hpk_live_your_key" \
  -H "X-Signature: your_hmac_signature"

Response 200 OK

{
  "success": true,
  "data": {
    "deposits": {
      "count": 150,
      "total_amount": 15000.00,
      "pending_count": 5
    },
    "withdrawals": {
      "count": 85,
      "total_amount": 8500.00,
      "total_fees": 212.50,
      "pending_count": 2
    },
    "totals": {
      "transaction_count": 235,
      "volume": 23500.00,
      "fees_collected": 212.50
    }
  }
}

Common Use Cases

📊 Build Internal Dashboard

Create a real-time dashboard showing transaction activity:

// Get today's summary
GET /transactions/summary?from_date=2025-01-28&to_date=2025-01-28

// Display:
→ Total deposits: 50 ($5,000)
→ Total withdrawals: 25 ($2,500)
→ Pending transactions: 7
→ Fees collected: $62.50

📈 Monthly Reports

Generate monthly transaction reports for accounting:

// Get January summary
GET /transactions/summary?from_date=2025-01-01&to_date=2025-01-31

// Export to CSV
GET /transactions?from_date=2025-01-01&to_date=2025-01-31&per_page=100
→ Parse response and generate CSV
→ Include: date, type, amount, status, reference_id

🔍 User Activity Tracking

Monitor transactions for a specific user:

GET /transactions?user_wallet_id=310146

→ View all transactions with user 310146
→ Track deposits made to this user
→ Track withdrawals from this user
→ Calculate user lifetime value

⚠️ Failed Transaction Monitoring

Monitor and investigate failed transactions:

GET /transactions?status=failed

→ Identify patterns in failures
→ Alert operations team
→ Investigate root causes
→ Retry eligible transactions

Response Field Reference

Deposit Fields

Field Description
type Always "deposit" for deposit transactions
id HooPay deposit ID (starts with "dep_")
reference_id Your unique reference ID
amount Amount paid to user
status pending_settlement, pending_funding, processing, completed, failed, cancelled

Withdrawal Fields

Field Description
type Always "withdrawal" for withdrawal transactions
id HooPay withdrawal ID (starts with "pwd_")
reference_id Your unique reference ID
amount Amount collected from user
fee_amount Transaction fee charged
net_amount Amount credited to your merchant wallet (amount - fee)
status pending_authorization, pending, processing, completed, failed, cancelled, expired, refunded

Best Practices

  • Use date filters - Always specify date ranges to keep response sizes manageable.
  • Cache summary data - Summary statistics change infrequently. Cache for 5-10 minutes.
  • Handle both types - Your code should handle both deposit and withdrawal response formats.
  • Store transaction IDs - Store both our ID and your reference_id for easy lookup.
  • Use type filters - Separate queries for deposits vs withdrawals when building reports.