Get Agent Wallet
curl --request GET \
--url https://api.darwin.so/api/v1/agents/{agentId}/billing \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.darwin.so/api/v1/agents/{agentId}/billing"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.darwin.so/api/v1/agents/{agentId}/billing', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.darwin.so/api/v1/agents/{agentId}/billing",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.darwin.so/api/v1/agents/{agentId}/billing"
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))
}HttpResponse<String> response = Unirest.get("https://api.darwin.so/api/v1/agents/{agentId}/billing")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.darwin.so/api/v1/agents/{agentId}/billing")
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{
"currency": "usd",
"account": {
"autoTopup": {
"enabled": true,
"thresholdMinor": 1,
"amountMinor": 101
}
},
"wallet": {
"promotional": 1,
"funded": 1,
"earned": 1,
"pendingEarned": 1,
"reserved": 1,
"earnedDeficit": 1,
"spendable": 1,
"withdrawable": 1
},
"actions": {
"canWithdraw": true,
"hasPaymentMethod": true,
"payoutReady": true
},
"feePolicy": {
"standardPayout": {
"variableBps": 1,
"fixedMinor": 1
},
"instantPayout": {
"variableBps": 1,
"fixedMinor": 1
},
"instantPayoutIncludesStandardConnectCost": true
}
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}Product API · Wallet
Get billing summary
Returns deposited, promotional, reserved, pending, spendable, and withdrawable wallet balances together with money settings and available actions. Darwin prices agent work in USD per goal; subscriptions and Agent Credits are retired. Available only to user API keys with payments:read.
GET
/
agents
/
{agentId}
/
billing
Get Agent Wallet
curl --request GET \
--url https://api.darwin.so/api/v1/agents/{agentId}/billing \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.darwin.so/api/v1/agents/{agentId}/billing"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.darwin.so/api/v1/agents/{agentId}/billing', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.darwin.so/api/v1/agents/{agentId}/billing",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.darwin.so/api/v1/agents/{agentId}/billing"
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))
}HttpResponse<String> response = Unirest.get("https://api.darwin.so/api/v1/agents/{agentId}/billing")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.darwin.so/api/v1/agents/{agentId}/billing")
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{
"currency": "usd",
"account": {
"autoTopup": {
"enabled": true,
"thresholdMinor": 1,
"amountMinor": 101
}
},
"wallet": {
"promotional": 1,
"funded": 1,
"earned": 1,
"pendingEarned": 1,
"reserved": 1,
"earnedDeficit": 1,
"spendable": 1,
"withdrawable": 1
},
"actions": {
"canWithdraw": true,
"hasPaymentMethod": true,
"payoutReady": true
},
"feePolicy": {
"standardPayout": {
"variableBps": 1,
"fixedMinor": 1
},
"instantPayout": {
"variableBps": 1,
"fixedMinor": 1
},
"instantPayoutIncludesStandardConnectCost": true
}
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}Authorizations
Darwin API keys begin with darwin_ and are created in Developer settings.
Path Parameters
Agent whose billing account to inspect.
⌘I