Debit Company Wallet API
Overview
Deducts funds from a company wallet for travel bookings or adjustments.
- Endpoint:
/api/wallet/debit - Method:
POST
Request Body Schema
| Field | Type | Required | Description |
|---|---|---|---|
companyId | String (UUID) | Yes | Target company ID |
amount | Number | Yes | Debit amount (> 0) |
transactionType | Enum | No | DEBIT, ADJUSTMENT (Default: DEBIT) |
description | String | Yes | Transaction remarks / justification |
referenceNo | String | No | External reference or booking reference number |
allowNegative | Boolean | No | Allow balance to drop below zero (Default: false) |
Request Body Example
{
"companyId": "c478a846-993d-4c8d-bf8d-d77cb3370e01",
"amount": 20160.00,
"transactionType": "DEBIT",
"description": "Hotel Booking Payment - Grand Palace Resort",
"referenceNo": "BK-2026-9988",
"allowNegative": false
}
Response Example (200 OK)
{
"success": true,
"data": {
"walletId": "wlt_11223344",
"balance": 579840.00,
"transactionId": "txn_88990011"
},
"message": "Company wallet debited successfully"
}