Skip to main content

Top-up

1 API call in this section.

Top-up Wallet

Billing & Subscriptions / Wallets / Top-up
POST/wallets/topup?language=en

Initiates a wallet top-up payment. Currency: - The currency is resolved from Settings (currency.currency_code) using tenant override with system fallback. - The API does not accept a currency field in the request. Authentication: - Requires Bearer Token authentication: Authorization: Bearer {{access_token}} Query Parameters: - language (string, optional): Language code for localized response messages (default: en) Field Descriptions: - amount (number, required): Amount to add. Must be a positive number with min value 0.01. - payment_method_type_id (string, required): Payment method type id. - back_ref (string, optional): Return URL/reference for gateway flow. - description (string, optional): Description metadata. Response Fields: - currency (string): Currency code resolved from Settings.

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request POST "$ONDI_BASE_URL/wallets/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  "payment_method_type_id": "uuid",8  "back_ref": "https://your-site/return",9  "description": "Adding funds to wallet"10}'
Request body
json
1{2  "amount": 100,3  "payment_method_type_id": "uuid",4  "back_ref": "https://your-site/return",5  "description": "Adding funds to wallet"6}

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.

payment_method_type_idExample
string

Example field from the request body.

back_refExample
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
Response body
json
1{2  "success": true,3  "payment": { ... },4  "currency": "USD"5}
Error - Invalid Amount400Bad Request
Error - Wallet Not Found404Not Found
Error - Unauthorized Access403Forbidden
Error - Validation Error400Bad Request
Error - Internal Server Error500Internal Server Error
Error - Unauthorized401Unauthorized