Legacy Invoice Wallet Balance
curl --request GET \
--url https://api.nozle.app/engine/api/v1/credits/{id}/balance \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nozle.app/engine/api/v1/credits/{id}/balance"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nozle.app/engine/api/v1/credits/{id}/balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.nozle.app/engine/api/v1/credits/{id}/balance"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.nozle.app/engine/api/v1/credits/{id}/balance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nozle.app/engine/api/v1/credits/{id}/balance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.nozle.app/engine/api/v1/credits/{id}/balance")
.header("Authorization", "Bearer <token>")
.asString();{
"wallet_id": "<string>",
"name": "<string>",
"balance_cents": 123,
"currency": "<string>",
"credits_balance": "<string>",
"status": "<string>"
}Product Credits
Legacy Invoice Wallet Balance
GET
/
engine
/
api
/
v1
/
credits
/
{id}
/
balance
Legacy Invoice Wallet Balance
curl --request GET \
--url https://api.nozle.app/engine/api/v1/credits/{id}/balance \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nozle.app/engine/api/v1/credits/{id}/balance"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nozle.app/engine/api/v1/credits/{id}/balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.nozle.app/engine/api/v1/credits/{id}/balance"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.nozle.app/engine/api/v1/credits/{id}/balance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nozle.app/engine/api/v1/credits/{id}/balance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.nozle.app/engine/api/v1/credits/{id}/balance")
.header("Authorization", "Bearer <token>")
.asString();{
"wallet_id": "<string>",
"name": "<string>",
"balance_cents": 123,
"currency": "<string>",
"credits_balance": "<string>",
"status": "<string>"
}Base URL:
Returns the customer’s active wallet, the most recently created one if there are several. A customer with no active wallet returns
https://api.nozle.app/engine/api/v1.
Get the legacy invoice wallet balance for a customer.
Auth: secret key only. The key requires credit_system:read. Publishable keys are always rejected.
This is not a product Credit System balance. New integrations should use Customer Credit Balances.
string
required
External customer ID
404 with {"error": "no wallet found"}. Any other failure to read the wallet, such as a database error, also returns this 404.
{
"wallet_id": "09b4f6d3-f463-4f4f-ac75-27e36bc2a296",
"name": "Prepaid wallet",
"balance_cents": 1600,
"currency": "USD",
"credits_balance": "16.00000",
"status": "active"
}
string
required
Wallet identifier.
string
required
Wallet name. Empty string when the wallet has none.
number
required
Wallet balance in the smallest unit of
currency. Check & Deduct lowers it with the credits it deducts.string
required
Currency of the wallet.
string
required
Credits left, as a decimal string with five decimal places (
"16.00000"). This is the live value: every Check & Deduct call changes it at once.string
required
active for the wallet returned here.A Check & Deduct call moves both balances. For example, a wallet funded with 20 credits at a rate of 1.00 shows
balance_cents: 2000 and credits_balance: "20.00000"; after deducting 4 credits, credits_balance is "16.00000" and balance_cents is 1600.