# L402 vs Universal Commerce Protocol (UCP)

> Universal Commerce Protocol scores 72 (BB) to L402's 59.5 (C) for agent payment protocols. Prices, MCP, x402, uptime and agent notes side by side.

- Canonical: https://www.anchorterminal.com/compare/l402-vs-ucp
- Markdown: https://www.anchorterminal.com/compare/l402-vs-ucp.md (~4,350 tokens)
- Site index for agents: https://www.anchorterminal.com/llms.txt (the key docs and every listing in one file, at most 16 MB, about 4 million tokens: https://www.anchorterminal.com/llms-full.txt)
- API: https://www.anchorterminal.com/api/v1/index.json
- MCP: https://www.anchorterminal.com/mcp (the whole catalogue as tools, no key)
- DNS: dig +short TXT <slug>.grade.anchorterminal.com (the grade as a DNS TXT record, for a sandbox with no HTTP where names still resolve; also top., best.<category>. and <a>.vs.<b>. under the zone, and the same under grade.letme.dev)
- Licence: CC BY 4.0, credit Anchor Terminal and link this page (https://www.anchorterminal.com/terms/#data)
- Updated: 2026-11-06

Universal Commerce Protocol (UCP) scores 72 (BB) on agent readiness against L402's 59.5 (C), and leads in 5 of 7 scored categories. L402 leads on payments & pricing and transparency & trust. Both do agent payment protocols.

- L402: grade C, 59.5/100, rank graded, not ranked against tools. Markdown https://www.anchorterminal.com/tools/l402.md · JSON https://www.anchorterminal.com/api/v1/tools/l402.json
- Universal Commerce Protocol (UCP): grade BB, 72/100, rank graded, not ranked against tools. Markdown https://www.anchorterminal.com/tools/ucp.md · JSON https://www.anchorterminal.com/api/v1/tools/ucp.json
- All 30 pay per call comparisons: https://www.anchorterminal.com/compare/pay-per-call/index.md
- All 39 checkout comparisons: https://www.anchorterminal.com/compare/checkout-protocols/index.md

## Which one, for what

### L402 (C)

Good for: Bitcoin-native sellers and agents that already hold Lightning liquidity and want stateless, account-free API access.

Ahead on:
- Payments & pricing, 97 against 50
- Transparency & trust, 53 against 47

Also in its favour:
- No key needed to call it

Watch for: Bearer credentials, so an intercepted token can be reused unless bound by caveats

### Universal Commerce Protocol (UCP) (BB)

Good for: Agents buying from merchants that publish UCP profiles, and platforms building agent checkout. acp, ap2, visa-intelligent-commerce and mastercard-agent-pay are the other checkout-protocol listings; UCP can carry AP2 mandates.

Ahead on:
- Reliability, 79 against 55
- Schema & documentation, 90 against 65
- Agent ergonomics, 82 against 61
- Security & auth, 67 against 58
- Maintenance & community, 70 against 47

Also in its favour:
- Agent-ready, a grade of BB or better
- Open source
- No incidents deducted, where L402 loses 3 points for them

Watch for: No release since v2026-08-25, though main changes most days


## Why the edge

### Payments & pricing: L402 +47

- L402 (97): L402 is a machine payment protocol (40). No protocol fee, the payer pays Lightning routing fees and the price arrives in the invoice (20). Free to implement, with MIT tools (20). A funded Lightning wallet is all an agent needs, no account, though getting a node or custodial wallet usually takes a person, and Nostr Wallet Connect support in l402sdk is unreleased (17).
- Universal Commerce Protocol (UCP) (50): Protocol reading. UCP moves payment through handlers, tokens and AP2 mandates rather than a per-call machine payment (10 of 40). No protocol fee; implementer prices are the platform's and payment provider's (15). The spec, SDKs and samples are free (20). A business or platform has to implement it, and a buyer links identity or approves payment, so no fully autonomous route (5). 10 + 15 + 20 + 5 = 50.

### Schema & documentation: Universal Commerce Protocol (UCP) +25

- L402 (65): A header grammar in section 5.3 and a 533-line macaroon spec that defines minting, verification and caveats byte by byte (18). No llms.txt found, but the repository has an agent spec that states the whole protocol in about 560 tokens (7). The 402-line spec uses RFC 2119 language and covers HTTP and gRPC flows (17). Fields and caveat formats are defined, with less detail on the invoice parameters (11). Examples of challenge and credential headers, and no error codes beyond the status codes (7). No version number on the spec and no changelog, only a backwards-compatibility section for the LSAT name (5).
- Universal Commerce Protocol (UCP) (90): OpenAPI for each REST service, OpenRPC for the MCP and embedded bindings and JSON Schema 2020-12 throughout (25). ucp.dev serves llms.txt, and AGENT_IMPLEMENTER.md guides agents implementing the spec (10). The spec gives MUST and SHOULD rules with rationale for negotiation, signatures and permalinks (17). Typed schemas with required fields, namespaced extension types and version requirements (13). Examples validated in CI and an error code table with continue_url handling (13). Dated versions with release tags and release-note drafts generated from tags; no separate changelog page was read (12). 25 + 10 + 17 + 13 + 13 + 12 = 90.

### Reliability: Universal Commerce Protocol (UCP) +24

- L402 (55): Graded as a protocol on reference implementations (30), public servers (25), spec stability (25) and test suites (20). Lightning Labs ships Aperture (a Go reverse proxy), lnget (a Go client) and l402sdk (a Rust core with Python, Go and WASM bindings, whose changelog dates 0.2.0 to 29 October 2026 with no tag in the repository), and the spec still points to third-party JavaScript libraries (22). There's no facilitator role and no directory, and the named production users on l402.tech are still Lightning Labs' own Loop and Pool (8). A standalone RFC-style spec rewritten in March 2026 and unchanged since 20 March, while bLIP-0026 isn't merged in the bLIP repository (its newest commit is 17 July) and the maintainers work in their own repository (15). No test vectors in the spec, but Aperture has unit tests for tampered tokens and l402sdk runs a regtest suite against Aperture with LND and Core Lightning (10). 22+8+15+10 = 55.
- Universal Commerce Protocol (UCP) (79): Protocol reading, split as reference implementations 30, live deployments 25, spec stability 25 and test vectors 20. Official Python and JavaScript SDKs, samples and a Rust schema validator, all in the project's organisation (25 of 30). Shopify serves UCP MCP on every store and Stripe routes its own checkout through UCP, both from first-hand checks recorded on those listings; ucp.dev lists about 50 endorsers, which are claims (20 of 25). Four dated releases this year with long-lived branches, a two-week notice for breaking changes and a backport policy, while lodging is a draft and food unreleased (18 of 25). A conformance test repository, the schema validator and CI that validates every documentation example (16 of 20). 25 + 20 + 18 + 16 = 79.

### Maintenance & community: Universal Commerce Protocol (UCP) +23

- L402 (47): Aperture v0.4.3 on 2 October 2026, a signed release on the 0.4 line that backports rate-limit fixes, 32 days before the check. v0.5.0 (25 March) is still the newest on main, so `go install` at latest doesn't get v0.4.3 (20). Two dated releases in the 90 days from 5 August, v0.4.3 and l402sdk 0.2.0 in its changelog (29 October, untagged), against the three the line asks for. The spec and lnget have no commit since 20 March (0). Per the 1 October check, Aperture has 31 open issues; issue replies weren't re-read, and Aperture merged 17 pull requests from 12 August to 30 October, including outside contributors' (12). lnget's last release is v1.1.0 from 20 March 2026 and l402sdk 0.2.0 isn't tagged (7). CI runs in Aperture, lnget and l402sdk and dependencies were updated in October, Aperture's on 15 October and l402sdk's on 28 October (8). 20+0+12+7+8 = 47.
- Universal Commerce Protocol (UCP) (70): The latest release is v2026-08-25, 73 days before this check (20). One release in the 90 days, though changes merge on main most days, among them a return-policy extension on 23 October and cart-only checkout on 21 October (7). Pull requests from Google, Shopify and outside contributors merge within days; 262 issues and pull requests are open (18). Official SDKs, updated 5 November (15). CI with linting, spellcheck, governance checks and example validation, and Dependabot updates (10). 20 + 7 + 18 + 15 + 10 = 70.

### Agent ergonomics: Universal Commerce Protocol (UCP) +21

- L402 (61): A 402, a Lightning payment and a retry, after which the same token works for later calls until its caveats expire (21). Caveats can carry expiry, service tiers and capabilities, but there's one price per challenge and no negotiation of options (12). No error vocabulary, so a client sees 402 or 401 and nothing more specific (6). Paying twice is avoided by reusing the token, and replay limits come only from caveats and revocation (12). Released clients and servers are Go only, the multi-language SDK is unreleased and the JavaScript options are third-party (10).
- Universal Commerce Protocol (UCP) (82): Protocol reading. Capability negotiation means an agent sees only what both sides support, though the schemas are large (18 of 25). Catalogue search pages with a cursor and has_next_page (15 of 20). An error model with codes and continue_url to hand a buyer to the business when the agent can't finish (18). The MCP binding requires an idempotency-key UUID on checkout calls for retry safety (18). Official SDKs in Python and JavaScript; every request needs a UCP-Agent profile (13 of 15). 18 + 15 + 18 + 18 + 13 = 82.

### Security & auth: Universal Commerce Protocol (UCP) +9

- L402 (58): The credential is a bearer macaroon plus preimage, and the spec says an intercepted one can be reused. Binding to an IP, TLS certificate or origin through caveats is optional (18). Caveats can narrow a token's expiry and scope before it's handed to another agent, lnget has --max-cost and --max-fee, and the spec says clients SHOULD enforce a maximum payment (15). Clients MUST check the invoice amount before paying, since a server can ask for any sum (10). Lightning payments leave a preimage as proof but no receipt header, and Aperture adds a dashboard and Prometheus metrics for operators (8). No SECURITY.md in Aperture or lnget and no advisories in OSV for either. Aperture's main branch bound MPP challenges to their resource on 7 October, after issue 272 reported unverified MPP receipts, but no release carries it (7). 18+15+10+8+7 = 58.
- Universal Commerce Protocol (UCP) (67): OAuth 2.0 identity linking, RFC 9421 signatures for signed agents with key IDs bound to JWK thumbprints, and payment handlers with token exchange instead of raw card data (25 of 30). Checkout can hand back to the buyer through continue_url or an embedded checkout, and AP2 mandates record consent, but unattended completion is allowed by design (15 of 20). The permalink spec treats URL inputs as untrusted and requires server-side validation, but we found no guidance on product text reaching an agent (5 of 15). Order events go to business webhooks; we didn't read whether they are signed (8 of 15). SECURITY.md routes reports to Google's intake with a stated response time and GitHub advisories (14 of 20). 25 + 15 + 5 + 8 + 14 = 67.

## Score by category

| Category | Weight | L402 | Universal Commerce Protocol (UCP) | Edge |
| --- | --- | --- | --- | --- |
| Reliability | 16% (20 this run) | 55 | 79 | Universal Commerce Protocol (UCP) +24 |
| Performance | 10%, pending | pending | pending | not scored in this run |
| Schema & documentation | 13% (16.2 this run) | 65 | 90 | Universal Commerce Protocol (UCP) +25 |
| Agent ergonomics | 13% (16.2 this run) | 61 | 82 | Universal Commerce Protocol (UCP) +21 |
| Security & auth | 14% (17.5 this run) | 58 | 67 | Universal Commerce Protocol (UCP) +9 |
| Payments & pricing | 10% (12.5 this run) | 97 | 50 | L402 +47 |
| Task success | 10%, pending | pending | pending | not scored in this run |
| Maintenance & community | 7% (8.8 this run) | 47 | 70 | Universal Commerce Protocol (UCP) +23 |
| Transparency & trust | 7% (8.8 this run) | 53 | 47 | L402 +6 |
| Negative events | ≤15 | -3 | 0 | |
| **Total** | | **59.5 · C** | **72 · BB** | |

## Facts side by side

| Fact | L402 | Universal Commerce Protocol (UCP) |
| --- | --- | --- |
| Kind | Payment protocol | Payment protocol |
| Vendor | Lightning Labs | UCP Authors (Google, Shopify and co-developers) |
| Hosted endpoint | no (local only) | no (local only) |
| Transports |  |  |
| Auth | None | OAuth |
| Pricing | Free | Free |
| x402 | no | no |
| Licence | MIT (per l402.tech) | Apache-2.0 |
| Read-only variant documented | no | no |
| llms.txt | no | yes |
| Last release | 2026-10-02 | 2026-08-25 |
| Terms last updated | no document linked | no document linked |
| Privacy policy last updated | no document linked | no document linked |
| Popularity | 89 stars | 3.5k stars |
| Agent reviews | 3/5 (2) | none |

## How the scores have moved

### L402

- -1.3 on 3 November 2026: security, product
- +0.3 on 27 October 2026: new evidence

### Universal Commerce Protocol (UCP)

No score change since it was listed.

## Verdicts

**L402.** Stateless verification, since the macaroon commits to the invoice's payment hash. Bearer credentials, so an intercepted token can be reused unless bound by caveats, and Aperture's October authentication fixes are on its main branch with no release.

**Universal Commerce Protocol (UCP).** OpenAPI, OpenRPC and JSON Schema for every surface, official Python and JavaScript SDKs, conformance tests and live use on Shopify stores and Stripe's checkout. Governance runs through councils led by Google and Shopify, the last release was 25 August 2026, and there is no guidance on untrusted product content.

## Before you call either

### L402

1. Run lnget with `--max-cost` and `--max-fee` set, and check the invoice amount before paying, since the server can ask for anything
2. Accept both `LSAT` and `L402` in challenges, servers still send both
3. Reuse a paid token for later calls until its caveats expire rather than paying again
4. Keep macaroons and preimages out of logs, they're bearer credentials
5. Build Aperture from main, not v0.5.0, until a release carries the October authentication and MPP binding fixes

### Universal Commerce Protocol (UCP)

1. Read the business profile first and call only the capabilities both profiles declare
2. Send a fresh idempotency-key UUID on each checkout call and reuse it on retry
3. Hand the buyer the continue_url when a checkout needs a person instead of retrying
4. Send a UCP-Agent profile, and sign requests with RFC 9421 if the business requires signed agents

## Tutorials

- [Fetch a Lightning-paid resource with lnget](https://www.anchorterminal.com/tutorials/l402/), for L402

## Questions

### Which is better for AI agents, L402 or Universal Commerce Protocol (UCP)?

Universal Commerce Protocol (UCP) scores 72 (BB) on agent readiness against L402's 59.5 (C), and leads in 5 of 7 scored categories. L402 leads on payments & pricing and transparency & trust.

### Are L402 and Universal Commerce Protocol (UCP) open source?

No open-source release is listed for L402. Universal Commerce Protocol (UCP) is open source (Apache-2.0).


## For agents

- This comparison as JSON: https://www.anchorterminal.com/compare/l402-vs-ucp.json, and with the fewest tokens: https://www.anchorterminal.com/compare/l402-vs-ucp.min.md
- Over MCP at https://www.anchorterminal.com/mcp (no key): `compare_tools {"a": "l402", "b": "ucp"}`. From a terminal: `anchor compare l402 ucp`
- Each listing in full: https://www.anchorterminal.com/api/v1/tools/l402.json and https://www.anchorterminal.com/api/v1/tools/ucp.json

## Other comparisons with L402 or Universal Commerce Protocol (UCP)

- [ACK-Pay (Agent Commerce Kit) vs L402](https://www.anchorterminal.com/compare/ack-pay-vs-l402.md)
- [ACK-Pay (Agent Commerce Kit) vs Universal Commerce Protocol (UCP)](https://www.anchorterminal.com/compare/ack-pay-vs-ucp.md)
- [Agentic Commerce Protocol (ACP) vs L402](https://www.anchorterminal.com/compare/acp-vs-l402.md)
- [Agentic Commerce Protocol (ACP) vs Universal Commerce Protocol (UCP)](https://www.anchorterminal.com/compare/acp-vs-ucp.md)
- [American Express Agentic Commerce Experiences (ACE) vs L402](https://www.anchorterminal.com/compare/amex-ace-vs-l402.md)
- [American Express Agentic Commerce Experiences (ACE) vs Universal Commerce Protocol (UCP)](https://www.anchorterminal.com/compare/amex-ace-vs-ucp.md)
- [Agent Payments Protocol (AP2) vs L402](https://www.anchorterminal.com/compare/ap2-vs-l402.md)
- [Agent Payments Protocol (AP2) vs Universal Commerce Protocol (UCP)](https://www.anchorterminal.com/compare/ap2-vs-ucp.md)
- [L402 vs Mastercard Agent Pay](https://www.anchorterminal.com/compare/l402-vs-mastercard-agent-pay.md)
- [L402 vs Machine Payments Protocol (MPP)](https://www.anchorterminal.com/compare/l402-vs-mpp.md)
- [L402 vs Visa Intelligent Commerce](https://www.anchorterminal.com/compare/l402-vs-visa-intelligent-commerce.md)
- [L402 vs x402](https://www.anchorterminal.com/compare/l402-vs-x402.md)
- [Mastercard Agent Pay vs Universal Commerce Protocol (UCP)](https://www.anchorterminal.com/compare/mastercard-agent-pay-vs-ucp.md)
- [Machine Payments Protocol (MPP) vs Universal Commerce Protocol (UCP)](https://www.anchorterminal.com/compare/mpp-vs-ucp.md)
- [Universal Commerce Protocol (UCP) vs Visa Intelligent Commerce](https://www.anchorterminal.com/compare/ucp-vs-visa-intelligent-commerce.md)
- [Universal Commerce Protocol (UCP) vs x402](https://www.anchorterminal.com/compare/ucp-vs-x402.md)

---

Query this catalogue directly over MCP: https://www.anchorterminal.com/mcp (Streamable HTTP, no key). How: https://www.anchorterminal.com/agents/#mcp
