No description
  • Python 69.3%
  • Vue 15.8%
  • JavaScript 14.6%
  • Makefile 0.3%
Find a file
Padreug fe40d2ab14
Some checks failed
lint.yml / chore(release): v1.6.8-aio.2 (push) Failing after 0s
chore(release): v1.6.8-aio.2
Two wave fixes found while checking whether the webapp had been updated
for v1.6.8.

- #65 keep ticket waves when a client edits an event without them. A
  client that rebuilt the `extra` envelope rather than round-tripping it
  destroyed every wave: the list arrived empty, a single primary wave was
  synthesized from the event-level `amount_tickets`, and a multi-wave
  event silently collapsed into one tier. `promo_codes` had carried the
  same guard since the v1.6.8 merge; `ticket_waves` is the same class of
  organiser state and now carries it too.
- #66 expose `ticket_waves` on public event responses. A buyer cannot
  choose a tier without its id, and nothing public carried one — the
  NIP-52 tags describe the active wave but name no id. Waves move to
  `EventExtraBase`, leaving promo codes as the only organiser-private
  field in `extra`. Buyers can now see upcoming tiers and their prices,
  which is what #61 recorded as the cost of the flat-tag decision.

No schema change; both are model/serialisation only.

Verified against bohm's dev LNbits before tagging: the exact PUT that
collapsed a two-wave event now leaves both intact with the roll-up
unchanged, the public endpoint carries the waves while still hiding
promo codes, and a webapp-shaped edit that writes through to the primary
wave takes effect (139 = 99 + 40) where it was previously discarded.

#66 is a prerequisite for aiolabs/webapp#176, which is merged to dev and
needs this deployed before its wave picker works for anyone but the
organiser.
2026-09-29 09:24:36 +02:00
.github/workflows Update to use uv (#37) 2025-08-22 16:54:51 +02:00
docs feat(nostr): publish the active ticket wave, not the roll-up 2026-09-28 22:28:09 +02:00
nostr feat(nostr): confirm publishes against the relay's OK 2026-09-27 22:11:21 +02:00
static fix: require a capacity on every ticket wave 2026-09-28 23:11:30 +02:00
tests Merge pull request 'Expose ticket waves on public event responses' (#66) from feat/public-ticket-waves into main 2026-09-29 06:58:36 +00:00
.gitignore chore: ignore the data/ dir pytest creates 2026-09-06 19:57:25 +02:00
.prettierrc feat: code quality (#34) 2024-08-29 12:18:49 +02:00
__init__.py feat(nostr): publish the active ticket wave, not the roll-up 2026-09-28 22:28:09 +02:00
config.json chore(release): v1.6.8-aio.2 2026-09-29 09:24:36 +02:00
crud.py feat(nostr): publish the active ticket wave, not the roll-up 2026-09-28 22:28:09 +02:00
description.md docs: changes to more pages (#42) 2026-01-28 17:22:09 +01:00
LICENSE add license 2023-02-24 18:13:39 +01:00
Makefile chore: run tests against the aio lnbits fork (PYTHONPATH), not PyPI lnbits 2026-09-06 19:56:55 +02:00
manifest.json [FEAT] add timestamp on register (#15) 2023-08-18 08:17:29 +02:00
migrations.py fix: if sats and fiat checkout conversion currency 2026-05-07 14:34:22 +01:00
migrations_fork.py feat(nostr): publish the active ticket wave, not the roll-up 2026-09-28 22:28:09 +02:00
models.py feat: expose ticket waves on public event responses 2026-09-29 08:14:49 +02:00
nostr_hooks.py feat(nostr): publish the active ticket wave, not the roll-up 2026-09-28 22:28:09 +02:00
nostr_publisher.py feat(nostr): publish the active ticket wave, not the roll-up 2026-09-28 22:28:09 +02:00
nostr_sync.py chore: rebase onto upstream v1.6.1 + bump to v1.6.1-aio.1 2026-05-22 09:24:35 +02:00
nostr_timestamp.py fix: publish NIP-52 events with monotonic created_at (#26) 2026-06-18 14:13:10 +02:00
package-lock.json feat: code quality (#34) 2024-08-29 12:18:49 +02:00
package.json feat: code quality (#34) 2024-08-29 12:18:49 +02:00
promo.py Merge upstream v1.6.8 into the aio fork 2026-09-28 22:09:18 +02:00
pyproject.toml chore: prepare release, fix lint and uv warnings (#44) 2026-04-15 17:37:34 +02:00
qr.py feat: attach a self-describing ticket card to the email (1.6.1-aio.10) 2026-09-08 16:40:25 +02:00
README.md docs: promo-code contract 2026-09-13 18:43:48 +02:00
services.py refactor: drop the SatsPay/watchonly on-chain surface 2026-09-28 22:21:55 +02:00
tasks.py feat: multi-ticket purchases as N rows sharing one payment_hash 2026-05-23 22:57:00 +02:00
toc.md feat: code quality (#34) 2024-08-29 12:18:49 +02:00
transport_rpcs.py feat: events_list_event_tickets RPC for organizer ticket roster 2026-05-24 18:45:48 +02:00
uv.lock chore: prepare release, fix lint and uv warnings (#44) 2026-04-15 17:37:34 +02:00
views.py feat: make events dynamic (#43) 2026-05-04 17:01:53 +02:00
views_api.py fix: keep ticket waves when a client edits an event without them 2026-09-29 08:12:09 +02:00

LNbits

License: MIT Built for LNbits

Events - LNbits extension

For more about LNBits extension check this tutorial

Sell tickets for events and use the built-in scanner for registering attendees

Events allows you to create tickets for an event. Each ticket is in the form of a unique QR code. After registering and paying, the user gets a QR code to present at registration/entrance.

Events includes a shareable ticket scanner, which can be used to register attendees.

Usage

  1. Create an event
    create event

  2. Fill out the event information:

    • event name
    • wallet (normally there's only one)
    • event information
    • closing date for event registration
    • begin and end date of the event

    event info

  3. Share the event registration link
    event ticket

    • ticket example
      ticket example

    • QR code ticket, presented after invoice paid, to present at registration
      event ticket

  4. Use the built-in ticket scanner to validate registered, and paid, attendees
    ticket scanner

Guest checkout, card payments and email delivery (aio fork)

  • Identity. POST /events/api/v1/tickets/{event_id} accepts either an LNbits user_id or a guest name + email; a user_id ticket may also carry an email so logged-in buyers get their ticket mailed.
  • Payment methods. extra.payment_methods (lightning, fiat) lists the rails an event accepts; an empty list keeps the legacy rule (Lightning always, fiat when allow_fiat). The effective list is published on the NIP-52 event as tickets_payment_methods and enforced at purchase.
  • Return to the calling app. A client may send frontend_url (its app root, e.g. https://app.example/events). Its origin must be one of LNBITS_CORS_ALLOWED_ORIGINS, the LNbits base URL or LNBITS_CUSTOM_FRONTEND_URL, otherwise the request is refused. Under that root the extension builds the Stripe success_url (/events/{event_id}?checkout=success&tickets=<id,id>), cancel_url (/events/{event_id}?checkout=cancelled) and the emailed ticket link (/events/ticket/{ticket_id}). Absent, the LNbits host is used as before.
  • Stripe session. The buyer's email is passed as customer_email (prefilled and locked on the hosted page); the line item is named after the event; event_id, quantity and ticket_ids ride along as metadata.
  • Promo codes. extra.promo_codes (code, discount_percent, active, max_uses; used_count is derived from paid tickets) are organizer-only: they are never part of public responses. Buyers preview a code with POST /events/api/v1/promo/validate/{event_id} ({codes, quantity} → v2-shaped BasketTotals + currency); purchase enforces active and max_uses (each ticket of a multi-ticket purchase consumes one use) and rejects bad codes with a distinct detail. Updates that omit extra.promo_codes keep the stored list.
  • Email. Multipart text + HTML (links, no images) with the ticket card attached — a self-describing PNG (site, event, when, where, QR with the instance logo, name on ticket, ticket id) also served at GET /events/api/v1/ticket-card/{ticket_id}; the bare QR stays at GET /events/api/v1/qr/{ticket_id}. Headers carry Date, Message-ID and a From display name (site title). POST /events/api/v1/tickets/{ticket_id}/resend-email returns a TicketResendResult with per-channel outcome.

Powered by LNbits

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

Visit LNbits Shop Try myLNbits SaaS