Get balance
Retrieves the merchant's balance for the specified environment and currency. Requires `x-katu9-merchant-id` and `x-katu9-environment` headers for authentication.
Authorization
AuthorizationRequiredBearer <token>In: header
Query Parameters
currencystringCurrency code (optional, defaults to 'INR')
Value in:
"INR"environmentstringEnvironment (optional, defaults to 'PRODUCTION')
Value in:
"PRODUCTION" | "SANDBOX"Response Body
Balance retrieved successfully
TypeScript Definitions
Use the response body type in TypeScript.
dataRequiredobjectInvalid parameters
TypeScript Definitions
Use the response body type in TypeScript.
errorRequiredobjectUnauthorized
TypeScript Definitions
Use the response body type in TypeScript.
errorRequiredobjectBalance not found
TypeScript Definitions
Use the response body type in TypeScript.
errorRequiredobjectServer error
TypeScript Definitions
Use the response body type in TypeScript.
errorRequiredobjectcurl -X GET "https://api.katu9.com/balance?currency=INR&environment=PRODUCTION" \
-H "Authorization: Bearer <token>"fetch("https://api.katu9.com/balance?currency=INR&environment=PRODUCTION", {
headers: {
"Authorization": "Bearer <token>"
}
})package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.katu9.com/balance?currency=INR&environment=PRODUCTION"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://api.katu9.com/balance?currency=INR&environment=PRODUCTION"
response = requests.request("GET", url, headers = {
"Authorization": "Bearer <token>"
})
print(response.text){
"data": {
"merchantId": "c3073b9d-edd0-49f2-a28d-b7ded8ff9a8b",
"environment": "PRODUCTION",
"currency": "INR",
"amount": 0,
"updatedAt": "2019-08-24T14:15:22Z"
}
}{
"error": {
"message": "string",
"details": {}
}
}{
"error": {
"message": "string",
"details": {}
}
}{
"error": {
"message": "string",
"details": {}
}
}{
"error": {
"message": "string",
"details": {}
}
}