Reseller API
Buy AimJunkies license keys from your reseller balance, read your keys, and cancel or reset them from your own code.
Overview
The Reseller API is for approved resellers. Everything it does you can also do in the Reseller Hub; the API is for the day you want your own store to buy keys by itself. Every request is made for one organization, with a reseller API key made on the Reseller Hub API page.
Reads need only the key. Anything that moves money or changes a key (buying, cancelling, resetting a PC) must also be signed with the key’s signing secret, and buying needs an Idempotency-Key. Keys, API keys, top-ups, withdrawals and members are never reachable through the API.
Authentication
Send your API key and the organization it belongs to on every request:
X-API-Key: aimjunkies_live_…(orAuthorization: Bearer aimjunkies_live_…)X-Organization-Id: <your organization id>, required, and it must be the organization the key was made for.
A key has access levels, and each route needs one: read, purchase or manage. A key without the level a route needs is refused with 403 API_KEY_SCOPE_MISSING, and the body names requiredAccess. A key can also have an IP allowlist (up to 20 addresses or CIDR blocks); a request from any other address is refused with IP_NOT_ALLOWED.
| Access | Allows |
|---|---|
| read | Read the catalog, your prices, your balance and statement, your keys and purchases, and your webhook deliveries. A key with read alone gets keys without the license key itself. |
| purchase | Buy keys from your balance (POST /keys). An optional daily spend cap on the key limits it further. |
| manage | Cancel an unactivated key, reset a key’s PC, report a key that does not work and redeliver a webhook. |
HTTP/1.1 403 Forbidden
{
"statusCode": 403,
"error": "API_KEY_SCOPE_MISSING",
"code": "API_KEY_SCOPE_MISSING",
"message": "This API key does not have the \"purchase\" access this endpoint needs. ...",
"requiredAccess": "purchase"
}A key acts as the member who made it, with that member’s rights at the moment of the request. Owners and admins may do everything. A member with a buyer seat reads, buys and manages, within the daily spend and key caps an owner set for the seat; a read-only seat reads. When an owner removes or lowers a seat, the member’s keys stop at once (API_KEY_MAKER_INACTIVE), and keys holding a right the member lost are revoked. A key may also have its own daily spend cap (API_KEY_DAILY_SPEND_LIMIT).
The key’s maker must keep two-factor authentication on. Every reseller account needs an authenticator app or a passkey, and a key works only while the member who made it still has one. If they turn two-factor off (or remove their last passkey without an authenticator app), every key they made is refused with API_KEY_MAKER_NO_2FA, reads included. Nothing is revoked: once they turn it back on, the same key and signing secret work again. Purchases through an API key are never asked for a step-up; they are signed and limited to the key’s own access and caps instead.
Keys made before access levels hold all three, and keep exactly what their scopes allowed:
| Scope | Allows |
|---|---|
| reseller:read | Read the wholesale catalog, your prices, your balance and your statement. |
| reseller:keys:read | Read your keys and purchases. |
| reseller:keys:write | Buy keys from your balance, cancel unactivated keys and reset a key’s PC. Signed requests only. |
curl https://api.aimjunkies.net/api/v1/reseller/catalog \
-H "X-API-Key: aimjunkies_live_..." \
-H "X-Organization-Id: <your organization id>"Every answer carries X-AimJunkies-Mode: live or test, so you can tell which kind of key made the call.
Signing requests
Send X-AimJunkies-Signature: t=<unix seconds>,v1=<hex> on every POST, where v1 is the hex HMAC-SHA256 of <t>.<raw request body> with your signing secret (rsk_…, shown once when you make the key).
- Sign the exact bytes you send. Build the body string once and send that string.
- The timestamp may be at most 5 minutes from our clock (
SIGNATURE_EXPIRED). Keep your server clock in sync. - A signature works once. A second request with the same signature is
SIGNATURE_REPLAYED, so sign every attempt afresh, including a retry. - Cancel and HWID reset have no other body: sign and send
{"keyId": "<the key id in the path>"}. A signature made for one key cannot act on another. - After you rotate a signing secret, the old one keeps working for 24 hours.
- More than 20 bad signatures in 10 minutes on live keys pauses your account until our team reviews it. Learn to sign with a test key first; test keys do not count.
import { createHmac, randomUUID } from 'node:crypto';
const BASE = 'https://api.aimjunkies.net/api/v1/reseller';
const API_KEY = process.env.AJ_API_KEY; // aimjunkies_live_... or aimjunkies_test_...
const ORG_ID = process.env.AJ_ORGANIZATION_ID;
const SIGNING_SECRET = process.env.AJ_SIGNING_SECRET; // rsk_..., shown once when you made the key
// Sign the exact bytes you send: build the body string once and send that same string.
function sign(rawBody) {
const t = Math.floor(Date.now() / 1000);
const v1 = createHmac('sha256', SIGNING_SECRET).update(`${t}.${rawBody}`).digest('hex');
return `t=${t},v1=${v1}`;
}
export async function buyKeys({ offerId, planKey, quantity, maxPriceCents, reference }) {
const body = JSON.stringify({ offerId, planKey, quantity, maxPriceCents, reference });
const res = await fetch(`${BASE}/keys`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': API_KEY,
'X-Organization-Id': ORG_ID,
'Idempotency-Key': randomUUID(), // reuse the same value when you retry this purchase
'X-AimJunkies-Signature': sign(body),
},
body,
});
if (!res.ok) throw new Error(`${res.status} ${(await res.json()).code}`);
return res.json(); // the batch, status PROCESSING
}
export async function cancelKey(keyId) {
const body = JSON.stringify({ keyId }); // the signed body names the key in the path
const res = await fetch(`${BASE}/keys/${keyId}/cancel`, {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'X-API-Key': API_KEY, 'X-Organization-Id': ORG_ID, 'X-AimJunkies-Signature': sign(body) },
body,
});
return res.json();
}<?php
$base = 'https://api.aimjunkies.net/api/v1/reseller';
$apiKey = getenv('AJ_API_KEY');
$orgId = getenv('AJ_ORGANIZATION_ID');
$secret = getenv('AJ_SIGNING_SECRET');
function sign(string $rawBody, string $secret): string {
$t = time();
return 't=' . $t . ',v1=' . hash_hmac('sha256', $t . '.' . $rawBody, $secret);
}
$body = json_encode(['keyId' => $keyId]); // cancel and hwid-reset sign {"keyId": ...}
$ch = curl_init("$base/keys/$keyId/cancel");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $body, // send the same string you signed
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
"X-API-Key: $apiKey",
"X-Organization-Id: $orgId",
'X-AimJunkies-Signature: ' . sign($body, $secret),
],
]);
$response = curl_exec($ch);import hashlib, hmac, json, os, time, uuid
import requests
BASE = "https://api.aimjunkies.net/api/v1/reseller"
API_KEY = os.environ["AJ_API_KEY"]
ORG_ID = os.environ["AJ_ORGANIZATION_ID"]
SECRET = os.environ["AJ_SIGNING_SECRET"].encode()
def sign(raw_body: str) -> str:
t = int(time.time())
v1 = hmac.new(SECRET, f"{t}.{raw_body}".encode(), hashlib.sha256).hexdigest()
return f"t={t},v1={v1}"
def buy_keys(offer_id, plan_key, quantity, max_price_cents=None, reference=None):
body = json.dumps({"offerId": offer_id, "planKey": plan_key, "quantity": quantity,
"maxPriceCents": max_price_cents, "reference": reference})
res = requests.post(
f"{BASE}/keys",
data=body, # the same string you signed
headers={
"Content-Type": "application/json",
"X-API-Key": API_KEY,
"X-Organization-Id": ORG_ID,
"Idempotency-Key": str(uuid.uuid4()),
"X-AimJunkies-Signature": sign(body),
},
)
res.raise_for_status()
return res.json()Endpoints
All paths are under https://api.aimjunkies.net/api/v1/reseller. Amounts are whole cents, in USD.
| Route | Access | Signed | What it does |
|---|---|---|---|
| GET/catalog | read | No | The products open to you, each with its plans, your price per plan and whether it can be bought now. |
| GET/prices | read | No | One row per plan with your price, for a price sync. |
| GET/balance | read | No | Your balance, what is held for keys being issued and what you can spend now. |
| GET/ledger | read | No | Your statement, newest first. Query: page, limit. |
| POST/keys | purchase | Yes | Buy keys from your balance. Needs an Idempotency-Key. Answers the batch at once; keys are issued a moment later. |
| GET/keys | read | No | Your keys. Query: status, productId, reference, activated, from, to, page, limit. |
| GET/keys/{keyId} | read | No | One key. The license key itself only for a key with purchase or manage access (and a maker who still holds it). |
| GET/batches/{batchId} | read | No | One purchase: its status, counts, what was charged and the ids of its keys. |
| POST/keys/{keyId}/cancel | manage | Yes | Cancel a key that nobody has activated, inside the cancel window, for a refund to your balance. Only for keys with cancelSupported true. |
| POST/keys/{keyId}/hwid-reset | manage | Yes | Unbind a key from its PC so your customer can use it on another. Limited per key. |
| POST/keys/{keyId}/report | manage | Yes | Report a key that does not work. Opens a ticket with our team; one open report per key. Refunds nothing by itself. |
| GET/webhook-deliveries | read | No | Your last 50 webhook deliveries: event, status, attempts and the last error. |
| POST/webhook-deliveries/{deliveryId}/redeliver | manage | Yes | Send a past delivery again, signed with the endpoint’s current secret. Limited per delivery. Live keys only (a test key gets NOT_IN_SANDBOX). |
A key’s own view carries: id, batchId, status, productId, productName, line (the name of the line the key came from, or null), planKey, priceCents, reference, key (single-key reads only, and only for a key with purchase or manage access), activated, activatedAt, expiresAt, clockStartsAt, storedExpiresAt, cancellableUntil, cancelSupported, hwidResetsUsed, hwidResetsLimit, createdAt, issuedAt, cancelledAt and report (the key’s latest report, or null). List reads do not include the license key; read the one key to get it.
Buying keys
POST /keys with a signed JSON body and an Idempotency-Key header:
offerIdandplanKeycome fromGET /catalog(or/prices).quantity: a whole number from 1 to 1000, and no more than your tier’s bulk limit.maxPriceCents(optional): the most you will pay per key. If your price is higher, nothing is bought (PRICE_ABOVE_MAX). Use it so a price change never surprises you.reference(optional): up to 64 printable characters, such as your own order number. It comes back on the batch, the keys and the webhooks, and you can filter keys by it.customerCountry(optional): your end customer’s country, as a two-letter ISO 3166-1 code such asDE. Some products may only be sold to some countries: the catalog andGET /pricesshow each product’sallowedCountries(only these; empty means every country not blocked) andblockedCountries(never these). For a product with either list,customerCountryis required (COUNTRY_REQUIRED), and a country it may not be sold to isCOUNTRY_BLOCKED. Both are refused before anything is held. The country comes back on the batch and is part of the request for theIdempotency-Key.Idempotency-Key: 8 to 100 letters, digits, dot, colon, dash or underscore. Repeat the same key with the same body and you get the first purchase back withduplicate: trueand are not charged twice. The same key with a different body isIDEMPOTENCY_KEY_REUSED.
The answer is the batch, at once, with status: "PROCESSING". The price of the whole purchase is held from your balance first. Keys are issued a moment later and each is paid for as it is issued; a key that cannot be issued is released and its price returns. Poll GET /batches/{batchId}, or listen for batch.completed. When status is COMPLETED, keyIds lists the keys; read each with GET /keys/{keyId}.
{
"id": "5b1f8f3e-0c1a-4d62-9f43-2d8f0b6a7c10",
"status": "PROCESSING",
"offerId": "<offerId>",
"productId": "<productId>",
"productName": "<product name>",
"planKey": "<planKey>",
"quantity": 5,
"unitPriceCents": 1200,
"totalCents": 6000,
"issuedCount": 0,
"releasedCount": 0,
"pendingCount": 0,
"chargedCents": 0,
"returnedCents": 0,
"reference": "order-1042",
"customerCountry": "DE",
"createdAt": "2026-11-17T12:00:00.000Z",
"completedAt": null,
"keyIds": [],
"duplicate": false
}Cancel and HWID reset
POST /keys/{keyId}/cancel cancels a key nobody has activated, while its cancellableUntil time has not passed. The price returns to your balance. An activated key cannot be cancelled (KEY_ACTIVATED), and a key past its window is CANCEL_WINDOW_CLOSED.
Some products’ keys cannot be cancelled at all once bought. Their keys have cancelSupported: false and no cancellableUntil, and a cancel answers CANCEL_NOT_SUPPORTED. The key stays valid. Check cancelSupported before you promise your customer a refund.
POST /keys/{keyId}/hwid-reset unbinds an activated key from its PC so your customer can use it on another. Each key has a limited number of resets (hwidResetsLimit); past it, HWID_RESET_LIMIT.
A key that is bought but never activated is not kept forever: storedExpiresAt says when it will be revoked without a refund, and a license.revoked webhook follows.
When a plan’s time starts depends on the product, and clockStartsAt tells you for each key:
ACTIVATION: the time starts at the first launch.expiresAtstays empty until then, and a stored key can wait untilstoredExpiresAt.ISSUE: the time starts when the key is bought.expiresAtis set at once and does not move when the key is activated, andstoredExpiresAtis never later thanexpiresAt. Sell these keys soon after you buy them.null: a lifetime plan, with no end.
Report a key
POST /keys/{keyId}/report tells our team an issued key does not work. Sign the body {"keyId": "<the id in the path>", "reason": "...", "details": "..."}. reason is one of NOT_WORKING, INVALID_KEY, ALREADY_USED, WRONG_PRODUCT or OTHER; details is optional text (up to 1,000 characters; never paste the license key).
It opens a ticket with our team, linked to the key, and answers the report with its ticketNumber. A key has one open report at a time (KEY_REPORT_OPEN), and you can open up to 20 reports an hour (KEY_REPORT_LIMIT). A report refunds nothing by itself: our team checks the key, replaces or revokes it if it is faulty, then resolves the report, which sends license.report_resolved. The key’s report field shows where it stands.
POST /keys/9a4c2e1d-7b3f-4c8e-a1d2-5e6f7a8b9c0d/report
X-AimJunkies-Signature: t=...,v1=...
{ "keyId": "9a4c2e1d-7b3f-4c8e-a1d2-5e6f7a8b9c0d", "reason": "INVALID_KEY", "details": "Launcher says invalid on a fresh PC." }
200 OK
{
"id": "c3d1e0f2-...",
"status": "OPEN",
"reason": "INVALID_KEY",
"createdAt": "2026-11-18T10:00:00.000Z",
"resolvedAt": null,
"outcome": null,
"outcomeNote": null,
"ticketNumber": "TCK-7A2F4C"
}Webhooks
Add an HTTPS endpoint on the Reseller Hub API page and pick its events. You get a signing secret (whsec_…) once. Each delivery is a JSON POST with these headers:
X-AimJunkies-Signature: t=<unix>,v1=<hex>, made the same way as a request signature, with the endpoint’s secret.X-AimJunkies-Event(the event type) andX-AimJunkies-Delivery(the delivery id).User-Agent: AimJunkies-Webhooks/1.
Answer with any 2xx. A failed delivery is retried up to 6 times with growing delays. Verify the signature on the raw body and refuse a timestamp older than 5 minutes. The same event can arrive twice, so use the delivery id to ignore repeats. A webhook never contains the license key; read it with GET /keys/{keyId}.
Events are recorded together with the change they describe, so an event is never lost if our side restarts at the wrong moment; it may then arrive up to a minute or two late. Each event also carries an eventId, the same on every endpoint that receives it.
{
"id": "<delivery id>",
"eventId": "<event id>",
"type": "batch.completed",
"createdAt": "2026-11-17T12:00:09.000Z",
"organizationId": "<your organization id>",
"data": {
"batchId": "<batchId>",
"quantity": 5,
"issuedCount": 5,
"releasedCount": 0,
"chargedCents": 6000,
"returnedCents": 0,
"reference": "order-1042"
}
}| Event | When | data |
|---|---|---|
| license.issued | A key of a purchase was issued. | keyId, batchId, productId, planKey, priceCents, reference |
| license.activated | Your customer activated a key in the launcher for the first time. | keyId, productId, planKey, reference, activatedAt, expiresAt |
| license.cancelled | A key was cancelled and refunded. | keyId, refundCents |
| license.revoked | A key was revoked: by our staff, or because an unactivated stored key expired. | keyId, reason, and refundCents for an expired key |
| batch.completed | Every key of a purchase has an outcome. | batchId, quantity, issuedCount, releasedCount, chargedCents, returnedCents, reference |
| product.status_changed | The detection status of a product you can sell changed. | productId, productName, from, to |
| balance.low | A purchase took your balance under the threshold you set. | balanceCents, heldCents, thresholdCents, currency |
| reseller.paused | Your account was paused, by our staff or automatically. | status, trigger, reason |
| license.report_resolved | Our team resolved a key you reported. | keyId, reportId, reason, outcome (REPLACED, REVOKED, WORKS, OTHER), note, replacementKeyId, keyStatus |
| offer.rules_changed | The customer countries of a product you bought in the last 30 days changed. Purchases of a product with rules need customerCountry. | offerId, productId, productName, allowedCountries, blockedCountries |
The Test button on an endpoint sends a webhook.test delivery whatever events the endpoint chose.
GET /webhook-deliveries lists your last 50 deliveries with their status, attempts and lastError (the start of what your server answered, or why it could not be reached). POST /webhook-deliveries/{deliveryId}/redeliver sends one again, from the Reseller Hub or the API (sign the body {"deliveryId": "<the id in the path>"}). The body is the same, so its id stays the original delivery’s and your repeat check drops it if you already handled it; it is signed afresh when it is sent, with a new timestamp and the endpoint’s current secret. X-AimJunkies-Delivery carries the new delivery’s id. A delivery can be sent again 5 times an hour (REDELIVER_LIMIT). Deliveries go to your live endpoints, so a test key can list them but not redeliver one (403 NOT_IN_SANDBOX).
POST /webhook-deliveries/0d9e8f7a-6b5c-4d3e-8f2a-1b0c9d8e7f6a/redeliver
X-AimJunkies-Signature: t=...,v1=...
{ "deliveryId": "0d9e8f7a-6b5c-4d3e-8f2a-1b0c9d8e7f6a" }
200 OK
{ "deliveryId": "5f4e3d2c-...", "redeliveryOf": "0d9e8f7a-6b5c-4d3e-8f2a-1b0c9d8e7f6a" }import { createHmac, timingSafeEqual } from 'node:crypto';
// rawBody: the request body exactly as received (a Buffer or string, not re-serialized JSON).
export function verifyAimJunkiesWebhook(secret, rawBody, header, toleranceSeconds = 300) {
const parts = Object.fromEntries(String(header).split(',').map((kv) => kv.split('=')));
const t = Number(parts.t);
if (!Number.isFinite(t) || !parts.v1) return false;
if (Math.abs(Date.now() / 1000 - t) > toleranceSeconds) return false;
const expected = createHmac('sha256', secret).update(`${t}.${rawBody}`).digest('hex');
const a = Buffer.from(expected);
const b = Buffer.from(parts.v1);
return a.length === b.length && timingSafeEqual(a, b);
}
// Express: use express.raw({ type: 'application/json' }) on this route.
// app.post('/aimjunkies', (req, res) => {
// if (!verifyAimJunkiesWebhook(process.env.AJ_WEBHOOK_SECRET, req.body, req.get('X-AimJunkies-Signature'))) return res.sendStatus(400);
// const event = JSON.parse(req.body); // { id, type, createdAt, organizationId, data }
// res.sendStatus(200);
// });import hashlib, hmac, time
def verify_aimjunkies_webhook(secret: str, raw_body: bytes, header: str, tolerance: int = 300) -> bool:
parts = dict(kv.split("=", 1) for kv in header.split(","))
t, v1 = int(parts["t"]), parts["v1"]
if abs(time.time() - t) > tolerance:
return False
expected = hmac.new(secret.encode(), f"{t}.".encode() + raw_body, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, v1)Errors
A failed request answers with its HTTP status and a stable code. The codes never change meaning; the message is for people and may change.
{
"statusCode": 409,
"error": "PRICE_ABOVE_MAX",
"code": "PRICE_ABOVE_MAX",
"message": "..."
}A purchase refused for a low balance answers 402 INSUFFICIENT_BALANCE and names both amounts, in cents: requiredCents is what the request costs and availableCents is what you can spend now (money still on a PayPal hold is not counted). Nothing is held.
HTTP/1.1 402 Payment Required
{
"statusCode": 402,
"error": "INSUFFICIENT_BALANCE",
"message": "The spendable reseller balance is too low for this purchase.",
"requiredCents": 4500,
"availableCents": 1250
}| Code | HTTP | Meaning |
|---|---|---|
| INVALID_REQUEST | 400 | A field is missing or malformed. The message names it. |
| IDEMPOTENCY_KEY_REQUIRED | 400 | Send an Idempotency-Key of 8 to 100 letters, digits, dot, colon, dash or underscore. |
| IDEMPOTENCY_KEY_REUSED | 409 | That Idempotency-Key was used with a different request body. |
| PROGRAM_CLOSED | 403 | The Reseller Program is switched off. |
| PURCHASES_PAUSED | 423 | New purchases are paused for a while. Reads, your balance and machine resets still work, and nothing was held. Wait the seconds in Retry-After (about 5 minutes), then try again. |
| OFFER_PAUSED | 409 | This product is paused for resellers. It is not in the catalog until it resumes, and nothing was held. |
| COUNTRY_REQUIRED | 400 | This product has country rules (allowedCountries or blockedCountries in the catalog): send your customer's customerCountry. Nothing was held. |
| COUNTRY_BLOCKED | 403 | This product cannot be sold to customers in that country (blocked, or not on the product's allowed list). Nothing was held. |
| NOT_RESELLER | 403 | The organization is not a reseller. |
| RESELLER_NOT_ACTIVE | 403 | The reseller account is paused and cannot buy new keys. Reads still work. |
| RESELLER_SUSPENDED | 403 | The reseller account is suspended or terminated: its API keys are switched off. |
| NOT_ALLOWED | 403 | This account may not do that. |
| API_KEY_NOT_RESELLER | 403 | The API key is not a reseller key. Make one on the Reseller Hub API page. |
| API_KEY_MAKER_INACTIVE | 403 | The member who made this API key no longer holds a seat that may do this: they left, or an owner removed or lowered their seat (an owner or admin may do everything; a buyer seat reads, buys and manages; a read-only seat reads). Keys that hold a right their maker lost are revoked; make a new one. |
| API_KEY_MAKER_NO_2FA | 403 | The member who made this API key has turned off two-factor authentication (they have no authenticator app and no passkey). Every key they made is refused, reads included, until they turn it back on; nothing is revoked, so the same key and secret work again at once. |
| API_KEY_SCOPE_MISSING | 403 | The key does not have the access level this endpoint needs (read, purchase or manage). requiredAccess in the body names it. Change the key’s access on the Reseller Hub API page. |
| IP_NOT_ALLOWED | 403 | The request came from an address outside the key’s IP allowlist. |
| SIGNATURE_REQUIRED | 401 | A write without the X-AimJunkies-Signature header. |
| SIGNATURE_INVALID | 401 | The signature does not match the exact raw body and your current signing secret. |
| SIGNATURE_EXPIRED | 401 | The signature timestamp is more than 5 minutes from our clock. |
| SIGNATURE_REPLAYED | 401 | That signature was already used, on this route or another one. Sign every request afresh. |
| RATE_LIMITED | 429 | Too many requests for this key in the last minute. Wait the seconds in Retry-After (also retryAfterSeconds in the body). |
| PLAN_NOT_FOUND | 404 | No such offer or plan. |
| PLAN_NOT_OPEN | 409 | The plan is not open for wholesale. |
| PLAN_PAUSED | 409 | The plan is paused for resellers. Try again later. |
| NOT_ON_SALE | 409 | The product is not on sale right now. |
| PRODUCT_DOWN | 409 | The product is down or under maintenance right now and cannot be sold. |
| NO_LIVE_RELEASE | 409 | The product has no live release for the launcher yet. |
| SOURCE_UNAVAILABLE | 503 | Keys cannot be issued right now. Nothing was charged; try again. |
| SOURCE_CAPACITY | 429 | Key supply is at capacity for the moment. Try again shortly. |
| PRICE_ABOVE_MAX | 409 | Your price is above the maxPriceCents you sent. |
| BULK_LIMIT | 400 | More keys in one request than your tier allows. |
| PURCHASE_IN_FLIGHT_LIMIT | 429 | You already have the most purchases in progress at once (4 unless we set another number for you). Nothing was held. Wait the second in Retry-After, then send the same request with the same Idempotency-Key. |
| KEYS_PER_HOUR_LIMIT | 429 | More keys this hour than your tier allows. Retry-After (and retryAfterSeconds) is when your oldest counted key leaves the hour and room opens. |
| DAILY_SPEND_LIMIT | 429 | More spend today than your tier allows. Retry-After (and retryAfterSeconds) is when your oldest counted purchase leaves the 24 hours and room opens. |
| MEMBER_DAILY_SPEND_LIMIT | 429 | The buyer seat of the member who made the key reached its own 24-hour spend cap. Retry-After says when room opens. |
| MEMBER_KEYS_PER_DAY_LIMIT | 429 | The buyer seat of the member who made the key reached its own 24-hour key cap. Retry-After says when room opens. |
| API_KEY_DAILY_SPEND_LIMIT | 429 | This key reached its own 24-hour spend cap. Retry-After says when room opens. |
| INSUFFICIENT_BALANCE | 402 | Your spendable balance does not cover the purchase. The body names requiredCents and availableCents. Top up in the Reseller Hub. |
| WALLET_FROZEN | 403 | Your balance is frozen. |
| KEY_NOT_FOUND | 404 | No such key in your account. |
| BATCH_NOT_FOUND | 404 | No such purchase in your account. |
| KEY_NOT_ISSUED | 409 | The key has not been issued, so it cannot be cancelled or reset. |
| KEY_ACTIVATED | 409 | The key was activated. Activated keys cannot be cancelled. |
| CANCEL_WINDOW_CLOSED | 409 | The cancel window for this key has passed. |
| CANCEL_NOT_SUPPORTED | 409 | Keys of this product cannot be cancelled once bought (cancelSupported is false). The key stays valid. |
| KEY_NOT_ACTIVATED | 409 | The key has not been activated, so there is no PC to reset. |
| HWID_RESET_LIMIT | 429 | This key has used all its PC resets. |
| HWID_RESET_UNAVAILABLE | 503 | The reset could not be done right now. Try again. |
| KEY_NOT_REPORTABLE | 409 | Only an issued key can be reported. |
| KEY_REPORT_OPEN | 409 | The key already has an open report. Follow its ticket; you can report it again once our team resolves it. |
| KEY_REPORT_LIMIT | 429 | Too many reports in the last hour. Put several keys in one ticket. |
| REPORT_UNAVAILABLE | 503 | The report could not be opened right now. Nothing was kept; try again. |
| DELIVERY_NOT_FOUND | 404 | No such webhook delivery in your account. |
| NOT_IN_SANDBOX | 403 | A test key asked for something that would reach your live account, such as redelivering a webhook. Use a live key. |
| REDELIVER_LIMIT | 429 | That delivery was sent again 5 times in the last hour (or you redelivered 60 in all). Try later. |
Rate limits
Each API key may make a number of requests a minute that depends on your tier (by default 120 on Bronze, 240 on Silver and 600 on Gold; we can set another number for your account, so read it from the headers rather than hard-coding it). Every answer from the API carries:
X-RateLimit-Limit: the requests a minute your key may make;X-RateLimit-Remaining: how many are left in the current minute;X-RateLimit-Reset: the seconds until your usage is clear again if you send nothing more (at most 60); on a 429 it equalsRetry-After.
Past the limit you get 429 RATE_LIMITED with a Retry-After header: wait that many seconds, then retry. A 429 never held any money, but a write you retry must still be signed afresh. Buying has its own limits by tier too: keys per hour, spend per day and keys per request.
The headers are added once your key has been recognised and its account checked, so they are absent on a refusal that comes before that: a missing or wrong key (401), a developer key, an account that is not an active reseller or is suspended, and a request from an address outside the key’s allowlist (403). Past that point, including signature and validation errors, every answer has them. KEYS_PER_HOUR_LIMIT and DAILY_SPEND_LIMIT are 429s too and carry their own Retry-After: the time until room opens, not a fixed minute. PURCHASES_PAUSED is a 423 with Retry-After.
You can have a few purchases in progress at once (4 by default; we can set another number for your account). One more is refused at once with 429 PURCHASE_IN_FLIGHT_LIMIT and Retry-After: 1, before anything is held. Send the same request again with the same Idempotency-Key (signed afresh) once one of yours has finished: a burst of parallel purchases is not faster than a few at a time.
HTTP/1.1 200 OK
X-RateLimit-Limit: 120
X-RateLimit-Remaining: 87
X-RateLimit-Reset: 60
HTTP/1.1 429 Too Many Requests
X-RateLimit-Limit: 120
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 60
Retry-After: 17
{
"statusCode": 429,
"error": "RATE_LIMITED",
"message": "At most 120 requests a minute for this key. Try again in 17 seconds.",
"retryAfterSeconds": 17
}Every API request, with its status and error code but never a header, body, key or secret, is in the request log on the Reseller Hub API page.
Sandbox
Make a test key (aimjunkies_test_…) on the Reseller Hub API page to build your integration without spending money. A test key:
- reads the live catalog, prices and balance, so what you test against is what you will get;
- answers purchases, key reads, cancels and PC resets from the sandbox: the keys are fake (
TEST-XXXX-…), nothing is charged, and no real key is issued. Sandbox answers carrysandbox: true; - follows the same rules as a live key: signing, Idempotency-Key, validation and error codes. Sandbox keys are never activated, so a PC reset on one answers
KEY_NOT_ACTIVATED; - does not count towards the bad-signature auto-pause, which is where you learn to sign.