Create and redeem sats-denominated gift cards with unique, secure redemption links.
The Gift Cards extension lets LNbits wallet holders create, customize, distribute, and redeem Bitcoin Lightning gift cards denominated in sats. Gift cards can be designed individually or in bulk, delivered via email or printable QR images, and expired automatically if not claimed.
- Single & bulk creation — Create one card or hundreds via CSV upload
- Custom card design — Drag-and-drop QR/text placement, font controls, color pickers, portrait/landscape templates, or upload your own template image
- Secure redemption — Each card gets a unique, unguessable token and shareable link; recipients redeem by scanning a QR code with any Lightning wallet
- Email delivery — Send branded gift card images directly to recipients via email
- Printable PNG — Download high-resolution (3x) card images for manual distribution
- Expiration & auto-refund — Set expiration dates; unclaimed sats are automatically returned to the issuer wallet
- Issuer dashboard — Filter, search, and manage all cards with bulk actions (email, CSV export, delete)
- REST API — Full CRUD API for integration with external systems
| Portrait (425x650) | Landscape (1050x600) |
|---|---|
![]() |
![]() |
This extension is installed like any other LNbits extension. It is compatible with LNbits v0.10+.
- Go to Manage Extensions in your LNbits instance
- Find Gift Cards in the extension list
- Click Install
cd lnbits/lnbits/extensions
git clone https://github.com/bitkarrot/giftcards.gitRestart your LNbits server.
- Open the Gift Cards extension from your LNbits wallet
- Click Create Gift Card
- Enter the sats amount, recipient name, sender name, and an optional personal message
- Optionally set an expiration date
- Choose a design mode:
- No design (bare QR) — A simple QR code on a white background
- Custom design — Pick a portrait/landscape template or upload your own, then drag the QR code and text to position them
- Click Create — the sats are deducted from your wallet and locked into the gift card
- Click Bulk Create
- Same Amount tab — Create N cards with the same sats value in one transaction
- CSV tab — Upload a CSV with columns for recipient name, sats amount, email, and optional per-row design fields (up to 500 rows)
- Email — Click the email button on any card to send a branded image with the redemption link
- Printable PNG — Download a 3x-resolution PNG for printing or manual sharing
- Share link — Copy the redemption URL and send it through any channel
Recipients open the redemption link (or scan the QR code) and are presented with the card value and sender's message. They scan the QR with any Lightning wallet to claim the sats directly into their wallet. No LNbits account required.
The dashboard supports:
- Filtering by status (active, redeemed, expired), search text, and date range
- Multi-select with bulk actions: send emails, download CSV, delete selected cards
- Edit card metadata and design at any time (amount is locked; cancel and recreate to change it)
- Delete cards with automatic sats reclaim for active cards
All endpoints are scoped to the authenticated wallet and require an admin or invoice key.
| Method | Endpoint | Description |
|---|---|---|
POST |
/giftcards/api/v1/cards |
Create a single gift card |
POST |
/giftcards/api/v1/cards/bulk |
Create multiple gift cards (same-amount or CSV) |
POST |
/giftcards/api/v1/cards/validate-csv |
Validate a CSV file before bulk creation |
GET |
/giftcards/api/v1/cards |
List all gift cards for the wallet |
GET |
/giftcards/api/v1/cards/{card_id} |
Get gift card details |
PUT |
/giftcards/api/v1/cards/{card_id} |
Update card metadata and/or design |
DELETE |
/giftcards/api/v1/cards/{card_id} |
Delete a card (reclaims sats for active cards) |
DELETE |
/giftcards/api/v1/cards/bulk |
Delete multiple cards in bulk |
GET |
/giftcards/api/v1/cards/{card_id}/print |
Download printable PNG (3x resolution) |
POST |
/giftcards/api/v1/cards/{card_id}/deliver |
Send card via email |
GET |
/giftcards/api/v1/public/{token_hash} |
Public card info for redemption page |
GET |
/giftcards/api/v1/{token_hash}/image |
Public card image for redemption page |
curl -X POST https://your-lnbits.com/giftcards/api/v1/cards \
-H "X-Api-Key: YOUR_ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": 1000,
"recipient_name": "Bob",
"sender_name": "Alice",
"message": "Happy birthday!",
"expires_at": "2026-12-31T23:59:59Z"
}'curl https://your-lnbits.com/giftcards/api/v1/cards \
-H "X-Api-Key: YOUR_INVOICE_KEY"- Backend: Python, FastAPI/Starlette (LNbits extension framework)
- Frontend: Vue 3, Quasar UI components
- Database: SQLite via LNbits DB layer
- Image rendering: Pillow (PIL) for QR overlay and card image generation
- QR codes: qrcode library
MIT







