Skip to main content

Push Notifications

Push notifications support upcoming payment reminders.

Required Environment

Configure all of these for reminders:

  • VAPID_PUBLIC_KEY
  • VAPID_PRIVATE_KEY
  • VAPID_SUBJECT
  • CRON_SECRET
  • NOTIFICATION_SCHEDULE when using the Compose scheduler

Subscription Flow

The Settings UI checks browser support, requests notification permission, fetches /api/push/vapid-public-key, subscribes through PushManager, and stores the endpoint through POST /api/push/subscribe.

Users can disable reminders. The browser unsubscribes and the app removes the endpoint with DELETE /api/push/subscribe.

Reminder Cron Flow

GET /api/cron/upcoming-payments requires:

Authorization: Bearer <CRON_SECRET>

The cron job checks recurring expenses due tomorrow and sends one push notification per due expense. The notification opens /expenses.

Expired or invalid push subscriptions returning 404 or 410 are removed during send attempts.