Skip to content

Transaction Statistics

Retrieve statistics for transactions.

Endpoint

INFO

GET /api/v1/dashboard/transactions-stats

Headers

HeaderValueRequired
Acceptapplication/jsonYes
AuthorizationBearer {token}Yes

Query Parameters

ParameterTypeDefaultDescription
periodstringmonthPeriod: day, week, month, year

Example Request

bash
curl -X GET "https://api.daakey.com/api/v1/dashboard/transactions-stats?period=month" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"

Response

Success (200)

json
{
  "success": true,
  "message": "Transaction statistics retrieved",
  "data": {
    "summary": {
      "total_transactions": 500,
      "total_revenue": 75000.00,
      "total_refunds": 2500.00,
      "net_revenue": 72500.00
    },
    "by_type": {
      "charges": { "count": 450, "amount": 75000.00 },
      "deposits": { "count": 450, "amount": 90000.00 },
      "refunds": { "count": 50, "amount": 2500.00 },
      "deposit_returns": { "count": 440, "amount": 88000.00 }
    },
    "by_status": {
      "completed": 490,
      "pending": 5,
      "failed": 5
    },
    "by_day": [
      { "date": "2024-01-01", "revenue": 2500.00, "refunds": 100.00 },
      { "date": "2024-01-02", "revenue": 3000.00, "refunds": 0.00 }
    ],
    "payment_methods": {
      "visa": { "count": 300, "amount": 45000.00 },
      "mastercard": { "count": 150, "amount": 25000.00 },
      "amex": { "count": 50, "amount": 5000.00 }
    },
    "average_transaction": 166.67,
    "currency": "USD"
  },
  "request_id": "uuid",
  "timestamp": "2024-01-01T00:00:00.000Z"
}

Daakey Car Sharing Platform