Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

payload-clienthub

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

payload-clienthub

Payload CMS plugin for client management, service tracking, and invoicing.

latest
Source
npmnpm
Version
0.0.12
Version published
Maintainers
1
Created
Source

payload-clienthub

Automatic monthly invoicing with PDF generation, Swiss QR Bill support, and multi-language email delivery for Payload CMS.

npm version License: MIT

Overview

payload-clienthub adds a full invoicing workflow to Payload -- clients, services, and invoices are managed as collections. Recurring services are automatically detected when due, rendered as localized PDF invoices (with Swiss QR Bill support), and emailed to each client. A single endpoint processes all clients at once, so you can wire it up to a scheduler and forget about it.

Features

  • Client & service management -- track clients, contacts, and one-time/monthly/yearly services.
  • PDF invoices -- generated with itemized line items, company branding, and Swiss QR Bill payment slips for CH-based companies.
  • Multi-language -- invoices and emails are localized in DE, FR, IT, and EN.
  • Batch endpoint -- one endpoint processes all clients at once; authenticate with a shared secret to call it from any scheduler.

Installation

pnpm add payload-clienthub

Usage

// payload.config.ts
import { buildConfig } from 'payload';
import { clienthubPlugin } from 'payload-clienthub';

export default buildConfig({
  // ...
  plugins: [
    clienthubPlugin({
      cronSecret: process.env.CRON_SECRET!,
    }),
  ],
});

Trigger invoice generation for all clients by calling the batch endpoint (e.g. from a monthly scheduler):

curl -H "Authorization: Bearer $CRON_SECRET" \
  https://your-app.com/api/plugin-invoices/process-all-clients

Options

OptionTypeDefaultDescription
cronSecretstringRequired. Shared secret used to authenticate batch requests via the Authorization: Bearer header.
clientsCollectionSlugCollectionSlug'clients'Slug for the auto-created clients collection.
servicesCollectionSlugCollectionSlug'services'Slug for the auto-created services collection.
invoicesCollectionSlugCollectionSlug'invoices'Slug for the auto-created invoices collection.
invoicePdfsCollectionSlugCollectionSlug'invoice-pdfs'Slug for the auto-created invoice PDFs upload collection.
onError(error: Error, context: { operation: string; metadata?: Record<string, unknown> }) => voidconsole.errorCustom error handler called when PDF generation or email delivery fails.

Contributing

This plugin lives in the payload-plugins monorepo.

Development

pnpm install

# watch this plugin for changes
pnpm --filter payload-clienthub dev

# run the Payload dev app (in a second terminal)
pnpm --filter sandbox dev

The sandbox/ directory is a Next.js + Payload app that imports plugins via workspace:* — use it to test changes locally.

Code quality

  • Formatting & linting — handled by Biome, enforced on commit via husky + lint-staged.
  • Commits — must follow Conventional Commits with a valid scope (e.g. fix(payload-clienthub): ...).
  • Changesets — please include a changeset in your PR by running pnpm release.

Issues & PRs

Bug reports and feature requests are welcome — open an issue.

License

MIT

Keywords

payload

FAQs

Package last updated on 25 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts