API reference
Profile and settings
Read your seller profile, and change your store's settings and payment methods.
Fetch a seller profile
/api/user/infoFields 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_iduidRequiredinclude_logostringStrictly the string
1. Addslogo(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
statusstringNot
success. This is the account's status,activeorsuspended, and it replaces the usualstatusfield. Readaccount_statusinstead, and branch on the HTTP status code.activesuspendedaccount_statusstringThe same value as
status, under a name that does not collide with the envelope. Read this one. A client testingstatus == "success"would read a healthy response as a failure.activesuspendeduiduidusernamestringstorenamestring or nullapi_keyuidcurrencystringpayment_methodsobjectFull object, PayPal accounts included.
fee_payment_methodstring or nullplan_uidstringplan_expiresinteger or nullplan_renewinteger or nullterms_of_servicestring or nullprivacy_policystring or nulltheme_colorstring or nullcompletion_thresholddecimal stringrewardsmap-
4 child attributes
timeunix timeamountdecimal stringcurrencystringpayout_iduid
createdunix timelogostring or nullOnly with
include_logo=1.
Errors
uid_not_found404No seller with that id.
curl https://anonpay.org/api/user/info \
-H "Authorization: Bearer $APA_KEY" \
-d user_id=9c1f0b7a4e2d8f6a3b5c7d9e1f0a2b4cimport 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);
{
"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
/api/user/changesettingsPartial 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_iduidRequiredMust be your own uid. Another seller's is
403 not_permitted.usernameusernameMust be unique.
passwordpasswordNew password, 12–256 characters. Requires
12 to 256 characters.current_password.current_passwordstringRequired whenever
passwordorupdate_keyis used.update_keystringRotates the API key. Requires
current_password. The new key is returned indata.new_key.Truetrue1currencycurrency codeDisplay/settlement currency. Drives
/api/user/statsandconvert_currency_from_settings.fee_payment_methodstringtransaction, or a crypto currency code — where transaction fees are charged from.storenamestring5–50 alphanumerics, or empty to clear.
terms_of_servicestring
Up to 2,048 characters.http/httpsURL, or empty to clear. No DNS check.privacy_policystring
Up to 2,048 characters.http/httpsURL, or empty to clear. No DNS check.theme_colorstring3 or 6 hex digits, no leading
#. Stored uppercase. Empty clears.logobase64Base64 image. Re-encoded to PNG, aspect ratio preserved, fitted into 200×200.
bannerbase64Base64 image, processed identically to
logo.payment_methodsstringJSON object, merged rather than replaced. Only
status(enabled/disabled) is settable, and every key must already exist on the account.paypal_accountsstringJSON array replacing
payment_methods.ppl.accountswholesale. Max 25 entries, each requiring all ofemail,currency,gs,ff,status.completion_thresholddecimal string0–10, at most 2 decimals. Underpayment tolerated before a transaction counts as fully paid.
Returns
200 OK. Settings applied.
1 attributes
dataobjectEmpty unless
update_keywas used.1 child attributes
new_keyuid
Errors
parameter_invalid400A parameter is present but fails validation.
not_permitted403Authenticated, but the object belongs to someone else, or
current_passwordwas missing or wrong.username_taken409Another account already uses that username.
413413The request body is larger than 256 KB.
curl https://anonpay.org/api/user/changesettings \
-H "Authorization: Bearer $APA_KEY" \
-d user_id=4b8e2d0f6a1c3e5b7d9f0a2c4e6b8d0f \
-d fee_payment_method=transaction \
-d theme_color=1A2B3Cimport 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);
{
"status": "success",
"data": {}
}