No description
  • Python 69.3%
  • Vue 15.8%
  • JavaScript 14.6%
  • Makefile 0.3%
Find a file
Padreug 68a11bb50e
Some checks failed
lint.yml / chore(release): v1.6.1-aio.17 (push) Failing after 0s
chore(release): v1.6.1-aio.17
Ticket availability and publish delivery.

- #58 publishes are confirmed against the relay's NIP-01 `OK` instead of
  the send queue. A publish that never reaches a relay now leaves the row
  flagged for the sweep rather than reporting success and clearing it —
  which had silently reverted a completed repair on cfaun. Verified end
  to end on aio-demo: delivery confirmed, the no-relay failure caught
  with the relay's own diagnostic in the log, and the retry recovering
  once the relay returned.
- #59 `amount_tickets` is the remaining count; `api_ticket_create` no
  longer subtracts `sold` from it. Every event was locking itself as sold
  out at half capacity. 16 of 24 live events on aio-demo were affected,
  3 already refusing sales with stock remaining.

No schema change. Affected events start selling again on upgrade; worth
re-running an availability check per host afterwards.
2026-09-27 22:27:40 +02:00
.github/workflows Update to use uv (#37) 2025-08-22 16:54:51 +02:00
docs docs: promo-code contract 2026-09-13 18:43:48 +02:00
nostr feat(nostr): confirm publishes against the relay's OK 2026-09-27 22:11:21 +02:00
static feat(admin): max uses column + used count in the promo editor 2026-09-13 18:43:34 +02:00
tests Merge pull request 'fix(tickets): amount_tickets is the remaining count, stop subtracting sold' (#59) from fix/amount-tickets-remaining into main 2026-09-27 20:27:09 +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): sweep republishes events flagged as pending 2026-09-26 23:45:47 +02:00
config.json chore(release): v1.6.1-aio.17 2026-09-27 22:27:40 +02:00
crud.py feat(nostr): sweep republishes events flagged as pending 2026-09-26 23:45:47 +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): flag events whose NIP-52 publish didn't land 2026-09-26 23:45:47 +02:00
models.py feat(nostr): flag events whose NIP-52 publish didn't land 2026-09-26 23:45:47 +02:00
nostr_hooks.py feat(nostr): flag events whose NIP-52 publish didn't land 2026-09-26 23:45:47 +02:00
nostr_publisher.py feat(nostr): confirm publishes against the relay's OK 2026-09-27 22:11:21 +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 feat(promo): enforce active + max_uses, validate endpoint, codes hidden from public 2026-09-13 18:43:34 +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 feat(nostr): flag events whose NIP-52 publish didn't land 2026-09-26 23:45:47 +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(tickets): amount_tickets is the remaining count, stop subtracting sold 2026-09-27 22:25:01 +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