Skip to content

Payments

All payments go through LNbits. The extension creates Lightning invoices, listens for settlement, and handles bookkeeping.

Checkout flow

  1. Customer taps Checkout in the Mini App
  2. Buyer info is collected (email, address) depending on checkout mode
  3. Total is calculated: subtotal + tax + shipping - store credit
  4. If store credit covers everything, the order completes immediately
  5. Otherwise, a Lightning invoice is generated for the remaining amount
  6. Customer pays through the Mini App
  7. On settlement: order marked paid, stock deducted, admin notified with buyer info and order details

Fiat pricing

When your shop currency is a fiat code (e.g. USD), prices display in that currency. At checkout, the total converts to sats at the current exchange rate.

Both the fiat amount and sat amount are stored on the order, so you always know what the customer saw and what they paid.

Store credit

Customers get store credit when you issue credit refunds on returns. Tracked per customer by Telegram chat ID.

At checkout:

  • Available credit is deducted automatically (oldest first)
  • The invoice covers only what's left
  • If credit covers the total, no invoice needed

Check balance anytime through the Mini App's Credits tab.

Credit doesn't expire.

Invoice expiry

Invoices follow your LNbits wallet's default expiry. Unpaid orders stay pending. The customer can start a new checkout.

What's stored per order

FieldSource
Cart items (JSON)Snapshot at checkout
Amount in satsCalculated at checkout
Fiat amountIf using fiat pricing
Payment hashFrom the Lightning invoice
Buyer nameIf collected (address mode)
Buyer emailIf collected
Buyer addressIf collected
Customer identityTelegram username + chat ID