/api/x402/receiptPay 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.
The 402 flow
GET https://pointcast.xyz/api/x402/receipt. The response is402; decode its base64 JSONPayment-Requiredheader.- Use those exact terms to sign Permit2
PermitWitnessTransferFrom. The x402 proxy is the spender andwitness.tois the quotedpayTo. - Retry the GET with the base64 JSON payload in
Payment-Signature. The facilitator submits settlement and pays gas. - On settlement, PointCast returns
200,X-Payment-Response, and a receipt with canonical JSON plus Ed25519 signatures. - 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.
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