Zero Driver Balance
POST/v1/drivers/zero-balance
Returns a driver's entire sub-wallet balance to your fleet's wallet, atomically. This is the reverse of Distribute to Driver. To do this automatically for every driver each night, see Set Fleet Auto-Zero.
The whole balance is always returned; there's no partial amount. This includes any part of the balance that came from a driver's sign-up credit. It also works for a driver you've removed, so you can recover what they had left.
Auth
Authorization: ApiKey <your fleet's API key> — server-side only.
Request parameters
| Field | Type | Required | Description |
|---|---|---|---|
driverEmail | string | Yes | Which driver's balance to return to the fleet wallet. |
Example request
curl https://api.lotgrids.com/v1/drivers/zero-balance \
-X POST \
-H "Authorization: ApiKey lg_live_f_8f21a9.9c2e1b7a..." \
-H "Content-Type: application/json" \
-d '{
"driverEmail": "adaeze.driver@fleetco.com"
}'
Example success response
200 OK
{
"amountReturned": 12000,
"fleetBalance": 142000,
"driverBalance": 0
}
This call is safe to retry. If the driver's balance is already zero, you get a 200 with amountReturned: 0 and nothing changes.
What to expect
- A charge already paid from the sub-wallet isn't affected, because the money left the sub-wallet when the session was confirmed.
- If that session later ends early, its refund goes back to the driver's sub-wallet, not the fleet wallet.
- The driver isn't emailed about this. If they need to know, tell them from your own app.
- Both sides appear in your Partner Dashboard's Transactions tab as
zero_balance_debitandzero_balance_credit.
Error responses
400 invalid_argument
{ "error": { "code": "invalid_argument", "message": "driverEmail is required." } }
404 driver_not_found
{ "error": { "code": "driver_not_found", "message": "No driver adaeze.driver@fleetco.com in fleet f_8f21a9." } }