Activities: free (0-price) tickets attempt an invalid zero-amount invoice #106

Open
opened 2026-06-16 09:45:23 +00:00 by padreug · 0 comments
Owner

From the 2026-06-10 design review.

Problem

Free events (ticket price 0) still go through the paid checkout path. The client calls ticketApi.requestTicket() unconditionally (useTicketPurchase.tsTicketApiService.requestTicket, POST /events/api/v1/tickets/{eventId}) with no zero-amount guard, and the backend tries to create a Lightning invoice for 0 sats, which is invalid.

Proposed fix (backend-led)

This is primarily a backend change in the aiolabs/events extension: when an event's price_per_ticket is 0, skip invoice creation and issue the ticket directly (a free-registration path), returning a paid: true ticket. The webapp side then just needs to route 0-price events to that path and skip the invoice/QR step.

Notes

  • No existing Forgejo issue found for this when triaging (searched open issues 2026-06-16); filing fresh. If a closed/duplicate exists, link it.
  • Cross-repo: needs aiolabs/events (extension) + a small webapp checkout-flow branch.

Deferred from the ui-tweaks-2 round as a backend-dependent item, not a client-only UI fix.

From the 2026-06-10 design review. ## Problem Free events (ticket price `0`) still go through the paid checkout path. The client calls `ticketApi.requestTicket()` unconditionally (`useTicketPurchase.ts` → `TicketApiService.requestTicket`, `POST /events/api/v1/tickets/{eventId}`) with no zero-amount guard, and the backend tries to create a Lightning invoice for 0 sats, which is invalid. ## Proposed fix (backend-led) This is primarily a **backend** change in the `aiolabs/events` extension: when an event's `price_per_ticket` is 0, skip invoice creation and issue the ticket directly (a free-registration path), returning a `paid: true` ticket. The webapp side then just needs to route 0-price events to that path and skip the invoice/QR step. ## Notes - No existing Forgejo issue found for this when triaging (searched open issues 2026-06-16); filing fresh. If a closed/duplicate exists, link it. - Cross-repo: needs `aiolabs/events` (extension) + a small webapp checkout-flow branch. _Deferred from the ui-tweaks-2 round as a backend-dependent item, not a client-only UI fix._
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
aiolabs/webapp#106
No description provided.