curl -X GET 'https://verification.didit.me/v3/billing/balance/' \
-H 'x-api-key: YOUR_API_KEY'from didit import Didit
# Reads DIDIT_API_KEY.
client = Didit()
result = client.billing.retrieve_balance()
print(result)import Didit from "@didit-protocol/sdk-node";
// Reads DIDIT_API_KEY.
const didit = new Didit();
const result = await didit.billing.retrieveBalance();
console.log(result);ctx := context.Background()
// Reads DIDIT_API_KEY.
client := didit.NewClient()
result, err := client.Billing.RetrieveBalance(ctx)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", result)import me.didit.Didit;
// Reads DIDIT_API_KEY.
Didit client = new Didit();
var result = client.billing().retrieveBalance();
System.out.println(result);<?php
require 'vendor/autoload.php';
use Didit\DiditClient;
// Reads DIDIT_API_KEY.
$didit = new DiditClient();
$result = $didit->billing->retrieveBalance();
print_r($result->toArray());require "didit"
# Reads DIDIT_API_KEY.
didit = Didit::Client.new
result = didit.billing.retrieve_balance
puts result.to_husing System;
using System.Text.Json;
using Didit;
// Reads DIDIT_API_KEY.
using var client = new DiditClient();
var result = await client.Billing.RetrieveBalanceAsync();
Console.WriteLine(JsonSerializer.Serialize(result));{
"balance": "1234.5600",
"auto_refill_enabled": true,
"auto_refill_amount": "500.00",
"auto_refill_threshold": "100.00",
"agent_top_up": {
"enabled": true
}
}Get Credit Balance API: KYC Billing
Retrieve your Didit credit balance and auto top-up settings. One balance pays for every product, from plan credit and top-ups.
curl -X GET 'https://verification.didit.me/v3/billing/balance/' \
-H 'x-api-key: YOUR_API_KEY'from didit import Didit
# Reads DIDIT_API_KEY.
client = Didit()
result = client.billing.retrieve_balance()
print(result)import Didit from "@didit-protocol/sdk-node";
// Reads DIDIT_API_KEY.
const didit = new Didit();
const result = await didit.billing.retrieveBalance();
console.log(result);ctx := context.Background()
// Reads DIDIT_API_KEY.
client := didit.NewClient()
result, err := client.Billing.RetrieveBalance(ctx)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", result)import me.didit.Didit;
// Reads DIDIT_API_KEY.
Didit client = new Didit();
var result = client.billing().retrieveBalance();
System.out.println(result);<?php
require 'vendor/autoload.php';
use Didit\DiditClient;
// Reads DIDIT_API_KEY.
$didit = new DiditClient();
$result = $didit->billing->retrieveBalance();
print_r($result->toArray());require "didit"
# Reads DIDIT_API_KEY.
didit = Didit::Client.new
result = didit.billing.retrieve_balance
puts result.to_husing System;
using System.Text.Json;
using Didit;
// Reads DIDIT_API_KEY.
using var client = new DiditClient();
var result = await client.Billing.RetrieveBalanceAsync();
Console.WriteLine(JsonSerializer.Serialize(result));{
"balance": "1234.5600",
"auto_refill_enabled": true,
"auto_refill_amount": "500.00",
"auto_refill_threshold": "100.00",
"agent_top_up": {
"enabled": true
}
}Authorizations
Your application's API key, from Developers -> API keys in the Business Console. The primary key has full access. A named key can be scoped: none, read or write per resource, limited to some workflows or to approved sessions, to a list of IP addresses, and to an expiry date. 401 means the key is wrong, revoked or expired; 403 means no key was sent, the key has no access to this resource or action, or the request came from an address outside its IP list; 404 on a session route means the session is outside the key's workflows or statuses. A key without media access receives image, video and PDF URLs as null, and a key without sessions write receives session links and tokens as null. See https://docs.didit.me/console/api-keys.
Response
Current credit balance plus the organization's auto-refill configuration.