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.0- Unpacked size
- 31 kB
- License
- MIT
- Last publish
- Aug 20, 2026
More from Poseidonas
View profileSales Reports
Sales reporting plugin that totals revenue, units and orders by period, product and customer from Payload order collections.
Ecommerce Product Reviews
Adds product reviews and aggregate ratings to a Payload ecommerce shop, with verified-purchase detection and moderation before reviews go public.
Refunds
Adds full and partial refund records to Payload ecommerce orders, with per-line caps, optional restock, and an append-only audit trail.
Invoices
Gapless sequential invoices and credit notes for Payload ecommerce orders, with frozen snapshots and dependency-free PDF output.
Fulfillment
Adds fulfillment states, transition history, internal notes and tracking fields to Payload ecommerce orders.
Downloads
Sells digital products from a Payload store using signed, expiring download links that stop working when an order is refunded.