API Docs

Balance & Transactions

scope: invoices

Read-only endpoints that return your current account balance and a paginated ledger of all transactions. The balance is computed from the sum of all transactions — credits are positive, charges are negative. All monetary values are 64-bit integers in cents. See Conventions for storage guidelines.

Endpoints

GET
/v0/balance

Get current account balance

GET
/v0/balance/transactions

List transaction history

Get Balance

Returns the current account balance in cents. A positive balance means you have credit available.

curl
curl "https://api.3plguys.com/v0/balance" \
-H "Authorization: Bearer <token>"
Node.js
const res = await fetch("https://api.3plguys.com/v0/balance", {
headers: { Authorization: `Bearer ${token}` },
});
const data = await res.json();
console.log(`Balance: $${(data.balance / 100).toFixed(2)}`);
Python
res = httpx.get(
"https://api.3plguys.com/v0/balance",
headers={"Authorization": f"Bearer {token}"},
)
data = res.json()
print("Balance: $" + str(data["balance"] / 100))
Response
{
"balance": 150000,
"currency": "USD"
}

Response Fields

ParameterTypeDescription
balance*int64Current balance in cents. Positive = credit, negative = amount owed.
currency*stringAlways "USD"

List Transactions

Returns a paginated list of transactions ordered by most recent first. Each transaction represents a credit (payment received, refund) or charge (invoice, fee) on your account.

Query Parameters

ParameterTypeDescription
skipnumberNumber of records to skip (default: 0)
takenumberNumber of records to return (default: 10, max: 50)
curl
curl "https://api.3plguys.com/v0/balance/transactions?take=20" \
-H "Authorization: Bearer <token>"
Node.js
const res = await fetch(
"https://api.3plguys.com/v0/balance/transactions?take=20",
{ headers: { Authorization: `Bearer ${token}` } }
);
const transactions = await res.json();
Python
res = httpx.get(
"https://api.3plguys.com/v0/balance/transactions",
params={"take": 20},
headers={"Authorization": f"Bearer {token}"},
)
transactions = res.json()
Response
[
{
"id": "42",
"amount": 50000,
"note": "Payment received",
"currency": "USD",
"createdAt": "2026-03-01T12:00:00.000Z"
},
{
"id": "41",
"amount": -12500,
"note": "Invoice #INV-2026-0042 — Outbound SPD shipment",
"currency": "USD",
"createdAt": "2026-02-28T09:15:00.000Z"
}
]

Response Fields

ParameterTypeDescription
id*stringTransaction ID
amount*int64Amount in cents. Positive = credit, negative = charge.
note*stringHuman-readable description of the transaction
currency*stringAlways "USD"
createdAt*ISO 8601When the transaction was created

Balance calculation

Your balance is the sum of all transaction amounts. Each payment adds a positive amount, and each invoice or fee subtracts from it. Use the transaction list to build a detailed statement view.