live on mainnet

Bitcoin payments,
built into HTTP

Sell access to any API endpoint and get paid in Bitcoin — instantly, without accounts, without middlemen. One registration, one line of middleware.

register & accept payments
# 1. Register your Lightning wallet (one-time)
curl -X POST https://x402.albylabs.com/register \
  -d '{"nwcSecret":"nostr+walletconnect://..."}'
#  → { "merchantId": "3f2a…" }

# 2. Protect a route on your server
import { paymentMiddleware } from "@x402/express";

app.use(paymentMiddleware(
  {
    "GET /resource": {
      scheme: "exact", network: "bip122:000000000019d6689c085ae165831e93",
      price: { amount: "21000", asset: "BTC" }, // amount in msats (21000 msats = 21 sats)
      extra: { merchantId: "3f2a…" }
    }
  },
  "https://x402.albylabs.com"
));
Money on the internet has always required middlemen. x402 removes them — open, instant, machine-native payments, with Bitcoin as the settlement layer.
Why Bitcoin

Not all money
is equal

Bitcoin is the only money that settles instantly, without counterparty, on open rails.

No issuer risk

Stablecoins are IOUs. A peg can break, an issuer can freeze accounts, a regulator can halt transfers. Bitcoin has no issuer.

Cryptographic settlement

Payment proof is tamper-proof and final — no chargebacks, no disputes, no reversals. Math, not policy.

True micropayments

Sub-cent payments at machine speed. Stablecoins on-chain can't do this — fees exceed the payment amount.

Permissionless by design

No KYC, no jurisdiction restrictions, no sanctions list. Any two parties can transact — globally, instantly, without asking.

Self-custody by default

Your funds live in your own wallet, not an exchange or custodian. You control your keys — no intermediary holds your money.

Open protocol, no rent

No smart contract risk, no bridge exploits, no L2 token required. Bitcoin's payment network is natively part of the protocol.

How it works

For merchants & consumers

For merchants

Sell access to any API endpoint — no billing infrastructure required.

01

Connect your Bitcoin wallet

POST your NWC connection string to /register. Get back an opaque merchantId — your credentials stay server-side.

02

Protect a route

Add paymentMiddleware to your server. Set a price in sats and reference your merchantId — one line of config.

03

Receive payments automatically

Verified payments settle directly to your wallet. No dashboards, no manual withdrawals.

For API consumers

Pay per request with any Bitcoin wallet — no accounts, no subscriptions.

01

Request a protected resource

Hit the endpoint normally. The server responds HTTP 402 with a payment invoice in the response header.

02

Pay with Bitcoin

Use any compatible Lightning wallet to pay the BOLT11 invoice from the extra.invoice field.

03

Retry with payment proof

Send the paid invoice string in the payment-signature header. The server verifies payment via your wallet and delivers the resource.

x402 ecosystem

Tap into
existing tooling

This facilitator speaks the standard x402 protocol. Any library, client, or middleware built for x402 works here — no changes needed. Point your existing setup at https://x402.albylabs.com and it just works.

x402 spec → View supported networks → Try the demo →
Design principles

Built for production

Designed to get out of the way — register once, and everything else is handled for you.

01

Any Bitcoin wallet

Connect any NWC-compatible wallet. Invoices are created and settled on your behalf — no custom integrations, no wallet-specific code.

02

Your keys, your control

Your wallet credentials are stored behind an opaque ID. Clients only ever see the merchantId — never your connection string.

03

No billing infrastructure

No payment processor, no webhook, no dashboard. Register a wallet and protect a route — that's the entire setup.

04

Private by design

Lightning payments leave no on-chain trace. No wallet address, no public ledger entry — just a payment hash known only to the parties involved.

05

Access in milliseconds

The moment a payment settles, the resource is delivered. No confirmation windows, no polling, no redirects.

06

Open standard

Built on the open x402 spec. Compatible with any x402 client or resource server — not locked to this facilitator.

Get started

Start accepting
Bitcoin payments

Register your Lightning wallet and add one middleware call to your Express server.

Try the live demo

Hit /demo/quote — a real HTTP 402 with a BOLT11 invoice. Pay with any Lightning wallet to unlock a Satoshi Nakamoto quote.

FAQ

Common questions

What is x402?
x402 is an open protocol that brings payments directly into HTTP. A server returns a standard 402 Payment Required response with payment details; the client pays and retries the request. No billing pages, no OAuth, no subscriptions — just a single round-trip. This facilitator implements the protocol for Bitcoin Lightning.
Why Lightning? All the other x402 facilitators use USDC or Solana.
The existing x402 facilitators are built for EVM chains — faster than traditional rails, but still dependent on gas, custodial bridges, and stablecoin issuers. Lightning is different: payments settle in milliseconds with no gas, no peg, no counterparty. It's the only rail where settlement is cryptographically final and trustless — and where sub-cent micropayments are actually viable.
Why are there no public payment stats or transaction counts?
Lightning payments are private by design. Unlike on-chain Bitcoin or Ethereum, Lightning transactions don't appear on a public ledger — they route through the network without a permanent record. The payment hash is an identifier embedded in the invoice before settlement — not itself proof that payment occurred. Proof of settlement comes from a wallet or invoice lookup tied to that hash, confirming the invoice was paid. There is nothing to aggregate or display. That's a feature, not a limitation.
Do I need to run my own Lightning node?
No. Any NWC-compatible wallet works. If you already have a Lightning wallet with NWC support, you're ready. You don't need to manage channels, liquidity, or routing.
Is this compatible with standard @x402 clients and libraries?
Yes, fully. This facilitator implements the standard x402 interface — any client or resource server built against the spec works without Lightning-specific changes. The Lightning-specific logic (invoice generation, NWC settlement) is handled entirely server-side, transparent to the client.
What happens if a Lightning invoice expires?
Lightning invoices are short-lived by design (typically a few minutes). If a client pays too late, the server issues a fresh invoice on the next request. The client simply retries — no partial payments, no stuck funds, no manual intervention required.
How is this different from Stripe or a traditional payment API?
Stripe requires buyers to have an account, a card, and a billing address — and takes a percentage of every transaction. Here, buyers need only a Lightning wallet. There's no sign-up, no redirect, no KYC, no chargeback risk. Payments happen inside the HTTP request itself, and settlement is confirmed instantly via the Lightning network.
Is x402 only for crypto-native projects?
No. Any web API or content provider can integrate x402 if they're looking for a low-cost, frictionless way to handle small or usage-based payments.
How much does the Bitcoin x402 Facilitator charge?
Our goal is to help grow the network, so we don't currently plan to monetize this service in the near term. Feel free to contact us for more information.