> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://apidocs.sare.africa/sare-core-api/wallet/get-current-users-wallet/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://apidocs.sare.africa/_mcp/server. # Get Current User's Wallet GET http://localhost:8080/api/v3/wallets The current user's wallet and balance. Pass `type=PERSONAL_BUSINESS` for the Kibeti wallet; without `type` (or with it blank) this returns the personal wallet. 404 when the user has no wallet of the requested type. Reference: https://apidocs.sare.africa/sare-core-api/wallet/get-current-users-wallet ## Request ### Query parameters - `type` (string, optional) — Optional wallet type: `PERSONAL`, `PERSONAL_BUSINESS` (Kibeti) or `BUSINESS`. Omitted or blank returns the personal wallet. ### Headers - `Authorization` (string, optional) ## Response ### 200 200 OK - `code` (integer, optional) - `message` (string, optional) - `data` (WalletsGetResponsesContentApplicationJsonSchemaData, optional) ## Errors ### 404 Not Found Error 404 Not Found (no Kibeti wallet) - `status` (integer, optional) - `message` (string, optional) - `path` (string, optional) ## Types ### WalletsGetResponsesContentApplicationJsonSchemaData - `walletId` (string, optional) - `walletType` (string, optional) - `balance` (integer, optional) - `currency` (string, optional) - `user` (WalletsGetResponsesContentApplicationJsonSchemaDataUser, optional) - `status` (string, optional) ### WalletsGetResponsesContentApplicationJsonSchemaDataUser - `id` (string, optional) - `fullName` (string, optional) - `firstName` (string, optional) - `secondName` (string, optional) - `initials` (string, optional) - `phone` (string, optional) ## Examples ### 200 OK **Response** ```json { "code": 200, "message": "Wallet retrieved successfully", "data": { "walletId": "b1e7f6a0-9d2b-4a5b-9c3d-1a2b3c4d5e6f", "walletType": "PERSONAL", "balance": 500, "currency": "KES", "user": { "id": "f5c1d4e5-2a3b-4c5d-8e9f-0a1b2c3d4e5f", "fullName": "Jane Doe", "firstName": "Jane", "secondName": "Doe", "initials": "JD", "phone": "254712345678" }, "status": "ACTIVE" } } ``` **SDK Code** ```python 200 OK import requests url = "http://localhost:8080/api/v3/wallets" querystring = {"type":"PERSONAL_BUSINESS"} headers = {"Authorization": "Bearer {{accessToken}}"} response = requests.get(url, headers=headers, params=querystring) print(response.json()) ``` ```javascript 200 OK const url = 'http://localhost:8080/api/v3/wallets?type=PERSONAL_BUSINESS'; const options = {method: 'GET', headers: {Authorization: 'Bearer {{accessToken}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go 200 OK package main import ( "fmt" "net/http" "io" ) func main() { url := "http://localhost:8080/api/v3/wallets?type=PERSONAL_BUSINESS" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer {{accessToken}}") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby 200 OK require 'uri' require 'net/http' url = URI("http://localhost:8080/api/v3/wallets?type=PERSONAL_BUSINESS") http = Net::HTTP.new(url.host, url.port) request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer {{accessToken}}' response = http.request(request) puts response.read_body ``` ```java 200 OK import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("http://localhost:8080/api/v3/wallets?type=PERSONAL_BUSINESS") .header("Authorization", "Bearer {{accessToken}}") .asString(); ``` ```php 200 OK request('GET', 'http://localhost:8080/api/v3/wallets?type=PERSONAL_BUSINESS', [ 'headers' => [ 'Authorization' => 'Bearer {{accessToken}}', ], ]); echo $response->getBody(); ``` ```csharp 200 OK using RestSharp; var client = new RestClient("http://localhost:8080/api/v3/wallets?type=PERSONAL_BUSINESS"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer {{accessToken}}"); IRestResponse response = client.Execute(request); ``` ```swift 200 OK import Foundation let headers = ["Authorization": "Bearer {{accessToken}}"] let request = NSMutableURLRequest(url: NSURL(string: "http://localhost:8080/api/v3/wallets?type=PERSONAL_BUSINESS")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### 200 OK (Kibeti) **Response** ```json { "code": 200, "message": "Wallet retrieved successfully", "data": { "walletId": "c2f8a7b1-0e3c-4b6c-8d4e-2b3c4d5e6f70", "walletType": "PERSONAL_BUSINESS", "balance": 80, "currency": "KES", "user": { "id": "f5c1d4e5-2a3b-4c5d-8e9f-0a1b2c3d4e5f", "fullName": "Jane Doe", "firstName": "Jane", "secondName": "Doe", "initials": "JD", "phone": "254712345678" }, "status": "ACTIVE" } } ``` **SDK Code** ```python 200 OK (Kibeti) import requests url = "http://localhost:8080/api/v3/wallets" querystring = {"type":"PERSONAL_BUSINESS"} headers = {"Authorization": "Bearer {{accessToken}}"} response = requests.get(url, headers=headers, params=querystring) print(response.json()) ``` ```javascript 200 OK (Kibeti) const url = 'http://localhost:8080/api/v3/wallets?type=PERSONAL_BUSINESS'; const options = {method: 'GET', headers: {Authorization: 'Bearer {{accessToken}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go 200 OK (Kibeti) package main import ( "fmt" "net/http" "io" ) func main() { url := "http://localhost:8080/api/v3/wallets?type=PERSONAL_BUSINESS" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer {{accessToken}}") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby 200 OK (Kibeti) require 'uri' require 'net/http' url = URI("http://localhost:8080/api/v3/wallets?type=PERSONAL_BUSINESS") http = Net::HTTP.new(url.host, url.port) request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer {{accessToken}}' response = http.request(request) puts response.read_body ``` ```java 200 OK (Kibeti) import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("http://localhost:8080/api/v3/wallets?type=PERSONAL_BUSINESS") .header("Authorization", "Bearer {{accessToken}}") .asString(); ``` ```php 200 OK (Kibeti) request('GET', 'http://localhost:8080/api/v3/wallets?type=PERSONAL_BUSINESS', [ 'headers' => [ 'Authorization' => 'Bearer {{accessToken}}', ], ]); echo $response->getBody(); ``` ```csharp 200 OK (Kibeti) using RestSharp; var client = new RestClient("http://localhost:8080/api/v3/wallets?type=PERSONAL_BUSINESS"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer {{accessToken}}"); IRestResponse response = client.Execute(request); ``` ```swift 200 OK (Kibeti) import Foundation let headers = ["Authorization": "Bearer {{accessToken}}"] let request = NSMutableURLRequest(url: NSURL(string: "http://localhost:8080/api/v3/wallets?type=PERSONAL_BUSINESS")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```