Menu
DevelopersReseller API

Reseller API

Buy AimJunkies license keys from your reseller balance, read your keys, and cancel or reset them from your own code.

Base URL https://api.aimjunkies.net/api/v1/reseller

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.

Not a reseller yet? Applications are reviewed by our team. Start on the Reseller Program page .

Authentication

Send your API key and the organization it belongs to on every request:

  • X-API-Key: aimjunkies_live_… (or Authorization: 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.

AccessAllows
readRead 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.
purchaseBuy keys from your balance (POST /keys). An optional daily spend cap on the key limits it further.
manageCancel an unactivated key, reset a key’s PC, report a key that does not work and redeliver a webhook.
403, missing access
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:

ScopeAllows
reseller:readRead the wholesale catalog, your prices, your balance and your statement.
reseller:keys:readRead your keys and purchases.
reseller:keys:writeBuy keys from your balance, cancel unactivated keys and reset a key’s PC. Signed requests only.
Read the catalog
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.
Node
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
<?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);
Python
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.

RouteAccessSignedWhat it does
GET/catalogreadNoThe products open to you, each with its plans, your price per plan and whether it can be bought now.
GET/pricesreadNoOne row per plan with your price, for a price sync.
GET/balancereadNoYour balance, what is held for keys being issued and what you can spend now.
GET/ledgerreadNoYour statement, newest first. Query: page, limit.
POST/keyspurchaseYesBuy keys from your balance. Needs an Idempotency-Key. Answers the batch at once; keys are issued a moment later.
GET/keysreadNoYour keys. Query: status, productId, reference, activated, from, to, page, limit.
GET/keys/{keyId}readNoOne key. The license key itself only for a key with purchase or manage access (and a maker who still holds it).
GET/batches/{batchId}readNoOne purchase: its status, counts, what was charged and the ids of its keys.
POST/keys/{keyId}/cancelmanageYesCancel 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-resetmanageYesUnbind a key from its PC so your customer can use it on another. Limited per key.
POST/keys/{keyId}/reportmanageYesReport a key that does not work. Opens a ticket with our team; one open report per key. Refunds nothing by itself.
GET/webhook-deliveriesreadNoYour last 50 webhook deliveries: event, status, attempts and the last error.
POST/webhook-deliveries/{deliveryId}/redelivermanageYesSend 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:

  • offerId and planKey come from GET /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 as DE. Some products may only be sold to some countries: the catalog and GET /prices show each product’s allowedCountries (only these; empty means every country not blocked) and blockedCountries (never these). For a product with either list, customerCountry is required (COUNTRY_REQUIRED), and a country it may not be sold to is COUNTRY_BLOCKED. Both are refused before anything is held. The country comes back on the batch and is part of the request for the Idempotency-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 with duplicate: true and are not charged twice. The same key with a different body is IDEMPOTENCY_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}.

Answer of POST /keys
{
  "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. expiresAt stays empty until then, and a stored key can wait until storedExpiresAt.
  • ISSUE: the time starts when the key is bought. expiresAt is set at once and does not move when the key is activated, and storedExpiresAt is never later than expiresAt. 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.

Report a key
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) and X-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.

Body
{
  "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"
  }
}
EventWhendata
license.issuedA key of a purchase was issued.keyId, batchId, productId, planKey, priceCents, reference
license.activatedYour customer activated a key in the launcher for the first time.keyId, productId, planKey, reference, activatedAt, expiresAt
license.cancelledA key was cancelled and refunded.keyId, refundCents
license.revokedA key was revoked: by our staff, or because an unactivated stored key expired.keyId, reason, and refundCents for an expired key
batch.completedEvery key of a purchase has an outcome.batchId, quantity, issuedCount, releasedCount, chargedCents, returnedCents, reference
product.status_changedThe detection status of a product you can sell changed.productId, productName, from, to
balance.lowA purchase took your balance under the threshold you set.balanceCents, heldCents, thresholdCents, currency
reseller.pausedYour account was paused, by our staff or automatically.status, trigger, reason
license.report_resolvedOur team resolved a key you reported.keyId, reportId, reason, outcome (REPLACED, REVOKED, WORKS, OTHER), note, replacementKeyId, keyStatus
offer.rules_changedThe 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).

Redeliver
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" }
Verify, Node
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);
// });
Verify, Python
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.

Error body
{
  "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.

402, balance too low
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
}
CodeHTTPMeaning
INVALID_REQUEST400A field is missing or malformed. The message names it.
IDEMPOTENCY_KEY_REQUIRED400Send an Idempotency-Key of 8 to 100 letters, digits, dot, colon, dash or underscore.
IDEMPOTENCY_KEY_REUSED409That Idempotency-Key was used with a different request body.
PROGRAM_CLOSED403The Reseller Program is switched off.
PURCHASES_PAUSED423New 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_PAUSED409This product is paused for resellers. It is not in the catalog until it resumes, and nothing was held.
COUNTRY_REQUIRED400This product has country rules (allowedCountries or blockedCountries in the catalog): send your customer's customerCountry. Nothing was held.
COUNTRY_BLOCKED403This product cannot be sold to customers in that country (blocked, or not on the product's allowed list). Nothing was held.
NOT_RESELLER403The organization is not a reseller.
RESELLER_NOT_ACTIVE403The reseller account is paused and cannot buy new keys. Reads still work.
RESELLER_SUSPENDED403The reseller account is suspended or terminated: its API keys are switched off.
NOT_ALLOWED403This account may not do that.
API_KEY_NOT_RESELLER403The API key is not a reseller key. Make one on the Reseller Hub API page.
API_KEY_MAKER_INACTIVE403The 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_2FA403The 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_MISSING403The 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_ALLOWED403The request came from an address outside the key’s IP allowlist.
SIGNATURE_REQUIRED401A write without the X-AimJunkies-Signature header.
SIGNATURE_INVALID401The signature does not match the exact raw body and your current signing secret.
SIGNATURE_EXPIRED401The signature timestamp is more than 5 minutes from our clock.
SIGNATURE_REPLAYED401That signature was already used, on this route or another one. Sign every request afresh.
RATE_LIMITED429Too many requests for this key in the last minute. Wait the seconds in Retry-After (also retryAfterSeconds in the body).
PLAN_NOT_FOUND404No such offer or plan.
PLAN_NOT_OPEN409The plan is not open for wholesale.
PLAN_PAUSED409The plan is paused for resellers. Try again later.
NOT_ON_SALE409The product is not on sale right now.
PRODUCT_DOWN409The product is down or under maintenance right now and cannot be sold.
NO_LIVE_RELEASE409The product has no live release for the launcher yet.
SOURCE_UNAVAILABLE503Keys cannot be issued right now. Nothing was charged; try again.
SOURCE_CAPACITY429Key supply is at capacity for the moment. Try again shortly.
PRICE_ABOVE_MAX409Your price is above the maxPriceCents you sent.
BULK_LIMIT400More keys in one request than your tier allows.
PURCHASE_IN_FLIGHT_LIMIT429You 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_LIMIT429More 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_LIMIT429More 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_LIMIT429The 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_LIMIT429The 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_LIMIT429This key reached its own 24-hour spend cap. Retry-After says when room opens.
INSUFFICIENT_BALANCE402Your spendable balance does not cover the purchase. The body names requiredCents and availableCents. Top up in the Reseller Hub.
WALLET_FROZEN403Your balance is frozen.
KEY_NOT_FOUND404No such key in your account.
BATCH_NOT_FOUND404No such purchase in your account.
KEY_NOT_ISSUED409The key has not been issued, so it cannot be cancelled or reset.
KEY_ACTIVATED409The key was activated. Activated keys cannot be cancelled.
CANCEL_WINDOW_CLOSED409The cancel window for this key has passed.
CANCEL_NOT_SUPPORTED409Keys of this product cannot be cancelled once bought (cancelSupported is false). The key stays valid.
KEY_NOT_ACTIVATED409The key has not been activated, so there is no PC to reset.
HWID_RESET_LIMIT429This key has used all its PC resets.
HWID_RESET_UNAVAILABLE503The reset could not be done right now. Try again.
KEY_NOT_REPORTABLE409Only an issued key can be reported.
KEY_REPORT_OPEN409The key already has an open report. Follow its ticket; you can report it again once our team resolves it.
KEY_REPORT_LIMIT429Too many reports in the last hour. Put several keys in one ticket.
REPORT_UNAVAILABLE503The report could not be opened right now. Nothing was kept; try again.
DELIVERY_NOT_FOUND404No such webhook delivery in your account.
NOT_IN_SANDBOX403A test key asked for something that would reach your live account, such as redelivering a webhook. Use a live key.
REDELIVER_LIMIT429That 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 equals Retry-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.

Headers and a 429
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 carry sandbox: 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.
A test key’s fake keys do not work in the launcher. Switch to a live key only when you are ready to buy real keys.