Invoices with their lines and PDFs, the wallet's history, and balance promo codes.
Everything your accountant asks for, without opening the dashboard: every invoice (top-ups, traffic, orders) with its lines, the same PDF the dashboard downloads, and the wallet history behind the balance.
Balance codes add money to the balance once per account. Discount codes are different: they are sent as promo_code with a purchase.
List transactions
GET/api/v1/transactions
The wallet's history, newest first. amount_usd is signed: top-ups, bonuses and refunds are positive, purchases negative. Only paid rows count in the balance; a pending top-up waits for the payment, a failed one never arrived.
Query parameters
Name
Type
Description
type
string
Only one kind. One of: deposit,charge,refund,coupon,bonus,commission,adjustment.
import os
import requests
r = requests.get(
"https://aeonproxy.com/api/v1/transactions?limit=3",
headers={"Authorization": f"Bearer {os.environ['AEONPROXY_API_KEY']}"},
timeout=30,
)
data = r.json()
if not r.ok:
raise SystemExit(data["error"]["message"])
print(data)
// Node.js 18+, as an ES module (.mjs)
const res = await fetch("https://aeonproxy.com/api/v1/transactions?limit=3", {
headers: {
Authorization: `Bearer ${process.env.AEONPROXY_API_KEY}`,
},
});
const data = await res.json();
if (!res.ok) throw new Error(data.error.message);
console.log(data);
// .NET 6+ console app (top-level statements)
using System.Net.Http.Headers;
using var http = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://aeonproxy.com/api/v1/transactions?limit=3");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("AEONPROXY_API_KEY"));
var response = await http.SendAsync(request);
Console.WriteLine((int)response.StatusCode);
Console.WriteLine(await response.Content.ReadAsStringAsync());
import os
import requests
r = requests.get(
"https://aeonproxy.com/api/v1/invoices?limit=1",
headers={"Authorization": f"Bearer {os.environ['AEONPROXY_API_KEY']}"},
timeout=30,
)
data = r.json()
if not r.ok:
raise SystemExit(data["error"]["message"])
print(data)
// Node.js 18+, as an ES module (.mjs)
const res = await fetch("https://aeonproxy.com/api/v1/invoices?limit=1", {
headers: {
Authorization: `Bearer ${process.env.AEONPROXY_API_KEY}`,
},
});
const data = await res.json();
if (!res.ok) throw new Error(data.error.message);
console.log(data);
// .NET 6+ console app (top-level statements)
using System.Net.Http.Headers;
using var http = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://aeonproxy.com/api/v1/invoices?limit=1");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("AEONPROXY_API_KEY"));
var response = await http.SendAsync(request);
Console.WriteLine((int)response.StatusCode);
Console.WriteLine(await response.Content.ReadAsStringAsync());
import os
import requests
r = requests.get(
"https://aeonproxy.com/api/v1/invoices/101962",
headers={"Authorization": f"Bearer {os.environ['AEONPROXY_API_KEY']}"},
timeout=30,
)
data = r.json()
if not r.ok:
raise SystemExit(data["error"]["message"])
print(data)
// Node.js 18+, as an ES module (.mjs)
const res = await fetch("https://aeonproxy.com/api/v1/invoices/101962", {
headers: {
Authorization: `Bearer ${process.env.AEONPROXY_API_KEY}`,
},
});
const data = await res.json();
if (!res.ok) throw new Error(data.error.message);
console.log(data);
// .NET 6+ console app (top-level statements)
using System.Net.Http.Headers;
using var http = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://aeonproxy.com/api/v1/invoices/101962");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("AEONPROXY_API_KEY"));
var response = await http.SendAsync(request);
Console.WriteLine((int)response.StatusCode);
Console.WriteLine(await response.Content.ReadAsStringAsync());
import os
import requests
r = requests.get(
"https://aeonproxy.com/api/v1/invoices/101962/pdf",
headers={"Authorization": f"Bearer {os.environ['AEONPROXY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
with open("invoice-101962.pdf", "wb") as f:
f.write(r.content)
// Node.js 18+, as an ES module (.mjs)
import { writeFile } from "node:fs/promises";
const res = await fetch("https://aeonproxy.com/api/v1/invoices/101962/pdf", {
headers: {
Authorization: `Bearer ${process.env.AEONPROXY_API_KEY}`,
},
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
await writeFile("invoice-101962.pdf", Buffer.from(await res.arrayBuffer()));
// .NET 6+ console app (top-level statements)
using System.Net.Http.Headers;
using var http = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://aeonproxy.com/api/v1/invoices/101962/pdf");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("AEONPROXY_API_KEY"));
var response = await http.SendAsync(request);
Console.WriteLine((int)response.StatusCode);
if (response.IsSuccessStatusCode)
await File.WriteAllBytesAsync("invoice-101962.pdf", await response.Content.ReadAsByteArrayAsync());
Response 200text/plain
%PDF-1.3 … (the file, application/pdf)
Errors
Status
Code
When
404
not_found
no invoice with this number on your account
Activate a balance code
POST/api/v1/promo-codes/activate
Adds a balance code's amount to the balance. Each code works once per account, and the account needs a confirmed email and a linked Telegram, as in the dashboard's Coupon page.
import os
import requests
r = requests.post(
"https://aeonproxy.com/api/v1/promo-codes/activate",
headers={"Authorization": f"Bearer {os.environ['AEONPROXY_API_KEY']}"},
json={"code": "SPRING5"},
timeout=30,
)
data = r.json()
if not r.ok:
raise SystemExit(data["error"]["message"])
print(data)
// Node.js 18+, as an ES module (.mjs)
const res = await fetch("https://aeonproxy.com/api/v1/promo-codes/activate", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AEONPROXY_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ code: "SPRING5" }),
});
const data = await res.json();
if (!res.ok) throw new Error(data.error.message);
console.log(data);
// .NET 6+ console app (top-level statements)
using System.Net.Http.Headers;
using System.Text;
using var http = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://aeonproxy.com/api/v1/promo-codes/activate");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("AEONPROXY_API_KEY"));
request.Content = new StringContent("{\"code\":\"SPRING5\"}", Encoding.UTF8, "application/json");
var response = await http.SendAsync(request);
Console.WriteLine((int)response.StatusCode);
Console.WriteLine(await response.Content.ReadAsStringAsync());