perfect strategy.fyi

For agents

How an agent pays for an article

Every article here is sold per fetch with x402: the agent asks, gets a price in a 402, signs a USDC payment, and asks again. This page shows the live challenge from TollBit's preproduction gateway, on testnet.

Live · HTTP 402 Payment RequiredFetched 2026-11-05 03:45 UTC

The 402 for the nim article

Price
$0.01
Network
Base Sepolia (testnet)
Asset
USDC 0x036CbD53842c5426634e7929541eC2318f3dCF7e
Pay to
0x0000000000000000000000000000000000000000
Scheme
exact, signed within 60 seconds
License
ON_DEMAND_FULL_USE_LICENSE
Decoded PAYMENT-REQUIRED header
{
  "x402Version": 2,
  "error": "Payment required",
  "resource": {
    "url": "https://gateway.preproduction.tollbit.com/dev/v1/content/perfectstrategy.fyi/strategy/nim",
    "description": "tollbit licensed content: /strategy/nim",
    "serviceName": "tollbit"
  },
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:84532",
      "amount": "10000",
      "asset": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
      "payTo": "0x0000000000000000000000000000000000000000",
      "maxTimeoutSeconds": 60,
      "extra": {
        "name": "USDC",
        "version": "2",
        "assetTransferMethod": "eip3009"
      }
    }
  ],
  "extensions": {
    "tollbit": {
      "info": {
        "phase": "advertise",
        "offer": "https://gateway.preproduction.tollbit.com/dev/v1/machinepay/offer?url=https%3A%2F%2Fperfectstrategy.fyi%2Fstrategy%2Fnim",
        "propertyId": "wsmpg0wkme5pqszbvswp10rw",
        "licenseType": "ON_DEMAND_FULL_USE_LICENSE",
        "priceMicros": "10000",
        "currency": "USD"
      },
      "schema": {
        "type": "object",
        "properties": {
          "phase": {
            "type": "string"
          },
          "offer": {
            "type": "string",
            "format": "uri"
          },
          "propertyId": {
            "type": "string"
          },
          "licenseType": {
            "type": "string"
          },
          "priceMicros": {
            "type": "string",
            "pattern": "^[0-9]+$"
          },
          "currency": {
            "type": "string"
          }
        },
        "required": [
          "phase",
          "offer",
          "propertyId",
          "licenseType",
          "priceMicros",
          "currency"
        ]
      }
    }
  }
}

Try it

Ask for the article and decode the challenge. Any user agent gets the 402.

curl -s -D - -o /dev/null https://gateway.preproduction.tollbit.com/dev/v1/content/perfectstrategy.fyi/strategy/nim \
  | awk 'tolower($1)=="payment-required:"{print $2}' | tr -d '\r' | base64 -d | jq .

The four steps

  1. Ask. GET the article. The gateway answers 402 with a base64 JSON PAYMENT-REQUIRED header listing what it accepts.
  2. Sign. Pick an entry and sign an EIP-3009 transfer authorization for the amount of the asset to the pay-to address, valid for the timeout shown.
  3. Ask again. Repeat the GET with the signed payload, base64 encoded, in a PAYMENT-SIGNATURE header.
  4. Read. TollBit verifies the payment, settles it on chain through the facilitator, and answers 200 with the article and a PAYMENT-RESPONSE header that carries the transaction hash.

Today the preproduction gateway advertises the price but does not yet accept payment, so steps 3 and 4 return the same 402 until x402 acceptance is switched on. In production, agents fetch through tollbit.perfectstrategy.fyi with a TollBit token.