Wallets
Get Wallets

Get Wallets API

The Get Wallet API fetches a user's wallet based on the specified currency and country parameters.


Endpoint

GET {{baseURL}}/v1/wallet?currency={currency}&country={country}

This API requires two query parameters: currency and country.

Request Example

curl --location --request GET '{{baseURL}}/v1/wallet?currency=NGN&country=NG' \
--header 'x-api-key: `YOUR_API_KEY' \
--header 'Content-Type: application/json'

Request Headers

HeaderDescriptionRequiredExample Value
x-api-keyAPI key for authentication✅ YesYOUR_API_KEY
Content-TypeThe content type of the request✅ Yesapplication/json

Query Parameters

ParameterTypeDescriptionRequiredExample Value
currencyStringThe currency code for the wallet (ISO 4217)✅ YesNGN
countryStringThe country code (ISO 3166-1 alpha-2)✅ YesNG

Sucessful Response Example (200 OK)

If the request is successful, the API returns the following JSON response:

response.json
{
    "message": "wallets fetched successfully",
    "status": "success",
    "data": [
        {
            "id": "cfd2de64-a896-4405-8736-xxxxxxxxxxxxx",
            "balance": 23094071.00,
            "currency": "NGN",
            "country": "NG"
        }
    ]
}

Response Breakdown**

General Information

FieldTypeDescription
messageStringConfirmation message indicating success
statusStringIndicates success or failure

Data Details

FieldTypeDescription
idStringUnique identifier for the wallet
balanceNumberWallet balance
currencyStringCurrency code (e.g., NGN)
countryStringCountry code (e.g., NG)

Error Responses

Status CodeMeaningExample ResponseHow to Handle
400Bad Request (Missing or Invalid Query Params)currency and country are requiredEnsure both currency and country query parameters are included and valid.
401Unauthorized (Invalid API Key)Invalid authentication credentialsCheck that the x-api-key header is present and the key is valid.
403Forbidden (Non-whitelisted IP)Your IP address is not allowed to access this serviceAdd your IP to the allowed list in the API Management section of the Dashboard.
404Wallet Not FoundWallet for the given currency and country not foundConfirm that a wallet exists for the provided currency and country combination.
422Unprocessable EntityInvalid parameter valueValidate the currency and country values against supported formats and values.
429Too Many RequestsAPI rate limit exceedImplement retry logic with backoff; do not exceed allowed number of requests per second.
500Internal Server ErrorAn unexpected error occurred on the serverRetry the request after some time or contact support if issue persists.

Best Practices

✅ Include a valid x-api-key in the request headers to authenticate the request.
✅ Ensure that the currency and country parameters are valid and correctly formatted.
✅ Handle potential errors in case the wallet data is not found or the request fails.