Skip to main content

Overview

Admin wallet operations allow administrators to directly deposit or withdraw funds from driver, passenger, and company wallets. All operations require AdminPolicy authorization and are logged for audit purposes.

Driver Wallets

Deposit to Driver Wallet

Deposit funds into a driver’s wallet.
curl -X POST "https://api.masareagle.com/api/admin/drivers/{driverId}/wallet/deposit" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 500.00,
    "currency": "SAR",
    "transferReference": "TRF-2024-001",
    "notes": "Commission refund for cancelled trip"
  }'

Path Parameters

driverId
string
required
Driver identifier

Body Parameters

amount
number
required
Deposit amount (must be positive)
currency
string
required
Currency code (e.g., SAR, USD, EGP) or currency ID
transferReference
string
External transfer reference number
notes
string
Admin notes about the deposit

Response

success
boolean
Operation status
message
string
Status message in Arabic
walletId
string
Wallet identifier
newBalance
number
Updated wallet balance after deposit

Withdraw from Driver Wallet

Withdraw funds from a driver’s wallet.
curl -X POST "https://api.masareagle.com/api/admin/drivers/{driverId}/wallet/withdraw" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 200.00,
    "currency": "SAR",
    "transferReference": "WD-2024-001",
    "notes": "Manual withdrawal requested by driver"
  }'

Path Parameters

driverId
string
required
Driver identifier

Body Parameters

amount
number
required
Withdrawal amount (must be positive and not exceed balance)
currency
string
required
Currency code (e.g., SAR, USD, EGP) or currency ID
transferReference
string
External transfer reference number
notes
string
Admin notes about the withdrawal

Response

success
boolean
Operation status
message
string
Status message in Arabic
walletId
string
Wallet identifier
newBalance
number
Updated wallet balance after withdrawal

Passenger Wallets

Deposit to Passenger Wallet

Deposit funds into a passenger’s wallet.
curl -X POST "https://api.masareagle.com/api/admin/passengers/{passengerId}/wallet/deposit" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 150.00,
    "currency": "SAR",
    "transferReference": "REF-2024-456",
    "notes": "Refund for cancelled booking"
  }'

Path Parameters

passengerId
string
required
Passenger identifier

Body Parameters

amount
number
required
Deposit amount (must be positive)
currency
string
required
Currency code (e.g., SAR, USD, EGP) or currency ID
transferReference
string
External transfer reference number
notes
string
Admin notes about the deposit

Response

success
boolean
Operation status
message
string
Status message in Arabic
walletId
string
Wallet identifier
newBalance
number
Updated wallet balance after deposit
Passenger wallet deposits trigger a notification to the passenger about the credit.

Company Wallets

Deposit to Company Wallet

Deposit funds into a company’s wallet.
curl -X POST "https://api.masareagle.com/api/admin/companies/{companyId}/wallet/deposit" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 5000.00,
    "currency": "SAR",
    "transferReference": "COMP-DEP-2024-789",
    "notes": "Monthly credit for corporate account"
  }'

Path Parameters

companyId
string
required
Company identifier

Body Parameters

amount
number
required
Deposit amount (must be positive)
currency
string
required
Currency code (e.g., SAR, USD, EGP) or currency ID
transferReference
string
External transfer reference number
notes
string
Admin notes about the deposit

Response

success
boolean
Operation status
message
string
Status message in Arabic
newBalance
number
Updated wallet balance after deposit

Withdraw from Company Wallet

Withdraw funds from a company’s wallet.
curl -X POST "https://api.masareagle.com/api/admin/companies/{companyId}/wallet/withdraw" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 1000.00,
    "currency": "SAR",
    "transferReference": "COMP-WD-2024-123",
    "notes": "Settlement payout"
  }'

Path Parameters

companyId
string
required
Company identifier

Body Parameters

amount
number
required
Withdrawal amount (must be positive and not exceed balance)
currency
string
required
Currency code (e.g., SAR, USD, EGP) or currency ID
transferReference
string
External transfer reference number
notes
string
Admin notes about the withdrawal

Response

success
boolean
Operation status
message
string
Status message in Arabic
newBalance
number
Updated wallet balance after withdrawal

Wallet Transaction History

To view wallet transaction history for drivers, passengers, or companies, use the wallet query endpoints:
  • Get driver wallets: GET /api/admin/wallets/drivers/{driverId}
  • Get passenger wallets: GET /api/admin/wallets/passengers/{passengerId}
  • Get company wallets: GET /api/admin/wallets/companies/{companyId}
  • Get company wallet transactions: GET /api/admin/wallets/companies/{companyId}/transactions
All wallet operations create transaction records that include:
  • Transaction type (deposit/withdraw)
  • Amount and currency
  • Balance before and after
  • Admin who performed the operation
  • Transfer reference
  • Timestamp
  • Notes
Wallet operations are irreversible. Ensure amounts and recipient details are correct before submitting. All operations are logged with the admin ID for audit purposes.

Build docs developers (and LLMs) love