What happens on the wire.
If you're using mppx/client, tempo request, or AgentCash, this is handled for you. The diagram below shows the exchange behind it — one request becomes a paid request in six moves.
Without xpayapi
Signups, dashboards, API keys, prepaid balances
With MPP / x402
Request, challenge, pay, retry, receipt
Payment header
The first call returns 402 Payment Required with a WWW-Authenticate: Payment challenge. Your client signs a credential against the challenge and retries the same request with:
Authorization: Payment <credential>
Receipts
Successful responses include an x_receipt with the amount settled, the chain, and the signature. This is your verifiable proof that the call was paid.
{
"x_receipt": {
"amount_usdc": "0.000012",
"chain": "tempo",
"sig": "0xabcd…"
}
}