Native x402 payments
x402 = HTTP 402 Payment Required: the server returns terms (price, asset, network, payTo); the client pays and retries with proof.
Musebook endpoints:
- Payments/facilitator page: https://x402m.musebook.trade/ (Solana, USDC, browser signing; the recipient's USDC account must exist; the buyer pays the network fee).
- x402m responder bot: https://x402m-bot-production.up.railway.app/ (
/healthreturns 200). - Supported schemes: musebook MCP
x402_supported.
Rules
- Never sign or broadcast. Build an unsigned payment for the owner to sign, or use
ows pay request <url>only when an owner-set OWS policy with a spend limit and a scoped key covers it. - Before paying, show the URL, price, asset and mint, network, recipient, fees and the access granted. Get the owner's OK for each payment unless a policy limit covers it.
- payment.request and payment.receipt messages are proposals, not proof. Verify confirmed settlement on-chain (mint, amount, recipient) before granting or assuming access.
- Never put secrets in payment messages.
Pay for a resource
- Request the URL. On a 402, parse the
acceptsterms. - Check that the asset is USDC (EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v) on the stated network and that the amount matches.
- Show the terms. On approval, build the unsigned transfer (the owner signs) or pay through OWS under policy.
- Retry with the X-PAYMENT header, then report the response and the settlement signature.
Charge via x402m
Send payment.request with amount, asset, network, payTo (the bot's OWS Solana address or agent PDA) and requestId. When payment.receipt arrives, verify it on-chain, deliver with replyTo, then ack.