402 · AGENTS WELCOME

Pay the town, get a signed receipt

PointCast exposes one small paid HTTP resource for agents. Ask for it, receive 402 Payment Required, pay 0.01 USDC on Etherlink through an off-chain Permit2 signature, and receive a countersigned receipt. The receipt is the product: a portable proof of the payer, amount, recipient, network, facilitator, and settled transaction.

JSON twin →

endpoint/api/x402/receipt
price$0.01USDC · 10,000 base units
networkEtherlinkeip155:42793
railx402 v2scheme exact · Permit2

The 402 flow

  1. GET https://pointcast.xyz/api/x402/receipt. The response is 402; decode its base64 JSON Payment-Required header.
  2. Use those exact terms to sign Permit2 PermitWitnessTransferFrom. The x402 proxy is the spender and witness.to is the quoted payTo.
  3. Retry the GET with the base64 JSON payload in Payment-Signature. The facilitator submits settlement and pays gas.
  4. On settlement, PointCast returns 200, X-Payment-Response, and a receipt with canonical JSON plus Ed25519 signatures.
  5. Send the receipt to /api/x402/verify, or verify it locally with the raw public key below.

A payer needs the quoted USDC asset on Etherlink and an existing token allowance to canonical Permit2. No payer key is ever sent to PointCast. The public receipt records only settlement data already visible on-chain.

Quote it without paying

curl -si https://pointcast.xyz/api/x402/receipt

This only prints the 402 and its terms. It does not sign or submit a payment.

Reference payer

The repository includes a viem payer example. With no key it is a dry run that fetches and prints the exact live terms.

node scripts/x402-client-example.mjs

# Deliberately supplying a funded key signs and submits the payment:
X402_PAYER_SK=0x… node scripts/x402-client-example.mjs

The script never logs the payer private key or Permit2 signature. After settlement it prints the countersigned receipt and checks it through the verification endpoint.

Verify any receipt

curl -sS -X POST https://pointcast.xyz/api/x402/verify \
  -H 'content-type: application/json' \
  --data '{"receipt":"<base64 receipt JSON>"}'

GET is also supported: /api/x402/verify?receipt=<base64>. A valid response echoes the signed settlement fields. Public keys are published as an hour-cached JWKS-style document at /api/x402/keys.

PointCast receipt signer

agent id
pointcast-treasury-x402
algorithm
Ed25519 / EdDSA
raw public key · base64
SLtbNyBQXwCgVr6L+qDemrRXmKJSWrZgECyW3RK2VkY=

The full receipt signature covers canonical nested JSON, including the transaction hash, payer, asset, amount, payee, network, and facilitator. A separate compatible signature remains on the pointcast.agent-payments/v1 spend block.

AGENTS WELCOME

Come make the first external-agent receipt

Build against the endpoint, bring a collaboration idea, or tell us where the protocol feels rough. Write hello@pointcast.xyz or wallet@pointcast.xyz.

Reference rail: TZ APAC x402 Permit2 · protocol: x402 Foundation · recent receipts: public ledger