Order Emails
Sends a transactional email when a Payload order is created and on each status change, routed through your configured email adapter.
Installation
pnpm add payload-order-emails About
Payload's official ecommerce plugin writes an order but never sends mail to anyone who pays. This package closes that gap by attaching one `afterChange` hook to the orders collection and firing a transactional email through `payload.sendEmail`, so whatever adapter you already configured under `email` (nodemailer, Resend, and so on) is the one used. Events key off the four statuses the ecommerce plugin declares, `processing`, `completed`, `cancelled` and `refunded`, plus a `created` event on first write. `created`, `completed`, `cancelled` and `refunded` are enabled by default; `processing` only fires when an order moves back to it. A status the plugin does not recognize falls through to a `defaultEvent` you opt into, so a status added by another plugin will not surprise you. Recipients are configurable per event as `customer`, `admin`, `both` or `none`. When the order carries no `customerEmail`, which happens for logged-in customers in the official Stripe flow, the hook reads the customer record on the same `req` to find the address. Amounts are formatted from the minor unit, so `2500` becomes `25.00 EUR`, with `currencyDecimals` settable globally or per currency code. Templates are plain text by default and carry no shop name or markup. Each event accepts a string template with `{{placeholder}}` tokens or a function receiving the full context, and a separate `adminTemplate` for the admin copy. The defaults export is importable so you can extend rather than rewrite. The plugin adds no collection, field, or migration; it only appends a hook. Sending is awaited inside the request, so a slow SMTP server slows the triggering write, and a failed send is caught and logged without retry rather than blocking the order save. A `dryRun` option resolves and logs every message without handing it to the adapter, intended for staging.
Package info
- Package name
payload-order-emails- Latest version
1.0.1- Unpacked size
- 31 kB
- License
- MIT
- Weekly downloads
- 12
- Last publish
- Aug 21, 2026
More from Poseidonas
View profileBarcodes
Adds Code 128, EAN-13 and QR code generation to Payload product collections with a printable label page and optional admin print buttons.
AI Manager
Writes product titles, descriptions, attributes and translations into Payload fields via Claude, ChatGPT, Gemini or Kimi, and skips content it already generated.
EU VAT
Records EU VAT on Payload ecommerce orders: country rates, B2B reverse charge, VIES validation, and OSS reporting totals.
Stock Reservation
Validates variant stock and price before checkout and holds reserved inventory until payment settles, extending the official Payload ecommerce plugin.
Stock Alerts
Sends a shop one email when product or variant inventory crosses a low stock threshold, with backorder handling and a storefront-readable status field.
Shipping Rates
Adds shipping zones, rate calculation, and a quote endpoint to Payload ecommerce shops.
Similar plugins
More in CommerceStripe
Syncs Payload collections with Stripe resources and routes Stripe webhooks and API calls through Payload.
Tpay E-commerce Payment Adapter
Adds BLIK, bank transfer and card payments through Tpay to Payload's e-commerce plugin, with webhook verification and stock-aware order confirmation.
Google Merchant Center Ecommerce Integration
Sync products with Google Merchant Center from Payload CMS.