API reference

Profile and settings

Read your seller profile, and change your store's settings and payment methods.

Fetch a seller profile

POST/api/user/info
Key optional200 OK

Fields are returned at the top level, not nested.

Without a key — or with a key for a different seller — returns the public view a checkout page needs: uid, storename, status-only payment_methods, terms_of_service, privacy_policy, theme_color.

With your own key, returns the full private view including api_key, plan, rewards and completion_threshold.

banner is stored and updatable but is not exposed by this endpoint.

Parameters

user_iduidRequired
include_logostring

Strictly the string 1. Adds logo (base64 PNG, fitted to 200×200) at the cost of an extra query.

1

Returns

200 OK. Seller profile. Fields are top-level, not nested.

19 attributes
statusstring

Not success. This is the account's status, active or suspended, and it replaces the usual status field. Read account_status instead, and branch on the HTTP status code.

activesuspended
account_statusstring

The same value as status, under a name that does not collide with the envelope. Read this one. A client testing status == "success" would read a healthy response as a failure.

activesuspended
uiduid
usernamestring
storenamestring or null
api_keyuid
currencystring
payment_methodsobject

Full object, PayPal accounts included.

fee_payment_methodstring or null
plan_uidstring
plan_expiresinteger or null
plan_renewinteger or null
terms_of_servicestring or null
privacy_policystring or null
theme_colorstring or null
completion_thresholddecimal string
rewardsmap
4 child attributes
timeunix time
amountdecimal string
currencystring
payout_iduid
createdunix time
logostring or null

Only with include_logo=1.

Errors

uid_not_found404

No seller with that id.

Request
curl https://anonpay.org/api/user/info \
  -H "Authorization: Bearer $APA_KEY" \
  -d user_id=9c1f0b7a4e2d8f6a3b5c7d9e1f0a2b4c
import os
import requests

KEY = os.environ["APA_KEY"]

response = requests.post(
    "https://anonpay.org/api/user/info",
    headers={"Authorization": f"Bearer {KEY}"},
    data={
        "user_id": "9c1f0b7a4e2d8f6a3b5c7d9e1f0a2b4c",
    },
    timeout=30,
)
print(response.json())
const url = "https://anonpay.org/api/user/info";

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

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_HTTPHEADER => ["Authorization: Bearer $key"],
    CURLOPT_POSTFIELDS => http_build_query([
        "user_id" => '9c1f0b7a4e2d8f6a3b5c7d9e1f0a2b4c',
    ]),
    CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);
Response200 OK
{
  "status": "active",
  "account_status": "active",
  "uid": "4b8e2d0f6a1c3e5b7d9f0a2c4e6b8d0f",
  "username": "acmeshop",
  "storename": "AcmeShop",
  "api_key": "0e7c3a9f5b1d8e2c4a6f0b3d5e7a9c1f",
  "currency": "usd",
  "payment_methods": {
    "btc": {
      "status": "enabled"
    },
    "xmr": {
      "status": "enabled"
    },
    "ppl": {
      "status": "disabled",
      "accounts": []
    }
  },
  "fee_payment_method": "transaction",
  "plan_uid": "free",
  "plan_expires": null,
  "plan_renew": null,
  "terms_of_service": "https://acme.example/terms",
  "privacy_policy": null,
  "theme_color": "1A2B3C",
  "completion_threshold": "0.5",
  "rewards": {},
  "created": 1753000000
}

Update seller settings

POST/api/user/changesettings
API key200 OK

Partial update. Only the fields actually sent are touched. Omitting a field leaves it alone; sending it with an empty value (storename=) clears it.

Changing password or rotating the key with update_key additionally requires current_password.

data is {} unless update_key was used, in which case it carries new_key.

Image sizes: the whole request body is capped at 256 KB and base64 adds about a third, so a logo or banner can be roughly 190 KB before encoding. A larger one is 413, not 400.

Parameters

user_iduidRequired

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

usernameusername

Must be unique.

passwordpassword

New password, 12–256 characters. Requires current_password.

12 to 256 characters.
current_passwordstring

Required whenever password or update_key is used.

update_keystring

Rotates the API key. Requires current_password. The new key is returned in data.new_key.

Truetrue1
currencycurrency code

Display/settlement currency. Drives /api/user/stats and convert_currency_from_settings.

fee_payment_methodstring

transaction, or a crypto currency code — where transaction fees are charged from.

storenamestring

5–50 alphanumerics, or empty to clear.

terms_of_servicestring

http/https URL, or empty to clear. No DNS check.

Up to 2,048 characters.
privacy_policystring

http/https URL, or empty to clear. No DNS check.

Up to 2,048 characters.
theme_colorstring

3 or 6 hex digits, no leading #. Stored uppercase. Empty clears.

logobase64

Base64 image. Re-encoded to PNG, aspect ratio preserved, fitted into 200×200.

bannerbase64

Base64 image, processed identically to logo.

payment_methodsstring

JSON object, merged rather than replaced. Only status (enabled/disabled) is settable, and every key must already exist on the account.

paypal_accountsstring

JSON array replacing payment_methods.ppl.accounts wholesale. Max 25 entries, each requiring all of email, currency, gs, ff, status.

completion_thresholddecimal string

0–10, at most 2 decimals. Underpayment tolerated before a transaction counts as fully paid.

Returns

200 OK. Settings applied.

1 attributes
dataobject

Empty unless update_key was used.

1 child attributes
new_keyuid

Errors

parameter_invalid400

A parameter is present but fails validation.

not_permitted403

Authenticated, but the object belongs to someone else, or current_password was missing or wrong.

username_taken409

Another account already uses that username.

413413

The request body is larger than 256 KB.

Request
curl https://anonpay.org/api/user/changesettings \
  -H "Authorization: Bearer $APA_KEY" \
  -d user_id=4b8e2d0f6a1c3e5b7d9f0a2c4e6b8d0f \
  -d fee_payment_method=transaction \
  -d theme_color=1A2B3C
import os
import requests

KEY = os.environ["APA_KEY"]

response = requests.post(
    "https://anonpay.org/api/user/changesettings",
    headers={"Authorization": f"Bearer {KEY}"},
    data={
        "user_id": "4b8e2d0f6a1c3e5b7d9f0a2c4e6b8d0f",
        "fee_payment_method": "transaction",
        "theme_color": "1A2B3C",
    },
    timeout=30,
)
print(response.json())
const url = "https://anonpay.org/api/user/changesettings";

const response = await fetch(url, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.APA_KEY}` },
  body: new URLSearchParams({
    user_id: "4b8e2d0f6a1c3e5b7d9f0a2c4e6b8d0f",
    fee_payment_method: "transaction",
    theme_color: "1A2B3C",
  }),
});
console.log(await response.json());
$url = 'https://anonpay.org/api/user/changesettings';
$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',
        "fee_payment_method" => 'transaction',
        "theme_color" => '1A2B3C',
    ]),
    CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);
Response200 OK
{
  "status": "success",
  "data": {}
}