Sell Online With WebShop
WebShop adds an online sales channel to the same merchant stack.
Use WebShop when the merchant wants a direct shop page or an embeddable shop on an existing website.
How it works
WebShop uses Inventory products and creates a public shop where customers can:
- browse products
- add items to a cart
- check out
- pay with Lightning
- receive an order page or receipt
Orders can capture the paid order for merchant review and fulfillment.
Basic setup
- Enable Inventory and create products.
- Enable WebShop.
- Create a shop.
- Choose the wallet for payments.
- Select the inventory products or tags to expose.
- Open the public shop page.
- Complete a test checkout.
- Confirm the order appears in Orders.
Embed options
WebShop supports two common embed modes.
Iframe
Use iframe mode when embedding the shop into an external website.
html
<iframe
src="https://your-lnbits-domain/webshop/<SHOP_ID>?embed=iframe"
width="100%"
height="900"
style="border:0; border-radius:12px;"
></iframe>Same-origin component
Use component mode for pages served from the same LNbits server, such as a page built with the WebPages extension.
html
<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>Component mode can avoid iframe limitations and allows more direct interaction with the shop page.
Fulfillment
For shipping workflows:
- collect the contact or shipping details the merchant needs
- capture the paid order in Orders
- print a label or use the order details for fulfillment
- mark the order shipped when complete
- send a customer update if email notifications are configured