I’m so lazy I’m thinking of running the damus merch store via stateless and serverless lightning payment links. All data is collected and stored in the lightning invoice descriptions which are fetched from your node. You can do this without having to run any server code except a lightning node!

This is the same tech we used when selling merch as at bitcoin Miami. It was extremely reliable. I love these things, they are so easy. Integrating with the legacy fiat system is such a pita, It may just be a lightning-only store for now because of how simple this is. Here's what a lightning payment link looks like:

http://lnlink.org/?d=ASED88EIzNU2uFJoQfClxYISu55lhKHrSTCA58HMNPgtrXECMjQuODQuMTUyLjE4Nzo4MzI0AANgB6Cj2QCeZAFOZ1nS6qGuRe4Vf6qzwJyQ5Qo3b0HRt_w9MTIwJm1ldGhvZD1pbnZvaWNlfG1ldGhvZD13YWl0aW52b2ljZSZwbmFtZWxhYmVsXmxubGluay0mcmF0ZT04BERlYXRoIFN0YXIABQAAAGQGQW4gb2JqZWN0IG9mIHVuZmF0aG9tYWJsZSBwb3dlcgAHEwhodHRwczovL3VwbG9hZC53aWtpbWVkaWEub3JnL3dpa2lwZWRpYS9lbi9mL2Y5L0RlYXRoX3N0YXIxLnBuZwA=

## How it works

The entire product page is stored as data in the url. When a customer click the link, the product info is decoded and rendered as a webpage. The data in the url includes

- The product name

- Description

- Price in sats

- Product image url

- Fields to collect data from the user

- Lightning node address

- Lightning node rune for fetching and waiting for invoice payments

This works thanks to a javascript library I created called "lnsocket". It allows you to connect to your CLN node over websockets. Once the user fills out all of the info, a new lightning invoice is fetched with this information in the description, by connecting directly to your node. This connection is end-to-end encrypted thanks to the lightning protocol itself.

To your lightning node, it looks like another lightning node is connecting to it, but in reality it's just a dumb client asking for things.

At this point, custom lightning packets called "commando" packets are sent to your node which asks your node to run certain commands. CLN authenticates these packets using the rune and then returns a response. This is pretty much the same as calling these commands directly on your lightning node, except now someone is doing it from a browser in a secure way!

## Why not just run btcpayserver?

btcpayserver is cool and is more powerful, but I like exploring simpler ways to do things that don't require running lots of software which can be challenging for many non-technical people. You shouldn't have to become a server administrator to start accepting payments. It should be as simple as running a bitcoin and lightning node, pushing all of the application logic to the clients.

This is a similar philosophy to what we have in the nostr space. Let's make it easier for people to use self-sovereign tools. Everyone deserves freedom tech.

Anyways, I'm still working on https://lnlink.org. I just added images and nostr address support! You can make your own payment links here! Try it out:

http://lnlink.org/?d=ASED88EIzNU2uFJoQfClxYISu55lhKHrSTCA58HMNPgtrXECMjQuODQuMTUyLjE4Nzo4MzI0AANgB6Cj2QCeZAFOZ1nS6qGuRe4Vf6qzwJyQ5Qo3b0HRt_w9MTIwJm1ldGhvZD1pbnZvaWNlfG1ldGhvZD13YWl0aW52b2ljZSZwbmFtZWxhYmVsXmxubGluay0mcmF0ZT04BERlYXRoIFN0YXIABQAAAGQGQW4gb2JqZWN0IG9mIHVuZmF0aG9tYWJsZSBwb3dlcgAHEwhodHRwczovL3VwbG9hZC53aWtpbWVkaWEub3JnL3dpa2lwZWRpYS9lbi9mL2Y5L0RlYXRoX3N0YXIxLnBuZwA=&edit=1

Reply to this note

Please Login to reply.

Discussion

I remember the Square terminal stopped working all of a sudden in Miami lol

Square is good but it’s just the fiat system that requires you to verify your address and keeps track of the location the payments are happening to make sure it’s in the same location as the place you signed up which is annoying.

Yeah i was a square noob and didn’t realize i had to make a new account for each country 🤦‍♂️ luckily my CLN node doesn’t care where i am.

i purchased the death star

thanks will

sorry this one is on backorder

ruggèd smdh

Slow rug too… “back order”

A thread of hope….

The good news is! I’ve got him working on the merch store ya’ll! It’s actually happening!

You drop shipping or running a shipping / distribution center? 😂

We are doing whatever works for now lol. ideas are welcome! Haha

I’m just thinking about customs.

You should talk with nostr:npub1eequz6v23szzyx9utphsh8kg6kll50wte6sfh4vah8gdjtplcz6qg7at9s for some tips and tricks.

His merch warehouse is impressive beyond the “Lightning Store” side.

Absolutely!

🥲

🤗

I got one too!

¿Que son esas cosas que puedes comprar?

Loving the long form look on Damus

Amazing work 🙏