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
Authorization
RequiredBearer <token>In: header
Query Parameters
currency
stringCurrency code (optional, defaults to 'INR')
Value in:
"INR"
environment
stringEnvironment (optional, defaults to 'PRODUCTION')
Value in:
"PRODUCTION" | "SANDBOX"
Response Body
Balance retrieved successfully
TypeScript Definitions
Use the response body type in TypeScript.
data
RequiredobjectInvalid parameters
TypeScript Definitions
Use the response body type in TypeScript.
error
RequiredobjectUnauthorized
TypeScript Definitions
Use the response body type in TypeScript.
error
RequiredobjectBalance not found
TypeScript Definitions
Use the response body type in TypeScript.
error
RequiredobjectServer error
TypeScript Definitions
Use the response body type in TypeScript.
error
Requiredobjectcurl -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": {}
}
}