Get Driver Wallets
Retrieve a paginated list of all driver wallets with optional currency filtering.
This endpoint requires admin authorization. Only non-company drivers are included in results.
GET /api/admin/wallets/drivers
Query Parameters
Filter wallets by currency code (e.g., SAR, EGP) or symbol. Optional.
Page number for pagination. Must be greater than 0.
Number of items per page. Must be between 1 and 100.
Response Fields
Array of driver wallet items
Driver’s full name (defaults to “غير معروف” if unavailable)
Wallet currency code (SAR, EGP, etc.)
Current available balance in wallet
Lifetime earnings from trips
Total commission deducted
Net profit (earnings - commission)
Timestamp of last wallet update
Total number of driver wallets matching the filter
Example Request
curl -X GET "https://api.masareagle.sa/api/admin/wallets/drivers?currency=SAR&page=1&pageSize=20" \
-H "Authorization: Bearer YOUR_ADMIN_TOKEN"
Example Response
{
"wallets": [
{
"userId": "driver_123",
"name": "أحمد محمد",
"phoneNumber": "+966501234567",
"currency": "SAR",
"walletBalance": 1250.50,
"totalEarnings": 15000.00,
"totalCommission": 1500.00,
"netProfit": 13500.00,
"lastUpdatedAt": "2026-03-10T10:30:00Z"
}
],
"totalCount": 45,
"page": 1,
"pageSize": 20,
"totalPages": 3
}
Deposit to Driver Wallet
Add funds to a driver’s wallet (admin operation).
POST /api/admin/drivers/{driverId}/wallet/deposit
Path Parameters
The driver’s unique user ID
Request Body
Amount to deposit. Must be positive.
Currency code (SAR, EGP, etc.) or symbol
Optional bank transfer or transaction reference number
Optional admin notes for this deposit
Response Fields
Indicates if deposit was successful
Success or error message in Arabic
Driver’s new wallet balance after deposit
Example Request
curl -X POST "https://api.masareagle.sa/api/admin/drivers/driver_123/wallet/deposit" \
-H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"amount": 500.00,
"currency": "SAR",
"transferReference": "TRF20260310001",
"notes": "Monthly bonus payment"
}'
Example Response
{
"success": true,
"message": "تم إيداع 500.00 SAR بنجاح",
"newBalance": 1750.50
}
A wallet deposit notification is automatically sent to the driver upon successful deposit.
Withdraw from Driver Wallet
Withdraw funds from a driver’s wallet (admin operation).
POST /api/admin/drivers/{driverId}/wallet/withdraw
Path Parameters
The driver’s unique user ID
Request Body
Amount to withdraw. Must be positive and not exceed wallet balance.
Currency code (SAR, EGP, etc.) or symbol
Optional bank transfer or transaction reference number
Optional admin notes for this withdrawal
Response Fields
Indicates if withdrawal was successful
Success or error message in Arabic
Driver’s new wallet balance after withdrawal
Example Request
curl -X POST "https://api.masareagle.sa/api/admin/drivers/driver_123/wallet/withdraw" \
-H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"amount": 1000.00,
"currency": "SAR",
"transferReference": "WD20260310001",
"notes": "Driver withdrawal request"
}'
Example Response
{
"success": true,
"message": "تم سحب 1000.00 SAR بنجاح",
"newBalance": 750.50
}
Error Response
{
"success": false,
"message": "رصيد غير كافي",
"newBalance": null
}
Withdrawals will fail if the amount exceeds the available wallet balance. A withdrawal notification is sent to the driver upon success.