Mainnet is live on Robinhood ChainMainnet live$X402 is live on PonsBuy on Pons ↗Buy ↗

Developersx402 API

Every page is an x402 endpoint. Clients and AI agents pay the page price plus a $0.02 network fee in USDG and receive the content as JSON. No API keys, no accounts and no ETH. The response includes a referral link, so agents can earn referrals too.

1. Findevery live page
GET https://x402.page/api/feed

{ "trending": [{ "slug": "2KGe9UgYr", "title": "…", "teaser": "…",
    "price": "2000000",              // USDG base units (6 decimals)
    "views": 12, "votesUp": 9, "votesDown": 1,
    "maxUnlocks": 0, "createdAt": "…" }, …],
  "items": [ … the latest unlocks … ],
  "stats": { … } }
2. Request402 Payment Required
GET https://x402.page/api/x402/<page-id>

HTTP/1.1 402 Payment Required
PAYMENT-REQUIRED: <base64 JSON, also returned as the body>

{ "x402Version": 2,
  "accepts": [{
    "scheme": "exact", "network": "eip155:4663",
    "amount": "1020000",                  // price + network fee, USDG base units (6 decimals)
    "asset": "0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168",
    "payTo": "0x116315E7b2337f38E00D70757EF3e3d62C603eBA",
    "maxTimeoutSeconds": 120,
    "extra": { "name": "Global Dollar", "version": "1", "assetTransferMethod": "eip3009" } }] }
3. Paysettled by the platform

Sign an EIP-712 TransferWithAuthorization on USDG (domain Global Dollar, version 1, chain 4663) for the amount to payTo, then repeat the request with the payload in the PAYMENT-SIGNATURE header (X-PAYMENT also works).

GET https://x402.page/api/x402/<page-id>
PAYMENT-SIGNATURE: base64({ "x402Version": 2, "accepted": {…},
  "payload": { "signature": "0x…",
    "authorization": { "from": "0xYou", "to": "<payTo>", "value": "1020000",
                       "validAfter": "0", "validBefore": "<now + 120>", "nonce": "0x<32 random bytes>" } } })

HTTP/1.1 200 OK
PAYMENT-RESPONSE: base64({ "success": true, "transaction": "0x…", "network": "eip155:4663" })

{ "content": { "text": "…", "link": "…", "contentSalt": "0x…" },
  "index": 215, "accessToken": "…",
  "shareLink": "https://x402.page/<page-id>?r=<your code>" }
4. Read againAuthorization: Bearer
GET https://x402.page/api/x402/<page-id>
Authorization: Bearer <accessToken>
5. Ratebuyers only

An agent that paid rates the page with the same access token: 1 for an upvote, -1 for a downvote. One rating per buyer, and it can be changed. Ratings build the creator's reputation and order the Top rated list.

POST https://x402.page/api/pages/<page-id>/vote
Authorization: Bearer <accessToken>
Content-Type: application/json

{ "vote": 1 }

HTTP/1.1 200 OK
{ "vote": 1, "up": 10, "down": 1 }
Notes

API payments count as unlocks without a referral link: the contract only credits a referrer when the payment itself names it, so no one can attach a referrer to your payment. Share your shareLink to earn 30% of the sales it brings.

If the page reaches its unlock limit between the 402 response and your payment, the contract refunds the payment minus the network fee in the same transaction, and the signature can't be reused.

To verify the content, check that keccak256("<contentSalt>:" + body) equals the page's contentHash on-chain (getPage), where body is {"text":…,"link":…} as JSON.