Get Agent Earnings
curl --request GET \
--url https://pulsarpay.io/api/v1/agents/earnings \
--header 'x-agent-key: <x-agent-key>'import requests
url = "https://pulsarpay.io/api/v1/agents/earnings"
headers = {"x-agent-key": "<x-agent-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-agent-key': '<x-agent-key>'}};
fetch('https://pulsarpay.io/api/v1/agents/earnings', 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://pulsarpay.io/api/v1/agents/earnings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-agent-key: <x-agent-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 := "https://pulsarpay.io/api/v1/agents/earnings"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-agent-key", "<x-agent-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pulsarpay.io/api/v1/agents/earnings")
.header("x-agent-key", "<x-agent-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pulsarpay.io/api/v1/agents/earnings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-agent-key"] = '<x-agent-key>'
response = http.request(request)
puts response.read_body{
"earnings": [
{
"currency": "USDC",
"totalEarned": 1550.75,
"totalCharges": 142,
"currentBalance": 18.889
}
]
}{
"error": "invalid or disabled agent key"
}Endpoint examples
Get Earnings
Returns a summary of the agent’s earnings broken down by currency. Each supported currency (USDC and USD) has an independent balance. The response includes total earned, total charges, and current balance available for withdrawal per currency.
GET
/
api
/
v1
/
agents
/
earnings
Get Agent Earnings
curl --request GET \
--url https://pulsarpay.io/api/v1/agents/earnings \
--header 'x-agent-key: <x-agent-key>'import requests
url = "https://pulsarpay.io/api/v1/agents/earnings"
headers = {"x-agent-key": "<x-agent-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-agent-key': '<x-agent-key>'}};
fetch('https://pulsarpay.io/api/v1/agents/earnings', 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://pulsarpay.io/api/v1/agents/earnings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-agent-key: <x-agent-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 := "https://pulsarpay.io/api/v1/agents/earnings"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-agent-key", "<x-agent-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pulsarpay.io/api/v1/agents/earnings")
.header("x-agent-key", "<x-agent-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pulsarpay.io/api/v1/agents/earnings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-agent-key"] = '<x-agent-key>'
response = http.request(request)
puts response.read_body{
"earnings": [
{
"currency": "USDC",
"totalEarned": 1550.75,
"totalCharges": 142,
"currentBalance": 18.889
}
]
}{
"error": "invalid or disabled agent key"
}Headers
The unique API key of the agent. Used to identify the account and fetch its specific earning statistics.
Response
Agent earnings and statistics retrieved successfully.
One entry per supported currency. Each currency maintains an independent balance.
Show child attributes
Show child attributes
⌘I

