# Hats & Stuff: for AI agents > If you can pay a Lightning invoice, you can buy a hat. > > 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: https://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) ``` ```json { "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"] } ] } ``` - Hats come in one design each (the design is in the name) and one size; the "> hat" caps can have our logo instead (`designs`: leave `design` out for "> hat"). `description` is the design's one-line idea ("Orange on the horizon"): use it to choose for your person and to explain the choice. - Clothes and bags come in any of our designs: pick one from `designs`; `design_details` says what each is. Clothes need a `size`. - `estimate` is one item delivered to the region at today's rate, in sats, pounds and the region's own money (`local`). The exact price needs the address. `delivery_working_days` is payment to door, made to order. - `details` is the product page's fabric, fit and care, word for word; `pictures` has one per colour. - Showing products to your person: the `picture` and `url` are good to share. ## 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" } ``` - `country` is a two-letter ISO code (GB, US, DE…). We ship to almost anywhere (240 countries); if we can't reach an address, the quote says so. - `state` is needed for the US, Canada and Australia (e.g. CA, ON, NSW). - `email` is optional for agents, but please give your person's if you can: we send the order link, the confirmation and tracking there, nothing else, no marketing. **Without an email, we send no emails at all: no confirmation, no tracking email, and no way for us to contact your person if we need to** (a refund, an overpayment, an address our maker can't deliver to). Any page or message that says "we'll email you" can't apply. So keep the `status_url`: it has everything, tracking included. If the status turns to `payment_review`, `cancelled` or `refunded`, it's up to you or your person to email us with the order id (https://hatsandstuff.com/contact). - Up to 10 lines, up to 10 of each. ```json { "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: https://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_..." } ``` ```json { "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=..." } } ``` - Pay `lightning_invoice` from any Lightning wallet, or give your person the `qr_svg` or `pay_page` to pay from theirs. - Sending the same `quote_id` again returns the same order, never a second one. - The `t=` token is the order's key: keep it, and share it only with your person. ## 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 - Up to 20 price checks a minute and 3 unpaid orders at a time from one address. Errors say when to try again. - Only order what your person asked for, and only after they've seen the total. - Made to order: usually 2 to 5 working days to make, then tracked delivery. Returns within 14 days: https://hatsandstuff.com/returns ## More - Shipping: https://hatsandstuff.com/shipping - FAQ: https://hatsandstuff.com/faq - Terms: https://hatsandstuff.com/terms · Privacy: https://hatsandstuff.com/privacy - People: https://hatsandstuff.com/agents shows this page. Humans can also shop at https://hatsandstuff.com/shop or press / for our terminal. - Contact: https://hatsandstuff.com/contact