Return an array with the balances of a customer (one balance per currency)
curl --request GET \
--url http://127.0.0.1:8080/v1/c/customer/{customer_id}/balance \
--header 'wb-key: <api-key>'import requests
url = "http://127.0.0.1:8080/v1/c/customer/{customer_id}/balance"
headers = {"wb-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'wb-key': '<api-key>'}};
fetch('http://127.0.0.1:8080/v1/c/customer/{customer_id}/balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://127.0.0.1:8080/v1/c/customer/{customer_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 => [
"wb-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:8080/v1/c/customer/{customer_id}/balance"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("wb-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://127.0.0.1:8080/v1/c/customer/{customer_id}/balance")
.header("wb-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://127.0.0.1:8080/v1/c/customer/{customer_id}/balance")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["wb-key"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"currency": "usd",
"customer_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"deposits": {},
"invoices": {},
"total_invoices_ready_for_payment": "<string>",
"wb_customer_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670"
}
]Balance
Get Current Customer Balance
Return all balances of a customer (one balance per currency).
GET
/
v1
/
c
/
customer
/
{customer_id}
/
balance
Return an array with the balances of a customer (one balance per currency)
curl --request GET \
--url http://127.0.0.1:8080/v1/c/customer/{customer_id}/balance \
--header 'wb-key: <api-key>'import requests
url = "http://127.0.0.1:8080/v1/c/customer/{customer_id}/balance"
headers = {"wb-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'wb-key': '<api-key>'}};
fetch('http://127.0.0.1:8080/v1/c/customer/{customer_id}/balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://127.0.0.1:8080/v1/c/customer/{customer_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 => [
"wb-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:8080/v1/c/customer/{customer_id}/balance"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("wb-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://127.0.0.1:8080/v1/c/customer/{customer_id}/balance")
.header("wb-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://127.0.0.1:8080/v1/c/customer/{customer_id}/balance")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["wb-key"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"currency": "usd",
"customer_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"deposits": {},
"invoices": {},
"total_invoices_ready_for_payment": "<string>",
"wb_customer_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670"
}
]Authorizations
api-keywb_user_cookie
Path Parameters
Id of the Customer
Response
200 - application/json
Customer Balance
A supported currency
The format for parsing and reading is the lowercased ISO 4217 currency code (e.g. "usd")
Available options:
usd, eur, gbp, brl, ars Unique identifier of an object. Consists of object class prefix and a UUID
Example:
"Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670"
List of Deposit Transactions
Show child attributes
Show child attributes
List of invoices
Show child attributes
Show child attributes
Sum of the totals of the invoices which are either without any started payment, with a payment in progress or with a payment failed. This is "due". This value can also be found in invoices.ready_for_payment.total
Unique identifier of an object. Consists of object class prefix and a UUID
Example:
"Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670"