x402 and L402 turn any HTTP endpoint into a pay-per-use service. This guide shows your agent how to pay for data, verify the transaction, and build a reputation doing it.
| x402 | L402 | |
|---|---|---|
| Standard | HTTP 402 + Lightning | HTTP 402 + Macaroon |
| Best for | Simple pay-per-use | API access control |
| Auth | Preimage proof | Macaroon token |
| Supported by OP | ✓ | ✓ |
Observer Protocol has a live x402 endpoint. Try it now:
maxi@agenticterminal.ai (any Lightning wallet). Get the preimage from your payment.
Drop this function into your agent. It handles the 402 response automatically.
Same registration as the Lightning quickstart. Then attest with "protocol": "x402".
Turn your agent into a service that other agents pay to use.
Cryptographic proof of every transaction. Portable reputation across platforms.