> ## Documentation Index
> Fetch the complete documentation index at: https://memberpulseptyltd.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# UJ-M-009: Receive QR Ticket

> Member receives event ticket with QR code via email and can access it in the portal

## Journey Overview

| Attribute      | Value                                         |
| -------------- | --------------------------------------------- |
| **Journey ID** | UJ-M-009                                      |
| **Actor**      | Registered event attendee                     |
| **Goal**       | Obtain ticket with QR code for event check-in |
| **Trigger**    | Event registration completed successfully     |
| **Outcome**    | Attendee has accessible ticket with QR code   |

## Preconditions

* Member has successfully registered for event
* Payment completed (for paid events)
* Email address is verified

## Journey Flow

```mermaid theme={null}
flowchart TD
    A[Registration confirmed] --> B[System generates ticket]
    B --> C[QR code created]
    C --> D[Email sent to attendee]
    D --> E[Attendee receives email]
    E --> F{Access ticket how?}
    F -->|Email| G[Open email attachment]
    F -->|Portal| H[View in My Tickets]
    F -->|Wallet| I[Add to mobile wallet]
    G --> J[View/Print PDF ticket]
    H --> J
    I --> K[Ticket in Apple/Google Wallet]
    J --> L[Ready for event]
    K --> L
```

## Ticket Generation

<Steps>
  <Step title="Registration Completion">
    Upon successful registration:

    1. System creates ticket record in database
    2. Unique ticket ID generated (e.g., `TKT-2024-XXXXX`)
    3. QR code generated encoding ticket data
    4. Ticket linked to attendee and event
  </Step>

  <Step title="QR Code Generation">
    QR code encodes:

    ```json theme={null}
    {
      "ticketId": "TKT-2024-12345",
      "eventId": "EVT-001",
      "attendeeId": "USR-789",
      "type": "member",
      "checksum": "abc123"
    }
    ```

    **Security:**

    * Data encrypted
    * Checksum prevents tampering
    * Single-use validation
    * Expiry after event ends
  </Step>

  <Step title="Email Delivery">
    Confirmation email sent containing:

    **Subject:** Your Ticket for \[Event Name]

    **Body:**

    * Event name and date
    * Venue/location details
    * Attendee name
    * Ticket type
    * QR code (inline image)
    * Important instructions
    * Add to Calendar links

    **Attachments:**

    * PDF ticket (printable)
    * Calendar invite (.ics)
  </Step>
</Steps>

## Accessing Tickets

### Via Email

Attendee can:

* View QR code directly in email
* Download PDF attachment
* Print PDF for paper ticket
* Forward to personal email

### Via Member Portal

<Steps>
  <Step title="Navigate to My Tickets">
    Member Portal → Events → My Tickets
  </Step>

  <Step title="View Ticket List">
    Shows all tickets:

    * Upcoming events first
    * Past events (archived)
    * Ticket status indicator
  </Step>

  <Step title="View Individual Ticket">
    Ticket detail shows:

    * Large QR code
    * Event details
    * Attendee name
    * Ticket type
    * Check-in status
    * Download options
  </Step>
</Steps>

### Via Mobile Wallet

<Tabs>
  <Tab title="Apple Wallet">
    1. Click "Add to Apple Wallet" in email or portal
    2. Pass downloaded to device
    3. Accessible from Wallet app
    4. Auto-surfaces based on location/time
    5. Updates if event changes
  </Tab>

  <Tab title="Google Wallet">
    1. Click "Add to Google Wallet"
    2. Pass saved to Google account
    3. Accessible from Google Wallet app
    4. Location-based notifications
    5. Syncs across devices
  </Tab>
</Tabs>

## Ticket Display

### Digital Ticket Layout

```
┌─────────────────────────────────────────┐
│         ANNUAL CONFERENCE 2025          │
│                                         │
│         ┌───────────────────┐           │
│         │                   │           │
│         │    [QR CODE]      │           │
│         │                   │           │
│         └───────────────────┘           │
│                                         │
│  Attendee: John Smith                   │
│  Ticket: Member Pass                    │
│  Order: #TKT-2024-12345                 │
│                                         │
│  📅 March 15, 2025 • 9:00 AM            │
│  📍 Convention Center, Sydney           │
│                                         │
│  ─────────────────────────────────────  │
│  Present this QR code at registration   │
└─────────────────────────────────────────┘
```

### PDF Ticket

Print-friendly version includes:

* Full event details
* Map/directions
* Parking information
* Agenda summary
* Terms and conditions
* Organization branding

## Resending Tickets

If email not received:

1. Check spam/junk folder
2. Request resend from portal
3. Contact support if issues persist

**Resend triggers:**

* "Resend Ticket" button in portal
* Automatic on email bounce detection
* Support-initiated resend

## Multiple Tickets

For group registrations:

* Each attendee receives their own email
* Purchaser receives all tickets
* Portal shows all tickets under order
* Individual transfers available

## Related Entities

* [`Event Ticket`](/entities/core/event-ticket)
* [`Event`](/entities/core/event)

## Related Journeys

* [UJ-M-008](/member/journeys/purchase-event-ticket)
* [UJ-M-010](/member/journeys/transfer-ticket)
* [UJ-M-011](/member/journeys/event-checkin)

## Acceptance Criteria

### Frontend

* [ ] My Tickets page listing all tickets
* [ ] Individual ticket view with large QR code
* [ ] Download PDF button
* [ ] Add to Apple Wallet button
* [ ] Add to Google Wallet button
* [ ] Resend ticket button
* [ ] Mobile-optimized QR display

### Backend

* [ ] `GET /api/member/tickets` - List my tickets
* [ ] `GET /api/member/tickets/{id}` - Ticket details
* [ ] `GET /api/member/tickets/{id}/qr` - QR code image
* [ ] `GET /api/member/tickets/{id}/pdf` - PDF download
* [ ] `POST /api/member/tickets/{id}/resend` - Resend email
* [ ] `GET /api/member/tickets/{id}/wallet` - Wallet pass

### Permissions

* [ ] Attendee can only access their own tickets
* [ ] Purchaser can see all tickets in their order

### Business Rules

* [ ] QR codes unique per ticket
* [ ] QR valid only until event ends
* [ ] Wallet passes update on event changes
* [ ] Resend limited to prevent spam

### Error Handling

* [ ] Email delivery failures logged
* [ ] Alternative delivery via SMS (optional)
* [ ] Support notification on repeated failures
