kfiross

payload push

by kfiross
Notifications & messaging
v3
^3.81.0

Overview

Summary generated from the README

Provides a unified interface for sending push notifications from within Payload applications. It is registered as a plugin and uses an adapter system, currently shipping a Firebase adapter built on the Firebase Admin SDK and FCM. It requires a Firebase project with a service account JSON key and targets Payload 3.

Features

  • Adapter-based design for multiple push providers
  • Firebase Cloud Messaging adapter using the Firebase Admin SDK
  • Send to a single device token or multiple tokens
  • Topic-based broadcast notifications
  • Android and APNs specific configuration options
  • Custom data payloads attached to notifications

Use cases

  • Send booking confirmation push notifications to a user's device from Payload hooks
  • Broadcast system update announcements to devices subscribed to a topic
  • Notify mobile and web app users of new content published in Payload

From the author

unified interface for sending push notifications from within Payload applications.

Installation

npm i @kfiross44/payload-push

2

Stars

0

Forks

0

Open Issues

3 months ago

Last Updated

36

Weekly Downloads

v0.10.4

npm Version

86.2 KB

Unpacked Size

0

Dependencies

GitHub stars

20 since Sep 7

Show data
GitHub stars by day (UTC)
DateStars
Dec 6, 20262
Dec 5, 20262
Dec 4, 20262
Dec 3, 20262
Dec 2, 20262
Dec 1, 20262
Nov 30, 20262
Nov 29, 20262
Nov 28, 20262
Nov 27, 20262
Nov 26, 20262
Nov 25, 20262
Nov 24, 20262
Nov 23, 20262
Nov 22, 20262
Nov 21, 20262
Nov 20, 20262
Nov 19, 20262
Nov 18, 20262
Nov 17, 20262
Nov 16, 20262
Nov 15, 20262
Nov 14, 20262
Nov 13, 20262
Nov 12, 20262
Nov 11, 20262
Nov 10, 20262
Nov 9, 20262
Nov 8, 20262
Nov 7, 20262
Nov 6, 20262
Nov 5, 20262
Nov 4, 20262
Nov 3, 20262
Nov 2, 20262
Nov 1, 20262
Oct 31, 20262
Oct 30, 20262
Oct 29, 20262
Oct 28, 20262
Oct 27, 20262
Oct 26, 20262
Oct 25, 20262
Oct 24, 20262
Oct 23, 20262
Oct 22, 20262
Oct 21, 20262
Oct 20, 20262
Oct 19, 20262
Oct 18, 20262
Oct 17, 20262
Oct 16, 20262
Oct 15, 20262
Oct 14, 20262
Oct 13, 20262
Oct 12, 20262
Oct 11, 20262
Oct 10, 20262
Oct 9, 20262
Oct 8, 20262
Oct 7, 20262
Oct 6, 20262
Oct 5, 20262
Oct 4, 20262
Oct 3, 20262
Oct 2, 20262
Oct 1, 20262
Sep 30, 20262
Sep 29, 20262
Sep 28, 20262
Sep 27, 20262
Sep 26, 20262
Sep 25, 20262
Sep 24, 20262
Sep 23, 20262
Sep 22, 20262
Sep 21, 20262
Sep 20, 20262
Sep 19, 20262
Sep 18, 20262
Sep 17, 20262
Sep 16, 20262
Sep 15, 20262
Sep 14, 20262
Sep 13, 20262
Sep 12, 20262
Sep 11, 20262
Sep 10, 20262
Sep 9, 20262
Sep 8, 20262
Sep 7, 20262
npm weekly downloads

37−2 since Sep 7

Show data
npm weekly downloads by day (UTC)
DateWeekly downloads
Dec 6, 202637
Dec 5, 202619
Dec 4, 202620
Dec 3, 202620
Dec 2, 202628
Dec 1, 202619
Nov 30, 202618
Nov 29, 202617
Nov 28, 202615
Nov 27, 202614
Nov 26, 202613
Nov 25, 20265
Nov 24, 20263
Nov 23, 20264
Nov 22, 20266
Nov 21, 20266
Nov 20, 20266
Nov 19, 20266
Nov 18, 202622
Nov 17, 202623
Nov 16, 202623
Nov 15, 202622
Nov 14, 202623
Nov 13, 202624
Nov 12, 202624
Nov 11, 20267
Nov 10, 202615
Nov 9, 202614
Nov 8, 202620
Nov 7, 202634
Nov 6, 202633
Nov 5, 202634
Nov 4, 202638
Nov 3, 202637
Nov 2, 202639
Nov 1, 202632
Oct 31, 202620
Oct 30, 202620
Oct 29, 202619
Oct 28, 202614
Oct 27, 20266
Oct 26, 20265
Oct 25, 20267
Oct 24, 20264
Oct 23, 20264
Oct 22, 20265
Oct 21, 20267
Oct 20, 20266
Oct 19, 20265
Oct 18, 20264
Oct 17, 202612
Oct 16, 202612
Oct 15, 202624
Oct 14, 202623
Oct 13, 202626
Oct 12, 202626
Oct 11, 202628
Oct 10, 202629
Oct 9, 202629
Oct 8, 202620
Oct 7, 202626
Oct 6, 202630
Oct 5, 202639
Oct 4, 202643
Oct 3, 202635
Oct 2, 202635
Oct 1, 202631
Sep 30, 202625
Sep 29, 202620
Sep 28, 202613
Sep 27, 20266
Sep 26, 20269
Sep 25, 202614
Sep 24, 202615
Sep 23, 202615
Sep 22, 202615
Sep 21, 202623
Sep 20, 202626
Sep 19, 202624
Sep 18, 202620
Sep 17, 202627
Sep 16, 202628
Sep 15, 202629
Sep 14, 202620
Sep 13, 202622
Sep 12, 202621
Sep 11, 202638
Sep 10, 202631
Sep 9, 202633
Sep 8, 202634
Sep 7, 202639

Each point is npm's rolling 7-day download count.

Health Score

51/100Good

Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.

Badge for your README

Payload Directory health badge
Markdown
[![Payload Directory](https://payloaddirectory.dev/badge/1172986377-root.svg)](https://payloaddirectory.dev/plugins/1172986377-root)
HTML
<a href="https://payloaddirectory.dev/plugins/1172986377-root"><img src="https://payloaddirectory.dev/badge/1172986377-root.svg" alt="Payload Directory"></a>
Updated Aug 20, 2026Created Mar 4, 2026Published Aug 20, 2026

README

PayloadCMS Push Plugin

The PayloadCMS Push Plugin provides a unified interface for sending push notifications from within Payload applications.

It is designed as an extensible, adapter-based system that supports multiple push providers. Currently, the plugin includes a Firebase adapter powered by the Firebase Admin SDK and Firebase Cloud Messaging (FCM), with additional providers planned for future releases (such as OneSignal).


Available Adapters

Firebase (FCM)

The Firebase Push Adapter integrates PayloadCMS with Firebase Cloud Messaging (FCM) using the official Firebase Admin SDK. It enables transactional and broadcast push notification workflows across web, iOS, and Android devices.

Built on top of Firebase and Firebase Cloud Messaging (FCM), this adapter allows teams to send:

  • Single-device notifications
  • Multicast push notifications
  • Topic-based broadcast notifications
  • Platform-specific (Android / APNs) configurations

By leveraging the Firebase Admin SDK, organisations retain full control over credentials, infrastructure, and deployment topology while simplifying push delivery from within Payload.


Roadmap

The plugin is designed to support multiple providers through adapters. Planned integrations may include:

  • OneSignal
  • Additional self-hosted or API-first push services
  • Requested by community

Installation

pnpm add @kfiross44/payload-push

Prerequisites

Firebase Adapter

  1. Create a Firebase project
  2. Enable Firebase Cloud Messaging (FCM)
  3. Generate a Service Account Key (JSON)
  4. Store the service account JSON securely (environment variable or secret manager)

Usage

Firebase Adapter

All data should based on your generated JSON file (project-id-firebase-adminsdk-xxxxx-xxxxxxxxxx.json) from Firebase Console

// payload.config.ts
import { buildConfig } from 'payload'
import { firebaseAdapter } from '@kfiross/payload-push'

export default buildConfig({
  plugins: [
      // ... other plugins configuration

      payloadPushPlugin({
        firebaseAdapter({
          serviceAccountJSON: {
            type: "service_account",
            project_id: process.env.FIREBASE_SERVICE_ACCOUNT_PROJECT_ID!,
            private_key_id: process.env.FIREBASE_SERVICE_ACCOUNT_PRIVATE_KEY_ID!,
            private_key: process.env.FIREBASE_SERVICE_ACCOUNT_PRIVATE_KEY!,
            client_email: process.env.FIREBASE_SERVICE_ACCOUNT_CLIENT_EMAIL!,
            client_id: process.env.FIREBASE_SERVICE_ACCOUNT_CLIENT_ID!,
            auth_uri: "https://accounts.google.com/o/oauth2/auth",
            token_uri: "https://oauth2.googleapis.com/token",
            auth_provider_x509_cert_url: "https://www.googleapis.com/oauth2/v1/certs",
            client_x509_cert_url: "https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-fbsvc%40rescue-263a6.iam.gserviceaccount.com",
            universe_domain: "googleapis.com"
          }
        }),
      }),
    ],
})

Examples

Firebase Adapter

  • Sending a Push Notification
await payloadPush.sendPush({
  title: 'New Booking Confirmed',
  body: 'Your booking has been successfully confirmed.',
  data: {
    bookingId: '12345',
  },
  options: {
    token: '<device-fcm-token>',
  },
})
  • Sending to Multiple Devices
await payloadPush.sendPush({
  title: 'System Update',
  body: 'We have updated our terms of service.',
  options: {
    tokens: ['token-1', 'token-2'],
  },
})
  • Sending to a Topic
await payloadPush.sendPush({
  title: 'Weekly Newsletter',
  body: 'Check out what’s new this week!',
  options: {
    topic: 'weekly-updates',
  },
})

Configuration

Firebase Adapter

OptionTypeRequiredDefaultDescription
serviceAccountJSONstringYes-Firebase service account credentials JSON

Inside options, you may provide:

OptionTypeDescription
tokenstringSingle device token
tokensstring[]Multiple device tokens
topicstringSubscribed topic name
androidobjectAndroid-specific FCM config
apnsobjectiOS/APNs-specific config

Example Environment Variable Setup

Firebase Adapter

FIREBASE_SERVICE_ACCOUNT_PROJECT_ID: '..',
FIREBASE_SERVICE_ACCOUNT_PRIVATE_KEY_ID: '..',
FIREBASE_SERVICE_ACCOUNT_PRIVATE_KEY: '..',
FIREBASE_SERVICE_ACCOUNT_CLIENT_EMAIL: '..'

License

This project is licensed under the MIT License.

Similar plugins