Skip to main content

Wallets

3 API calls in this section.

Top-up Wallet

Platform & Access / Users / Wallets
POST/users/:userId/wallet/topup?language=en

Top-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

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
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}'
Request body
json
1{2  "amount": 100,3  "currency": "USD",4  "description": "Adding funds to wallet"5}

Path parameters

userIdRequired
path string

{{user_id}}

UUID of the user whose wallet to top up

Query parameters

languageOptional
query string

en

Language code for response localization (Optional, default: en)

Request body fields

amountExample
number

Example field from the request body.

currencyExample
string

Example field from the request body.

descriptionExample
string

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Content-TypeOptional
header string

application/json

Responses

Success Response200OK

Transfer Funds

Platform & Access / Users / Wallets
POST/users/:userId/wallet/transfer?language=en

Transfer 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

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
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}'
Request body
json
1{2  "amount": 50,3  "recipient_identifier": "recipient@example.com",4  "identifier_type": "email",5  "description": "Payment for services"6}

Path parameters

userIdRequired
path string

{{user_id}}

UUID of the sender user

Query parameters

languageOptional
query string

en

Language code for response localization (Optional, default: en)

Request body fields

amountExample
number

Example field from the request body.

recipient_identifierExample
string

Example field from the request body.

identifier_typeExample
string

Example field from the request body.

descriptionExample
string

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Content-TypeOptional
header string

application/json

Responses

Success Response200OK

List Wallet Transactions

Platform & Access / Users / Wallets
GET/users/:userId/wallet/transactions?page=1&limit=20&type=&search=&from_date=&to_date=&language=en

List 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

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
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
path string

{{user_id}}

UUID of the user whose transactions to retrieve

Query parameters

pageOptional
query string

1

Page number for pagination (default: 1)

limitOptional
query string

20

Number of items per page (default: 20, max: 100)

typeOptional
query string

Filter by transaction type: topup, transfer, payment, earning

searchOptional
query string

Search by description (partial match) or amount (exact match). If numeric, matches amount; always matches description.

from_dateOptional
query string

Filter from date (ISO format: 2024-01-01T00:00:00Z)

to_dateOptional
query string

Filter to date (ISO format: 2024-12-31T23:59:59Z)

languageOptional
query string

en

Language code for response localization (Optional, default: en)

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

Success Response200OK