Wallets
3 API calls in this section.
Top-up Wallet
/users/:userId/wallet/topup?language=enTop-up User Wallet Adds funds to a user's wallet. The wallet is automatically identified by the user ID. Authentication: - Requires Bearer Token authentication - User can only top-up their own wallet - Tenant admins can top-up any user's wallet Endpoint: POST /users/{userId}/wallet/topup Features: - Automatic wallet lookup by user ID - Currency validation - Transaction record creation - Balance update via database trigger - Tenant isolation
1curl --request POST "$ONDI_BASE_URL/users/:userId/wallet/topup?language=en" \2 --header "Authorization: Bearer {{access_token}}" \3 --header "Content-Type: application/json" \4 --header "Content-Type: application/json" \5 --data '{6 "amount": 100,7 "currency": "USD",8 "description": "Adding funds to wallet"9}'1{2 "amount": 100,3 "currency": "USD",4 "description": "Adding funds to wallet"5}Path parameters
userIdRequired{{user_id}}
UUID of the user whose wallet to top up
Query parameters
languageOptionalen
Language code for response localization (Optional, default: en)
Request body fields
amountExampleExample field from the request body.
currencyExampleExample field from the request body.
descriptionExampleExample field from the request body.
Headers
AuthorizationOptionalBearer {{access_token}}
Content-TypeOptionalapplication/json
Responses
Transfer Funds
/users/:userId/wallet/transfer?language=enTransfer Funds Between Users Transfers funds from one user's wallet to another user within the same tenant. Authentication: - Requires Bearer Token authentication - User can only transfer from their own wallet Endpoint: POST /users/{userId}/wallet/transfer Features: - Automatic sender wallet lookup by user ID - Recipient lookup by email or user_id - Balance validation - Atomic transaction - Tenant isolation - Transfer history tracking
1curl --request POST "$ONDI_BASE_URL/users/:userId/wallet/transfer?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 "recipient_identifier": "recipient@example.com",8 "identifier_type": "email",9 "description": "Payment for services"10}'1{2 "amount": 50,3 "recipient_identifier": "recipient@example.com",4 "identifier_type": "email",5 "description": "Payment for services"6}Path parameters
userIdRequired{{user_id}}
UUID of the sender user
Query parameters
languageOptionalen
Language code for response localization (Optional, default: en)
Request body fields
amountExampleExample field from the request body.
recipient_identifierExampleExample field from the request body.
identifier_typeExampleExample field from the request body.
descriptionExampleExample field from the request body.
Headers
AuthorizationOptionalBearer {{access_token}}
Content-TypeOptionalapplication/json
Responses
List Wallet Transactions
/users/:userId/wallet/transactions?page=1&limit=20&type=&search=&from_date=&to_date=&language=enList User Wallet Transactions Retrieves a paginated list of wallet transactions for a specific user with filtering options. Authentication: - Requires Bearer Token authentication - User can only access their own transactions - Tenant admins can access any user's transactions Endpoint: GET /users/{userId}/wallet/transactions Query Parameters: - page (number, optional): Page number (default: 1) - limit (number, optional): Items per page (default: 20, max: 100) - type (string, optional): Filter by type (topup, transfer, payment, earning) - search (string, optional): Search by description (partial match) or amount (exact match) - from_date (string, optional): Filter from date (ISO format) - to_date (string, optional): Filter to date (ISO format) Features: - Automatic wallet lookup by user ID - Comprehensive pagination metadata - Type and date range filtering - Search on amount and description - Transfer details enhancement - Chronological ordering - Wallet balance included
1curl --request GET "$ONDI_BASE_URL/users/:userId/wallet/transactions?page=1&limit=20&type=&search=&from_date=&to_date=&language=en" \2 --header "Authorization: Bearer {{access_token}}"Path parameters
userIdRequired{{user_id}}
UUID of the user whose transactions to retrieve
Query parameters
pageOptional1
Page number for pagination (default: 1)
limitOptional20
Number of items per page (default: 20, max: 100)
typeOptionalFilter by transaction type: topup, transfer, payment, earning
searchOptionalSearch by description (partial match) or amount (exact match). If numeric, matches amount; always matches description.
from_dateOptionalFilter from date (ISO format: 2024-01-01T00:00:00Z)
to_dateOptionalFilter to date (ISO format: 2024-12-31T23:59:59Z)
languageOptionalen
Language code for response localization (Optional, default: en)
Headers
AuthorizationOptionalBearer {{access_token}}