EU VAT

Records EU VAT on Payload ecommerce orders: country rates, B2B reverse charge, VIES validation, and OSS reporting totals.

Community 1 155/wk MIT v1.0.0

Installation

pnpm add payload-tax-eu

About

The plugin calculates EU VAT for shops running `@payloadcms/plugin-ecommerce` and writes the breakdown onto each order: the rate applied, the taxable base, the VAT amount, the country of taxation, the place-of-supply scope, and whether a reverse charge took over. The point is audit. Months later you can still explain why a customer was charged what they were charged, with the numbers sitting on the order itself. Integration is a `beforeChange` hook on the orders collection and a read-only `tax` group field appended to it. The hook runs on order creation, reads the order total and shipping country from configurable dot paths, and fills the group. It never touches the amount that reaches the payment provider; that stays the checkout's job. Two REST endpoints come with it: `POST /api/tax/quote` for pre-purchase estimates and `GET /api/tax/oss-report` for the quarterly One Stop Shop totals you file with your tax authority. The calculation works in integer minor units throughout, the same convention the official ecommerce plugin uses, and never converts to a float. You set `sellerCountry` (required, no default), choose inclusive or exclusive pricing, and pick rounding by line or by total. A built-in rate table covers the member states, and your own rate entries override it. VAT numbers are checked for format offline and instantly; switching on `vies.enabled` adds a call to the European Commission's VIES service that fails open on timeout or error. The plugin needs Payload 3.88 or newer with `@payloadcms/plugin-ecommerce` installed. It ships no admin UI components, only fields, so it is unlikely to break on minor Payload releases. Greece's dual `GR` and `EL` codes are handled, with `EL` sent to VIES. The OSS report counts configurable order statuses and paginates through the collection.

Package info

Package name
payload-tax-eu
Latest version
1.0.0
Unpacked size
67 kB
License
MIT
Weekly downloads
155
Last publish
Aug 21, 2026

More from Poseidonas

View profile