Skip to main content

Driver Finance

1 API call in this section.

Create Manual Driver Transaction

Delivery & Last-Mile / Driver Finance
POST/delivery/drivers/:driverId/manual-transaction?tenant_id=&language=en

Create a manual credit or debit transaction on a driver's wallet. Permissions Required: manage:wallets OR manage:operations:tenant OR is_system_admin Request Body: | Field | Type | Required | Description | |-------|------|----------|-------------| | amount | number | Yes | Transaction amount (must be > 0) | | type | string | Yes | credit or debit | | reason | string | Yes | Reason for the transaction (max 500 chars) | | reference | string | No | External reference (max 200 chars) | | notes | string | No | Additional notes (max 500 chars) | Business Logic: - Credit: Adds funds to driver wallet (e.g., bonuses, corrections) - Debit: Removes funds from driver wallet (e.g., penalties, adjustments) - For debit: fails if insufficient wallet balance - Transaction metadata records actor, reason, reference for audit trail

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request POST "$ONDI_BASE_URL/delivery/drivers/:driverId/manual-transaction?tenant_id=&language=en" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --header "Content-Type: application/json" \5  --data '{6  "amount": 50,7  "type": "credit",8  "reason": "Bonus for excellent performance",9  "reference": "BON-2024-001",10  "notes": "Q1 performance bonus"11}'
Request body
json
1{2  "amount": 50,3  "type": "credit",4  "reason": "Bonus for excellent performance",5  "reference": "BON-2024-001",6  "notes": "Q1 performance bonus"7}

Path parameters

driverIdRequired
path string

The driver's ID

Query parameters

tenant_idOptional
query string

Tenant ID (optional if in auth token)

languageOptional
query string

en

Preferred language for response messages

Request body fields

amountExample
number

Example field from the request body.

typeExample
string

Example field from the request body.

reasonExample
string

Example field from the request body.

referenceExample
string

Example field from the request body.

notesExample
string

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Content-TypeOptional
header string

application/json

Responses

Success - Credit201Created
Success - Debit201Created
Error - Insufficient Balance400Bad Request
Error - Validation400Bad Request
Error - Forbidden403Forbidden