Skip to content

lnbits/webshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LNbits

License: MIT Built for LNbits

WebShop - LNbits extension

An embeddable web shop for selling products with lightning payments. Use it as a standalone page, embed it with an iframe, or mount it as a same-origin component.

How it works

Create products with prices and descriptions tied to the LNbits Inventory extension. The extension generates a shop page that can be embedded in your website or shared directly. Customers browse, add items to cart, and pay with lightning.

Features

  • Product catalog management
  • Shopping cart functionality
  • Embeddable via iframe
  • Same-origin component embed
  • Lightning checkout

Usage

  1. Enable the extension in LNbits
  2. Add your products with prices and images
  3. Embed the shop in your website or share the link
  4. Customers pay with lightning at checkout

Embed modes

Iframe embed (cross-origin friendly)

Use an iframe to embed into external websites:

<iframe
  src="https://your-lnbits-domain/webshop/<SHOP_ID>?embed=iframe"
  width="100%"
  height="900"
  style="border:0; border-radius:12px;"
></iframe>

Notes:

  • ?embed=iframe enables iframe-specific behavior.
  • Invoice copy button is hidden in iframe mode.

Component embed (same-origin)

For pages served from the same LNbits server (for example via webpages), mount the shop as a component:

<div id="lnbits-webshop-<SHOP_ID>"></div>
<script src="/webshop/static/js/public_page.js"></script>
<script>
  WebshopPublicPage.mount('#lnbits-webshop-<SHOP_ID>', {
    shopId: '<SHOP_ID>'
  }).catch(console.error)
</script>

Notes:

  • Component mode avoids iframe interaction issues.
  • Invoice copy button is available in component and direct page mode.

Powered by LNbits

LNbits is a free and open-source lightning accounts system.

Visit LNbits Shop Try myLNbits SaaS

About

Embedible web-shop

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors