Hats & Stuff home
₿ $64,334│$1 = 1,554 sats
bag, 0 items
// for AI agents

If you can pay a Lightning invoice, you can buy a hat.

llms.txt /api/products

Embroidered bitcoin hats and stuff, made to order and paid over Lightning. Pick a product, give a name and delivery address, get an exact price in sats, pay one invoice. No account, no API key, no card.

Base URL: hatsandstuff.com

The short version

  1. GET /api/products lists everything on sale, with codes, colours, sizes, designs, a picture and an estimated price.
  2. POST /api/quote with the items and the delivery address gives the exact price in sats, locked for 10 minutes.
  3. Show your person the price and ask them to confirm. Then POST /api/orders with the quote_id gives a Lightning invoice (BOLT11), a QR code and a pay page.
  4. Pay the invoice from your wallet, or show your person the QR or pay page to pay from theirs.
  5. GET the status_url until paid is true. It is made to order near the address and shipped with tracking.

All requests and answers are JSON. POSTs need Content-Type: application/json. Errors are {"error": "what to fix"} with a 4xx status, worded so you can fix the request and try again.

1. Products

GET https://hatsandstuff.com/api/products?region=UK        (region: UK, US, EU or elsewhere; default UK)
{
  "currency": "sats",
  "region": "UK",
  "products": [
    {
      "code": "supply-dad-cap",
      "name": "21M",
      "item": "Classic dad cap",
      "type": "hat",
      "description": "Fixed supply",
      "url": "https://hatsandstuff.com/p/supply-dad-cap",
      "picture": "https://hatsandstuff.com/mockups/supply-black.webp",
      "colours": ["black", "darkgrey", "navy", "stone", "khaki"],
      "pictures": { "navy": "https://hatsandstuff.com/mockups/supply-navy.webp", "...": "..." },
      "details": { "fabric": "100% cotton chino twill (Yupoong 6245CM)", "fit": "One size · ...", "care": "..." },
      "embroidery": { "where": "on the front", "width_mm": 44, "height_mm": 27, "note": "stitched to order" },
      "delivery_working_days": [5, 12],
      "estimate": { "sats": 53600, "gbp": 28.0, "local": "£28.00" }
    },
    {
      "code": "heavyweight-hoodie",
      "name": "Heavyweight hoodie",
      "type": "hoodie",
      "description": "Premium organic cotton, any design",
      "designs": ["supply", "horizon", "nostr", "..."],
      "design_details": [{ "code": "horizon", "name": "Horizon", "description": "Orange on the horizon" }, "..."],
      "colours": ["black", "navy"],
      "sizes": ["S", "M", "L", "XL", "2XL"]
    }
  ]
}

2. An exact price

POST https://hatsandstuff.com/api/quote
Content-Type: application/json

{
  "items": [
    { "product": "supply-dad-cap", "colour": "navy", "quantity": 1 },
    { "product": "heavyweight-hoodie", "design": "nostr", "colour": "black", "size": "L" }
  ],
  "ship_to": {
    "name": "Satoshi Nakamoto",
    "email": "satoshi@example.com",
    "line1": "1 Example Street",
    "line2": "",
    "city": "London",
    "state": "",
    "postcode": "SW1A 1AA",
    "country": "GB"
  },
  "gift_message": "Optional: printed on the packing slip"
}
{
  "quote_id": "q_...",
  "total_sats": 151234,
  "approx_gbp": 79.95,
  "valid_until": "2026-11-13T21:15:00.000Z",
  "items": [{ "name": "21M cap, Navy", "quantity": 1 }, { "name": "Nostr heavyweight hoodie, Black / L", "quantity": 1 }],
  "breakdown": { "maker_gbp": 68.40, "payment_fee_gbp": 0.68, "maker_and_fee_sats": 116234, "our_slice_sats": 35000,
                 "total_sats": 151234, "rate_gbp_per_btc": 51600, "explained": "https://hatsandstuff.com/pricing" },
  "delivery_working_days": [5, 12],
  "next": "POST https://hatsandstuff.com/api/orders {\"quote_id\":\"q_...\"} ..."
}

The total is everything: the item, embroidery, delivery, any tax our maker charges, and our slice. Outside the UK, US and EU, import duty may be due on arrival. How we price: hatsandstuff.com/pricing

3. The order and its Lightning invoice

Ask your person to confirm the items, address and total first. Then:

POST https://hatsandstuff.com/api/orders
Content-Type: application/json

{ "quote_id": "q_..." }
{
  "order_id": "HS-...",
  "status": "awaiting_payment",
  "paid": false,
  "total_sats": 151234,
  "order_page": "https://hatsandstuff.com/order/HS-...?t=...",
  "status_url": "https://hatsandstuff.com/api/orders/HS-...?t=...",
  "payment": {
    "amount_sats": 151234,
    "lightning_invoice": "lnbc...",
    "expires_at": "2026-11-13T21:25:00.000Z",
    "qr_svg": "https://hatsandstuff.com/api/orders/HS-.../qr.svg?t=...",
    "pay_page": "https://hatsandstuff.com/pay/...?t=..."
  }
}

4. Has it been paid?

GET https://hatsandstuff.com/api/orders/HS-...?t=...

Check every few seconds while paying. status goes awaiting_payment → paid → in_fulfillment → shipped → delivered; tracking appears once it ships. If it reaches expired, get a fresh quote and order again. The order_page shows the same to a person.

Limits and good manners

More