REST API v3
Balance and transactions
Your balance, what’s committed to running orders, your wholesale tier and the full ledger.
The balance object
Your balance, what's committed to running orders, and your wholesale tier.
Orders are paid up front, so balance is already net of everything running. in_flight shows how much of that is still in delivery — any part that isn’t delivered comes back as a refund.
objectstringbalance.balancebalancedecimal stringcurrencystringUSD.USDin_flightdecimal stringpending, processing or in_progress. Already deducted from balance; any undelivered part comes back as a refund.low_balance_thresholddecimal string or nulltierobjectShow 5 child fieldsHide child fields
idstringstartersellerresellerwholesalesourcenamestringdiscount_percentnumberspend_30ddecimal stringnextobject or nullShow 4 child fieldsHide child fields
idstringnamestringdiscount_percentnumberspend_neededdecimal string{
"object": "balance",
"balance": "442.51035",
"currency": "USD",
"in_flight": "86.02460",
"low_balance_threshold": "150.00000",
"tier": {
"id": "reseller",
"name": "Reseller",
"discount_percent": 15,
"spend_30d": "1057.48965",
"next": {
"id": "wholesale",
"name": "Wholesale",
"discount_percent": 25,
"spend_needed": "3942.51035"
}
}
}The transaction object
One ledger row. Every change to your balance has one, with the balance after it.
Each balance change is one row with the balance after it, so a running total always reconciles. A partial order has two rows: the charge when it was placed and the refund when it stopped (see Charges and refunds).
idstringtxn_…. Use it as starting_after.objectstringtransaction.transactiontypestringdepositchargerefundadjustmentamountdecimal stringbalance_afterdecimal stringorderinteger or nullrefillinteger or nullpaymentstring or nulldescriptionstringcreated_atISO 8601 string{
"id": "txn_lgWDr5M6xpGd6V",
"object": "transaction",
"type": "refund",
"amount": "3.19862",
"balance_after": "444.71835",
"order": 184520,
"refill": null,
"payment": null,
"description": "Refund for order #184520: 3,029 not delivered",
"created_at": "2026-11-12T11:46:25.994Z"
}Retrieve your balance
/api/v3/balanceYour available balance, what’s committed to running orders, and your wholesale tier with the spend needed for the next one.
Needs the balance:read scope (read balance). About scopes
Request
curl https://ultrasmm.io/api/v3/balance \
-H 'Authorization: Bearer tk_live_your_key_here'<?php
$ch = curl_init('https://ultrasmm.io/api/v3/balance');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer tk_live_your_key_here',
],
]);
$body = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);
if ($status >= 400) {
// $body['error']['code'] is stable; switch on it.
throw new RuntimeException($body['error']['code'] . ': ' . $body['error']['message']);
}
print_r($body);import requests
res = requests.get(
"https://ultrasmm.io/api/v3/balance",
headers={
"Authorization": "Bearer tk_live_your_key_here",
},
timeout=30,
)
body = res.json()
if not res.ok:
# body["error"]["code"] is stable; switch on it.
raise RuntimeError(f'{body["error"]["code"]}: {body["error"]["message"]}')
print(body)const res = await fetch("https://ultrasmm.io/api/v3/balance", {
headers: {
Authorization: "Bearer tk_live_your_key_here",
},
})
const body = await res.json()
if (!res.ok) {
// body.error.code is stable; switch on it.
throw new Error(`${body.error.code}: ${body.error.message}`)
}
console.log(body)Response
200 with the balance object.
{
"object": "balance",
"balance": "442.51035",
"currency": "USD",
"in_flight": "86.02460",
"low_balance_threshold": "150.00000",
"tier": {
"id": "reseller",
"name": "Reseller",
"discount_percent": 15,
"spend_30d": "1057.48965",
"next": {
"id": "wholesale",
"name": "Wholesale",
"discount_percent": 25,
"spend_needed": "3942.51035"
}
}
}Errors
Only the errors every endpoint can return: invalid_api_key, ip_not_allowed, account_suspended, rate_limited, insufficient_scope, internal_error.
List transactions
/api/v3/transactionsYour ledger, newest first: every deposit, order charge, refund and adjustment with the balance after it.
Needs the balance:read scope (read balance). About scopes
Query parameters
limitinteger251–100starting_afterstringnext_cursor (a txn_… ID) from the previous page.Request
curl "https://ultrasmm.io/api/v3/transactions?limit=2" \
-H 'Authorization: Bearer tk_live_your_key_here'<?php
$ch = curl_init('https://ultrasmm.io/api/v3/transactions?limit=2');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer tk_live_your_key_here',
],
]);
$body = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);
if ($status >= 400) {
// $body['error']['code'] is stable; switch on it.
throw new RuntimeException($body['error']['code'] . ': ' . $body['error']['message']);
}
print_r($body);import requests
res = requests.get(
"https://ultrasmm.io/api/v3/transactions",
params={
"limit": "2",
},
headers={
"Authorization": "Bearer tk_live_your_key_here",
},
timeout=30,
)
body = res.json()
if not res.ok:
# body["error"]["code"] is stable; switch on it.
raise RuntimeError(f'{body["error"]["code"]}: {body["error"]["message"]}')
print(body)const res = await fetch("https://ultrasmm.io/api/v3/transactions?limit=2", {
headers: {
Authorization: "Bearer tk_live_your_key_here",
},
})
const body = await res.json()
if (!res.ok) {
// body.error.code is stable; switch on it.
throw new Error(`${body.error.code}: ${body.error.message}`)
}
console.log(body)Response
200 with a list of transaction objects.
{
"object": "list",
"data": [
{
"id": "txn_QozK1kIjNfYBxs",
"object": "transaction",
"type": "charge",
"amount": "-2.20800",
"balance_after": "442.51035",
"order": 184610,
"refill": null,
"payment": null,
"description": "Order #184610: 1,000 × Followers — Premium, 30-day refill",
"created_at": "2026-11-15T10:14:03.532Z"
},
{
"id": "txn_lgWDr5M6xpGd6V",
"object": "transaction",
"type": "refund",
"amount": "3.19862",
"balance_after": "444.71835",
"order": 184520,
"refill": null,
"payment": null,
"description": "Refund for order #184520: 3,029 not delivered",
"created_at": "2026-11-12T11:46:25.994Z"
}
],
"has_more": true,
"next_cursor": "txn_lgWDr5M6xpGd6V"
}Errors
Only the errors every endpoint can return: invalid_api_key, ip_not_allowed, account_suspended, rate_limited, insufficient_scope, internal_error.
Something unclear or out of date? Write to [email protected] and quote the page.