HTTP 402 — Payment Required

The content you requested is behind a paywall

The publisher has chosen to monetize this resource. You received an HTTP 402 response because the content is available but requires payment before it can be served. This is a standard protocol defined in RFC 9110, not an error.


What happened?

Your request reached the publisher's CDN edge node. The edge checked the resource's access rules and determined that this URL requires a valid AISA crawler token and sufficient balance. Since no token was provided (or the token was invalid), the edge returned a 402 status instead of the content.

This is not a block. The content exists and is ready to serve. You just need to register, fund your account, and include your token in future requests.

How the payment model works

AISA uses a pay-per-crawl model. Publishers set prices for their content, and your crawler pays per request from a prepaid balance. There are no subscriptions, no monthly fees, and no per-site contracts. You control your spending with built-in budget modes.

Getting started

  1. Create an account — register on the AISA platform to get your crawler_token.
  2. Fund your wallet — add balance via crypto (Solana, Base, Polygon, Lightning, BNB) or card (Stripe).
  3. Include your token — add X-AISA-Crawler-Token: <token> to your crawl requests.
  4. Access content — the CDN verifies your token, deducts the price, and returns the content.
# Request with token — the CDN handles verification and payment
curl -H "X-AISA-Crawler-Token: YOUR_CRAWLER_TOKEN" \
     https://example.com/premium/article-123

# If your balance is sufficient, you get the content directly.
# If not, you get a 402 with the price so your agent can decide.

Note: the legacy Authorization: Bearer <token> header is no longer accepted (deprecated 2026-04 per Aliyun security review — generic auth headers leak through middleware). Use the custom X-AISA-Crawler-Token header instead.

Pricing modes

Your agent can choose how to handle payments on each request:

For AI agents — the complete flow, copy-pasteable

Everything below uses this host's JSON APIs directly. Machine-readable companions: /llms.txt (site index) · /agent/llms.txt (this flow as plain text) · /agent/skill.md (drop-in agent skill) · /agent/docs.html (full API reference).

# 1. Register once — save crawler.crawlerToken from the response
curl -s -X POST "$BASE/api/agent/auth/register" -H "Content-Type: application/json" \
  -d '{"email":"mybot@example.com","password":"AtLeast8Chars","name":"My Crawler","crawlerType":"custom"}'
# → { "crawler": { "crawlerToken": "aisa_crawler_...", "balance": 0.10 }, "signupBonus": {...}? }
# New accounts may start with a small trial credit (see signupBonus) — if so, skip straight to step 4.

# 2. Already registered? Recover token and check balance
curl -s -X POST "$BASE/api/agent/auth/login" -H "Content-Type: application/json" \
  -d '{"email":"mybot@example.com","password":"AtLeast8Chars"}'
# → { "token": "<session token>", "crawler": { "crawlerToken": "...", "balance": 4.98 } }

# 3. Top up when the balance is low (Stripe checkout URL — open it to pay)
curl -s -X POST "$BASE/api/agent/topup/create-session" \
  -H "Content-Type: application/json" -H "Authorization: Bearer <session token from login>" \
  -d '{"amount": 5.00}'

# 4. Retry the ORIGINAL resource URL with your crawler token — the edge verifies and charges
curl -H "X-AISA-Crawler-Token: aisa_crawler_..." https://publisher-site.example/premium/data.json

$BASE is this host (the same origin that served you this page). The session token (login) is only for account APIs like top-up; the crawlerToken is what you send when crawling.

Reading the 402/403 JSON

When access is denied, the response body tells you exactly why and what to do next. Check error first:

HTTPerrorMeaningWhat to do
402invalid_tokenNo / unknown / inactive crawler tokenRegister (step 1 above) or fix your X-AISA-Crawler-Token header, then retry
402insufficient_balanceBalance too low; crawler.shortfall says how much more you needTop up (step 3 above), then retry
402price_requiredPrice discovery: the quote is in price + currencyRetry with "crawlerAutoPrice": true (gateways usually do this for you)
402price_mismatch / price_too_highYour exact/max price intent didn't match the quoteAdjust to the quoted price, or skip
403access_blockedThe publisher withholds this from crawlers (a policy choice) — paying does not unlock itDon't stop the task: pivot to the site's purchasable pay-mode directories (see its /pricing.json) and tell your user in plain language why this one is different

Every denial also carries these companion fields:

FieldContent
guidanceMachine-readable block: the same links as this page plus numbered steps — follow it verbatim. May include signupBonus when a trial credit is active.
onboardingURL of this page.
guidance.agentAdviceNarrate the steps to your user as you perform them; afterwards report whether content was free or paid, the amount charged, and your remaining balance.
ruleThe matched pricing rule: urlPattern, accessMode, price, currency, billingType (per-request).

Start accessing premium content

One account, one token — access paid content from any publisher on the AISA network.

Create Account API Docs