x402 v2Base eip155:8453USDCcaller controls spend
Charge an AI agent per accepted API call.
ScriptMasterLabs uses a simple rule: fetch the fresh HTTP 402 challenge, verify the terms, apply the caller's spending policy, then pay only when authorized. Cached wallet or payment instructions are not authority.
Canonical SML payment identity
network: eip155:8453 asset: 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 symbol: USDC payTo: 0x5bbd32e0478e49a7540ef2d760e0b0f9aa6328b2 402 response: PAYMENT-REQUIRED paid retry: PAYMENT-SIGNATURE success: PAYMENT-RESPONSE
The exact amount and resource must come from the target's fresh challenge. A 402 challenge is not settlement proof.
Buyer flow
- Call the target API without payment.
- Require HTTP 402 and inspect
PAYMENT-REQUIRED. - Verify network, Base USDC asset, payTo, resource, and amount.
- Apply your own spending policy. ScriptMasterLabs does not auto-authorize spending for the caller.
- If authorized, retry with
PAYMENT-SIGNATURE. - Accept payment as complete only from successful settlement/delivery evidence and
PAYMENT-RESPONSE.
Try before paying
Start with machine-readable discovery and a no-spend 402 challenge. Agent Web Access is the simplest paid example: public URL → clean Markdown.
Truth boundary
ScriptMasterLabs does not treat crawler hits, owner tests, bootstrap traffic, validators, signatures, or a 402 challenge as a stranger purchase. Settlement and accepted delivery are the evidence that count.