API reference

History

Your transactions, withdrawals, ledger entries and notifications, a page at a time, newest first.

List your transactions

POST/api/user/transactions
API key200 OK

Newest first. This list view carries no payment object, no private_key and no seller_id — use /api/transaction/info for those.

An unrecognised filter_status is 400 parameter_invalid, not an empty list.

Parameters

user_iduidRequired

Must be your own uid. Another seller's is 403 not_permitted.

rowsinteger

Page size, from 1 to 100. Send it together with page; send neither for the first 20 rows.

From 1 to 100.
pageinteger

1-based page number. page=0 is 400 parameter_invalid.

At least 1.
filter_statusstring
pendingexpiredcompletedcancelled
deposit0 or 1

1 for deposit transactions, 0 for the rest. Any value other than 1 reads as 0.

Returns

200 OK. A page of transactions, newest first.

1 attributes
transactionsarray of objects
10 child attributes
uiduid
amount_topaystring or null
amount_paidstring or null
currencystring or null
statusstring
pendingcompletedcancelledexpired
payment_methodstring or null
createdunix time
expiresunix time
cancelledinteger or null
completedinteger or null

Errors

parameter_invalid400

A parameter is present but fails validation.

Request
curl https://anonpay.org/api/user/transactions \
  -H "Authorization: Bearer $APA_KEY" \
  -d user_id=4b8e2d0f6a1c3e5b7d9f0a2c4e6b8d0f \
  -d rows=50 \
  -d page=1
import os
import requests

KEY = os.environ["APA_KEY"]

response = requests.post(
    "https://anonpay.org/api/user/transactions",
    headers={"Authorization": f"Bearer {KEY}"},
    data={
        "user_id": "4b8e2d0f6a1c3e5b7d9f0a2c4e6b8d0f",
        "rows": "50",
        "page": "1",
    },
    timeout=30,
)
print(response.json())
const url = "https://anonpay.org/api/user/transactions";

const response = await fetch(url, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.APA_KEY}` },
  body: new URLSearchParams({
    user_id: "4b8e2d0f6a1c3e5b7d9f0a2c4e6b8d0f",
    rows: "50",
    page: "1",
  }),
});
console.log(await response.json());
$url = 'https://anonpay.org/api/user/transactions';
$key = getenv("APA_KEY");

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_HTTPHEADER => ["Authorization: Bearer $key"],
    CURLOPT_POSTFIELDS => http_build_query([
        "user_id" => '4b8e2d0f6a1c3e5b7d9f0a2c4e6b8d0f',
        "rows" => '50',
        "page" => '1',
    ]),
    CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);
Response200 OK
{
  "status": "success",
  "transactions": [
    {
      "uid": "9c1f0b7a4e2d8f6a3b5c7d9e1f0a2b4c",
      "amount_topay": "20",
      "amount_paid": "20",
      "currency": "usd",
      "status": "completed",
      "payment_method": "btc",
      "created": 1753919400,
      "expires": 1754005800,
      "cancelled": null,
      "completed": 1753920000
    }
  ]
}

List your withdrawals

POST/api/user/withdrawals
API key200 OK

amount is what was charged, amount_original is what the recipient receives, and fee is the difference. crypto_transaction_id is null until broadcast.

Parameters

user_iduidRequired

Must be your own uid. Another seller's is 403 not_permitted.

rowsinteger

Page size, from 1 to 100. Send it together with page; send neither for the first 20 rows.

From 1 to 100.
pageinteger

1-based page number. page=0 is 400 parameter_invalid.

At least 1.
filter_statusstring

Where a withdrawal is in its life.

pending
Queued. Nothing has been sent yet.
submitted
Handed to the payout node, which owns the retries.
completed
Broadcast. crypto_transaction_id is set.
failed
Definitely not sent.
needs_review
Outcome unknown. Verify on-chain before acting; it is never retried automatically.
refunded
Reversed back to your balance.

Returns

200 OK. A page of withdrawals, newest first.

1 attributes
withdrawalsarray of objects
10 child attributes
uiduid
amountdecimal string

What was charged to the seller's balance.

feedecimal string

The difference between the two.

amount_originaldecimal string

What is sent to the recipient.

currencystring

The currency withdrawn.

recipientstring

The address paid.

statusstring

Where a withdrawal is in its life.

pending
Queued. Nothing has been sent yet.
submitted
Handed to the payout node, which owns the retries.
completed
Broadcast. crypto_transaction_id is set.
failed
Definitely not sent.
needs_review
Outcome unknown. Verify on-chain before acting; it is never retried automatically.
refunded
Reversed back to your balance.
createdunix time
completedunix time or null
crypto_transaction_idstring or null

On-chain txid once broadcast.

Errors

parameter_invalid400

A parameter is present but fails validation.

Request
curl https://anonpay.org/api/user/withdrawals \
  -H "Authorization: Bearer $APA_KEY" \
  -d user_id=4b8e2d0f6a1c3e5b7d9f0a2c4e6b8d0f \
  -d rows=50 \
  -d page=1
import os
import requests

KEY = os.environ["APA_KEY"]

response = requests.post(
    "https://anonpay.org/api/user/withdrawals",
    headers={"Authorization": f"Bearer {KEY}"},
    data={
        "user_id": "4b8e2d0f6a1c3e5b7d9f0a2c4e6b8d0f",
        "rows": "50",
        "page": "1",
    },
    timeout=30,
)
print(response.json())
const url = "https://anonpay.org/api/user/withdrawals";

const response = await fetch(url, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.APA_KEY}` },
  body: new URLSearchParams({
    user_id: "4b8e2d0f6a1c3e5b7d9f0a2c4e6b8d0f",
    rows: "50",
    page: "1",
  }),
});
console.log(await response.json());
$url = 'https://anonpay.org/api/user/withdrawals';
$key = getenv("APA_KEY");

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_HTTPHEADER => ["Authorization: Bearer $key"],
    CURLOPT_POSTFIELDS => http_build_query([
        "user_id" => '4b8e2d0f6a1c3e5b7d9f0a2c4e6b8d0f',
        "rows" => '50',
        "page" => '1',
    ]),
    CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);
Response200 OK
{
  "status": "success",
  "withdrawals": [
    {
      "uid": "7b9d0f2a4c6e8b0d2f4a6c8e0b2d4f6a",
      "amount": "0.0153",
      "fee": "0.000042",
      "amount_original": "0.015258",
      "currency": "btc",
      "recipient": "bc1q9h7garjf3p8rk5tjz7w8a4v3gmn2zd7xkq8fy6",
      "status": "completed",
      "created": 1753922000,
      "completed": 1753923600,
      "crypto_transaction_id": "4f3e2d1c0b9a87766554433221100ffe4f3e2d1c0b9a87766554433221100ffe"
    }
  ]
}

List ledger entries

POST/api/user/funds
API key200 OK

Every entry that moved a balance, newest first. amount is signed — credits positive, debits negative.

Parameters

user_iduidRequired

Must be your own uid. Another seller's is 403 not_permitted.

rowsinteger

Page size, from 1 to 100. Send it together with page; send neither for the first 20 rows.

From 1 to 100.
pageinteger

1-based page number. page=0 is 400 parameter_invalid.

At least 1.

Returns

200 OK. A page of ledger entries, newest first.

1 attributes
fundsarray of objects
5 child attributes
uiduid
amountdecimal string

Signed — credits positive, debits negative.

currencystring
typestring

adjustment is an operator correction and refund a reversed withdrawal; both are reachable on an ordinary seller ledger. exchange and registration bonus are historical spellings that predate the current writers and still exist on old rows — match on the value you receive rather than assuming today's set.

revenuedepositwithdrawalexchange_outexchange_infeerewardregistration_bonusadjustmentrefundexchangeregistration bonus
timeunix time

Errors

parameter_invalid400

A parameter is present but fails validation.

Request
curl https://anonpay.org/api/user/funds \
  -H "Authorization: Bearer $APA_KEY" \
  -d user_id=4b8e2d0f6a1c3e5b7d9f0a2c4e6b8d0f \
  -d rows=50 \
  -d page=1
import os
import requests

KEY = os.environ["APA_KEY"]

response = requests.post(
    "https://anonpay.org/api/user/funds",
    headers={"Authorization": f"Bearer {KEY}"},
    data={
        "user_id": "4b8e2d0f6a1c3e5b7d9f0a2c4e6b8d0f",
        "rows": "50",
        "page": "1",
    },
    timeout=30,
)
print(response.json())
const url = "https://anonpay.org/api/user/funds";

const response = await fetch(url, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.APA_KEY}` },
  body: new URLSearchParams({
    user_id: "4b8e2d0f6a1c3e5b7d9f0a2c4e6b8d0f",
    rows: "50",
    page: "1",
  }),
});
console.log(await response.json());
$url = 'https://anonpay.org/api/user/funds';
$key = getenv("APA_KEY");

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_HTTPHEADER => ["Authorization: Bearer $key"],
    CURLOPT_POSTFIELDS => http_build_query([
        "user_id" => '4b8e2d0f6a1c3e5b7d9f0a2c4e6b8d0f',
        "rows" => '50',
        "page" => '1',
    ]),
    CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);
Response200 OK
{
  "status": "success",
  "funds": [
    {
      "uid": "2e4c6a8f0b1d3e5c7a9f1b3d5e7c9a0b",
      "amount": "0.00021",
      "currency": "btc",
      "type": "revenue",
      "time": 1753920000
    },
    {
      "uid": "6c8e0a2b4d6f8a0c2e4b6d8f0a2c4e6b",
      "amount": "-0.0153",
      "currency": "btc",
      "type": "withdrawal",
      "time": 1753922000
    }
  ]
}

List notifications

POST/api/user/notifications
API key200 OK

Read-only. There is no mark-as-read endpoint.

Parameters

user_iduidRequired

Must be your own uid. Another seller's is 403 not_permitted.

rowsinteger

Page size, from 1 to 100. Send it together with page; send neither for the first 20 rows.

From 1 to 100.
pageinteger

1-based page number. page=0 is 400 parameter_invalid.

At least 1.

Returns

200 OK. A page of notifications, newest first.

1 attributes
notificationsarray of objects
5 child attributes
uiduid
titlestring
messagestring
urlstring or null
timeunix time

Errors

parameter_invalid400

A parameter is present but fails validation.

Request
curl https://anonpay.org/api/user/notifications \
  -H "Authorization: Bearer $APA_KEY" \
  -d user_id=4b8e2d0f6a1c3e5b7d9f0a2c4e6b8d0f \
  -d rows=50 \
  -d page=1
import os
import requests

KEY = os.environ["APA_KEY"]

response = requests.post(
    "https://anonpay.org/api/user/notifications",
    headers={"Authorization": f"Bearer {KEY}"},
    data={
        "user_id": "4b8e2d0f6a1c3e5b7d9f0a2c4e6b8d0f",
        "rows": "50",
        "page": "1",
    },
    timeout=30,
)
print(response.json())
const url = "https://anonpay.org/api/user/notifications";

const response = await fetch(url, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.APA_KEY}` },
  body: new URLSearchParams({
    user_id: "4b8e2d0f6a1c3e5b7d9f0a2c4e6b8d0f",
    rows: "50",
    page: "1",
  }),
});
console.log(await response.json());
$url = 'https://anonpay.org/api/user/notifications';
$key = getenv("APA_KEY");

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_HTTPHEADER => ["Authorization: Bearer $key"],
    CURLOPT_POSTFIELDS => http_build_query([
        "user_id" => '4b8e2d0f6a1c3e5b7d9f0a2c4e6b8d0f',
        "rows" => '50',
        "page" => '1',
    ]),
    CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);
Response200 OK
{
  "status": "success",
  "notifications": [
    {
      "uid": "1a3c5e7b9d0f2a4c6e8b0d2f4a6c8e0b",
      "title": "Payment received",
      "message": "Transaction 9c1f0b7a completed.",
      "url": null,
      "time": 1753920000
    }
  ]
}