List your L402 endpoint on Amazap
Once your endpoint answers an unpaid request with an L402 challenge, listing it on Amazap takes a paste and a review: you give Amazap the URL, Amazap calls it once unpaid, reads the price from the invoice, prefills the listing, and you list it in one click. Amazap (amazap.com) is an L402 API marketplace where AI agents shop about 1,400 listings through one MCP server.
The two minutes are step 3. Steps 1 and 2 are setup you do once. Overview: How to sell your API to AI agents.
Before you start
- [ ] Payments can create Lightning invoices (step 1)
- [ ] The endpoint is reachable at a public HTTPS URL
- [ ] An unpaid request gets
402 Payment RequiredwithWWW-Authenticate: L402 macaroon="...", invoice="..."(step 2) - [ ] A paid request returns the real response quickly
- [ ] You have example parameters an agent can copy
Step 1: Set up Amboss Payments
Your L402 endpoint needs a way to issue invoices. The /sell flow starts with Amboss Payments, which Amazap runs on itself. Detailed steps: Set up Amboss Payments for an L402 API.
Disclosure: Amazap is an Amboss referral partner. Amazap earns a referral credit if you sign up through this link.
Step 2: Put your API behind L402
Use the Amazap seller starter kit (Node and Python), Lightning Labs' Aperture proxy, or your own code. What L402 needs: Monetize an API with Lightning.
Check it before you list. An unpaid request should come back like this:
HTTP/1.1 402 Payment Required
WWW-Authenticate: L402 macaroon="<base64>", invoice="lnbc..."
Step 3: Paste your endpoint URL
On /sell:
- Paste the endpoint URL and pick the HTTP method.
- Amazap probes it. It calls the endpoint once, unpaid, using the method you picked and no request body. A POST listing is an empty POST. The probe does not use HEAD and waits up to 8 seconds. It accepts any valid L402 or LSAT challenge with a priced Lightning invoice, from any node or wallet. Amboss Payments is recommended, not required. The price agents see is the satoshi amount on that invoice.
- Review the prefilled listing. Amazap fills the title, description, category, and example parameters from openapi.json or llms.txt on the same host, and from parameter names in the 402 body when those files are missing. A contact email is still required. Write the description for an agent: say what goes in and exactly what comes back.
- List it. You receive your listed price, the satoshi amount on your invoice, for each paid call. Amazap sets the shopper's all-in price.
Your listing gets a product page at amazap.com/product/<slug>, and agents can find it with search_catalog through the Amazap MCP server.
Prefer to let an agent do it? The Amazap MCP tool list_my_endpoint takes the endpoint URL, probes it, and returns the result plus a prefilled listing draft and a link to /sell. It does not spend sats and it does not publish the listing. A person finishes the listing on that page.
If the probe fails
| What Amazap sees | Likely cause | Fix |
|---|---|---|
400 or 422 | Your server validates inputs before issuing the challenge | Issue the 402 first, validate on the paid request |
401 | Your auth layer runs before L402 | Let unpaid requests reach the L402 handler |
402 with no WWW-Authenticate: L402 | Custom 402 body without the header | Send the header exactly as the L402 spec defines |
200 | The endpoint isn't gated | Put it behind L402 |
| Timeout | Slow cold start or unreachable host | Use a public HTTPS URL; keep the service warm |
| Private or local host | The URL is not a public https host | Use a public https URL |
| Amountless invoice | The Lightning invoice has no satoshi amount | Set a price on the invoice |
| x402 and no Lightning invoice | The challenge is USDC-only x402 | Answer with HTTP 402 and an L402 Lightning invoice |
After you list
- Reliability is ranking. A listing that fails after payment, or gets reports, can be paused and hidden from search. Buyers get failed calls credited back, so a failure costs you the sale.
- Your price is the invoice at listing time. The displayed price does not refresh. The health check, about every six hours, only checks that the endpoint still returns 402. On each buy, Amazap pays the live invoice only when it fits the stored listing price. A higher invoice is refused. To change the price agents see, list the endpoint again.
- Get found elsewhere too. Amazap's catalog also draws on public directories such as 402 Index, so registering there helps agents everywhere find you.
Pricing help: How to price an API for AI agents. Running your own model? Sell your self-hosted AI model. See the buyer side: Agentic payments explained.
FAQ
What does Amazap need to list my endpoint?
A public URL that answers an unpaid request with HTTP 402 and a WWW-Authenticate: L402 header containing a macaroon and a Lightning invoice. Amazap reads your price from that invoice.
How does Amazap set my listing price?
The price agents see is the satoshi amount on the invoice at the time you list. You receive that listed price for each paid call. Amazap sets the shopper's all-in price. The displayed price does not refresh on its own. To change it, list the endpoint again. On each buy, Amazap pays the live invoice only when it fits the stored listing price.
Why did the probe fail with a 400 error?
Your server is probably validating inputs before it issues the L402 challenge. Return the 402 challenge to unpaid requests first, and validate inputs on the paid request.
Can I list things other than APIs?
Yes, if an agent can request it over HTTP, receive it in the response, and pay for it per request over L402. Data, content, compute, files, tools, and other digital services all fit.
Does Amazap list x402 endpoints?
Amazap lists x402 services from public directories, and agents can buy the ones payable over Lightning. The seller flow on /sell is built for L402 endpoints. An x402 challenge with no Lightning invoice cannot be listed.
Does the listing price refresh from my invoice?
No. The price agents see is the invoice amount at the time you list. To change it, list the endpoint again. On each buy, Amazap pays the live invoice only when it fits that stored price.