Wallet
4 API calls in this section.
Get Wallet Dashboard
/customer/wallet/dashboard?page=1&limit=5&type=allCustomer wallet dashboard data for UI cards + transaction history. Rules: - No currency field returned. - Cards: Total Top-ups (lifetime), Total Spent (lifetime), This Month (current month spent). - Withdraw tab returns payout transactions (wallet_transactions.type = 'payout'). - Per transaction running balance is returned in running_balance (from wallet_transactions.balance_snapshot column).
1curl --request GET "$ONDI_BASE_URL/customer/wallet/dashboard?page=1&limit=5&type=all" \2 --header "Authorization: Bearer {{access_token}}"Query parameters
pageOptional1
Page number (default: 1)
limitOptional5
Page size (frontend default: 5)
typeOptionalall
Transaction tab: all | topup | payment | withdraw
Headers
AuthorizationOptionalBearer {{access_token}}
Responses
1{2 "success": true,3 "data": {4 "wallet": {5 "balance": 1006 },7 "cards": {8 "total_topups": {9 "amount": 100,10 "transactions_count": 111 },12 "total_spent": {13 "amount": 40.5,14 "orders_paid_count": 215 },16 "this_month": {17 "amount": 018 }19 },20 "history": {21 "type": "all",22 "statuses": [23 {24 "key": "all",25 "label": "All",26 "count": 327 },28 {29 "key": "topup",30 "label": "Top-ups",31 "count": 132 },33 {34 "key": "payment",35 "label": "Payment",36 "count": 237 },38 {39 "key": "withdraw",40 "label": "Withdraw",41 "count": 042 }43 ],44 "transactions": [45 {46 "id": "uuid",47 "type": "topup",48 "title": "Top-up",49 "subtitle": "Wallet top-up via card",50 "amount": 100,51 "running_balance": 100,52 "created_at": "2024-01-25T15:30:00Z",53 "reference_id": "uuid",54 "reference_type": "payment"55 },56 {57 "id": "uuid",58 "type": "payment",59 "title": "Order payment",60 "subtitle": "Payment for order ORD-2024-001",61 "amount": -15.5,62 "running_balance": 84.5,63 "created_at": "2024-01-29T15:30:00Z",64 "reference_id": "ORD-2024-001",65 "reference_type": "delivery"66 }67 ],68 "pagination": {69 "current_page": 1,70 "per_page": 5,71 "total_items": 2,72 "total_pages": 1,73 "has_next_page": false,74 "has_previous_page": false75 }76 }77 }78}Create Payout Request
/customer/wallet/payout-requestsCustomer creates a payout request (allowed user types configured in customer portal settings: individual and/or business). Rules: - Workflow only. No wallet debit happens here. - Wallet balance is checked (must be >= amount). Request Body: - amount (required) - reference (optional) - notes (optional)
1curl --request POST "$ONDI_BASE_URL/customer/wallet/payout-requests" \2 --header "Authorization: Bearer {{access_token}}" \3 --header "Content-Type: application/json" \4 --header "Content-Type: application/json" \5 --data '{6 "amount": 0,7 "reference": "",8 "notes": ""9}'1{2 "amount": 0,3 "reference": "",4 "notes": ""5}Request body fields
amountExampleExample field from the request body.
referenceExampleExample field from the request body.
notesExampleExample field from the request body.
Headers
AuthorizationOptionalBearer {{access_token}}
Content-TypeOptionalapplication/json
Responses
No response example is available for this endpoint yet.
List Payout Requests
/customer/wallet/payout-requests?page=1&limit=10&status=allLists customer-owned payout requests. Access controlled by customer portal wallet_settings.allowed_payout_user_types (individual and/or business).
1curl --request GET "$ONDI_BASE_URL/customer/wallet/payout-requests?page=1&limit=10&status=all" \2 --header "Authorization: Bearer {{access_token}}"Query parameters
pageOptional1
Page number (>=1)
limitOptional10
Items per page (1-50)
statusOptionalall
all | pending | approved | rejected
Headers
AuthorizationOptionalBearer {{access_token}}
Responses
No response example is available for this endpoint yet.
Get Payout Request
/customer/wallet/payout-requests/:idGets customer-owned payout request detail. Access controlled by customer portal wallet_settings.allowed_payout_user_types (individual and/or business).
1curl --request GET "$ONDI_BASE_URL/customer/wallet/payout-requests/:id" \2 --header "Authorization: Bearer {{access_token}}"Path parameters
idRequiredpayout-request-uuid
Payout request ID
Headers
AuthorizationOptionalBearer {{access_token}}
Responses
No response example is available for this endpoint yet.