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.
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.
- Product catalog management
- Shopping cart functionality
- Embeddable via iframe
- Same-origin component embed
- Lightning checkout
- Enable the extension in LNbits
- Add your products with prices and images
- Embed the shop in your website or share the link
- Customers pay with lightning at checkout
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=iframeenables iframe-specific behavior.- Invoice copy button is hidden in iframe mode.
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.
LNbits is a free and open-source lightning accounts system.