Fraud Prevention for Vendure
Signal-based risk scoring on every order, monitor/hold/enforce modes, review queue with customisable customer comms, alerts to Slack/Discord/Teams/Telegram, daily threat feeds — chargebacks stopped before fulfilment.
Install on Vendure: add the package with npm, yarn or pnpm, then register FraudPreventionPlugin in vendure-config.ts. All steps
npm
npm install @huloglobal/vendure-plugin-fraud-prevention yarn
yarn add @huloglobal/vendure-plugin-fraud-prevention pnpm
pnpm add @huloglobal/vendure-plugin-fraud-prevention Register it in vendure-config.ts
// vendure-config.ts
import { FraudPreventionPlugin } from '@huloglobal/vendure-plugin-fraud-prevention' ;
export const config: VendureConfig = {
plugins: [
FraudPreventionPlugin.init({
publicBaseUrl: 'https://shop.example.com' ,
licenceKey: process.env.HULO_LICENCE_KEY_FRAUD_PREVENTION,
}),
// ... your other plugins
],
};What it does
Built for production from day one.
Every placed order is risk-scored server-side the moment it lands — no storefront integration required. Weighted signals (order velocity per IP and per canonical email identity, disposable email domains, block/allow lists with CIDR range matching, high-risk countries, failed-payment patterns, card AVS postcode/address mismatch, failed CVC checks, card country different from billing, plus-addressing abuse, first-order value) roll up to a 0-100 score. Your per-channel thresholds decide what happens: log it, refuse a block-level order before the charge (free hold mode), or, with a licence, hold it for review and tell the customer it is being verified. Digital-goods aware: fulfilment (licence keys, downloads) waits for approval, so one reviewer click is the difference between a sale and a chargeback.
Server-side enforcement
Assessment runs on OrderPlacedEvent inside Vendure — fraudsters can't bypass it by skipping your storefront JS. No checkout integration needed.
Weighted signal scoring
Velocity (IP/hour, IP/day, email/day, daily value), order value ceilings, disposable emails, list hits, high-risk countries, failed payments, identity fan-out (many emails from one IP = card testing), VPN/proxy/datacentre IPs, IP vs billing-country mismatch, MX-less email domains, billing vs shipping postcode, a failed CVC check, card country vs billing country. Limits follow each order's own currency. Every weight overridable per channel, on the free tier.
Card AVS mismatch
The card issuer's own verdict on the billing postcode and street address — the strongest address signal there is. Read automatically from Stripe for orders paid through Vendure's StripePlugin (no extra config), from payment metadata for custom handlers, or from a one-line avsResolver hook for any other gateway. Only an explicit fail scores; fails open. AVS fails stand out as red card chips in the review queue and on the order page, and an AVS-fails filter on both the review queue and the activity log shows only those orders — so a reviewer sees the bank's verdict before anything else.
Monitor → hold → enforce rollout
Start in monitor mode: everything is scored and logged, nothing is held. Watch the Activity tab and tune thresholds. Hold mode (free) then refuses block-level orders before any payment is taken; enforce mode (licensed) adds the review queue. If a licence lapses, enforce works as hold.
"Off" never means blind
Even with protection disabled the engine still scores every order and records a shadow assessment. Risky shadow-scored orders warn in the server log and, with a licence, fan out to your ops channels and can email the admin — so you keep the full risk picture while protection is paused, and turning it back on starts from evidence, not guesswork.
Risk score on the order page
Every paid order's detail page shows the risk score out of 100, level, contributing signals and review-case status — colour-coded, light + dark theme. Your team sees the risk where they already work.
Manual review queue
With a licence, held orders wait for a human. Approve releases fulfilment and captures an authorised payment; reject cancels — and each can be done silently (no customer email) or, on reject, with a one-click silent blocklist of the email + IP so the fraudster is turned away next time and never tipped off. Alerts fan out to Slack, Discord, Microsoft Teams, Telegram and an HMAC-signed webhook; a per-channel auto-approve timer means nothing strands over a weekend. Full audit trail on every decision.
Fulfilment hold hook
One-line host integration: ask heldOrderIds() before releasing licence keys or shipping, or, with a licence, call the HTTP fulfilment gate from a system outside Vendure. Approval is the gate, not an afterthought.
Daily threat feeds + one-click presets
With a licence: FireHOL Level 1, Spamhaus DROP (CIDR ranges matched properly), Tor exit nodes and ~3,500 disposable-email domains synced nightly — plus seven curated add-with-one-click presets (IPsum L3+, blocklist.de, FireHOL L2/L3, Emerging Threats compromised, CINS Army, StopForumSpam toxic domains). No URL hunting.
Email canonicalisation
fraud+1@gmail.com, fraud+2@gmail.com and f.r.a.u.d@gmail.com all count as ONE identity for velocity — the plus-addressing trick stops working.
Trust works both ways
Returning customers earn NEGATIVE points — a real repeat buyer rarely trips a hold. Allowlisted identities (test accounts, key B2B customers, office IPs) skip every check entirely.
Customer messages in your voice
Every gating outcome — held, approved, rejected — is a per-channel editable template with variables, live preview and thoughtful defaults: a held order reads as 'a quick security check' with a stated turnaround, never an accusation, and rejections carry a refund timeline plus a human-appeal path. Each shows a default / customised badge; reset any selection or all of them in one click. You choose when — and whether — customers are told: never, block-level only, or always.
"What-if" simulator
Free. Run a hypothetical order (email, IP, value, country, billing / shipping postcodes, card AVS results) against live data and see the exact signal-by-signal score breakdown — without logging or holding anything.
Multi-tab admin dashboard
Overview KPIs + daily chart, Rules, Review queue with count badge, Lists, Simulate, customer Lookup dossier (orders, spend, failed payments, case history, one-click allow/block), filterable Activity log with CSV export, Settings, and a risk column on the orders list. WCAG AA in light and dark themes.
IP intelligence, opt-in
VPN, proxy and hosting detection and IP country vs billing country, from ip-api.com Pro with your own key, over HTTPS. Off by default; private and reserved addresses are never sent, and answers are cached.
MySQL, MariaDB & PostgreSQL
The plugin follows whatever database your Vendure dbConnectionOptions use — no configuration. Verified against PostgreSQL 17; MySQL/MariaDB installs are unchanged.
Buy & activate from the admin
The 14-day evaluation starts by itself, with no card. Subscribe or buy lifetime from the plugin's admin page — checkout opens in a new tab and the key installs itself within a minute, renewals included. The same card shows your plan, first-charge date and a Manage billing link to the Stripe portal (update card, cancel, switch plan). Already have a key? Paste it into the same banner. No .env edit, no redeploy; environment keys still take precedence for infrastructure-as-code setups.
Weekly report, set-up checklist & dashboard widget
With a licence (or during the first 14 days), every Monday the plugin emails whoever runs the store a short report of what it did that week — real numbers from your own database, week-over-week, with the next set-up step to take — and the plugin page opens with a set-up checklist that hides itself once everything is done. Change the recipient, send a test or switch the report off from the plugin's Settings tab (needs the host's SMTP_* settings). If the licence lapses, the report stops and the checklist is hidden; their settings are kept. The dashboard widget (Dashboard → Add widget) is free and shows the plugin's recent numbers.
One-click in-app updates
When a new version ships, an update banner shows current → latest with a What's-new link to the changelog. "Update now" installs the registry-verified release via your project's own package manager (yarn/npm/pnpm auto-detected) and gracefully restarts under pm2/systemd. Disable with HULO_SELF_UPDATE=off.
Install
Three steps, five minutes.
Add the package
Or run the one-line installer that does steps 1–3 for you:
Prefer to do it by hand?
npm
yarn
pnpm
Register it
In your vendure-config.ts:
Compile the admin UI
Add the extension to your compileUiExtensions call so the plugin's page appears in the admin:
That's it. Restart Vendure and the plugin's page is in the admin with every feature on for 14 days — no card, no key. To keep it all on afterwards, open the page and click Subscribe (first charge when the 14 days end) — the key installs itself, no .env edit, no redeploy.
Free tier vs licensed
Try the whole thing, keep the core for free.
Every new install has every feature on for its first 14 days, with no card and no key. After that the free tier keeps working indefinitely, and a licence keeps the licensed features on. If a licence lapses, the licensed features stop and nothing is deleted.
Free tier (after the 14 days)
- A risk score and its signals on every order, unpaid ones included, a failed CVC check and card country different from billing among them
- Allow and block lists, custom signal weights, the simulator and customer lookup
- Hold mode: block-level orders refused before the charge
- Order limits in each order's own currency
- The activity log with the retention you set, and a risk column on the orders list
- A notice when a misconfigured proxy hides your customers' IP addresses
- Extension events for your own code
- IP intelligence, opt-in, with your own ip-api.com Pro key
First 14 days + licensed
- Enforce mode with the review queue; approving captures the payment
- The HTTP fulfilment gate
- Threat feeds (FireHOL, Spamhaus, Tor, disposable e-mail) and your own feed URLs
- E-mail and chat alerts, monitor-mode alerts included
- The weekly report and set-up checklist
HTTP endpoints
Every route exposed.
/fraud-prevention/checkPublic: storefront pre-check (rate limited, minimal shape)/fraud-prevention/configAdmin: per-channel config/fraud-prevention/configAdmin: save config/fraud-prevention/statsAdmin: KPIs + daily series + top IPs/fraud-prevention/casesAdmin: review queue/fraud-prevention/cases/:id/approveAdmin: release + notify customer/fraud-prevention/cases/:id/rejectAdmin: cancel + notify customer/fraud-prevention/simulateAdmin: dry-run with full signal breakdown/fraud-prevention/logAdmin: filterable audit log/fraud-prevention/lists/syncAdmin: threat-feed sync (licensed)/fraud-prevention/gate/:orderIdAdmin: HTTP fulfilment gate, releasable or not (licensed)/fraud-prevention/order-assessment/:orderIdAdmin: score + signals for the order-page panel/fraud-prevention/feeds/presetsAdmin: curated threat-feed presets/fraud-prevention/metaAdmin: licence + evaluation + update status/fraud-prevention/licence/activateAdmin: activate a licence key from the admin UI/fraud-prevention/update/runAdmin: one-click in-app update + graceful restart/fraud-prevention/digest/settingsAdmin: weekly report recipient, last/next send/fraud-prevention/digest/send-testAdmin: email this week's report to you now/fraud-prevention/setupAdmin: set-up checklist (what is still to do)/fraud-prevention/widgetAdmin: headline figures for the dashboard widgetFAQ
Common questions.
How do I get a licence key?
Buy one on the web with Stripe Checkout: monthly licence for Fraud Prevention, annual licence for Fraud Prevention (two months free) or lifetime licence for Fraud Prevention. You'll receive the JWT key by email. Paste it into the plugin's admin settings (Activate) — no redeploy — or set it as HULO_LICENCE_KEY_FRAUD_PREVENTION in your .env if you prefer config-as-code; the env key wins when both are present.
Does it work without a key?
Yes. Every install runs with all premium features on for its first 14 days — no card, no licence key, nothing to configure — so you can judge it on your real traffic. After that it keeps working in the free tier. To keep them, click Subscribe on the plugin's admin page: the first charge is taken when the 14 days end (or 49 hours after checkout, if that is later), you can cancel any time before then, and the licence installs itself.
Which databases are supported?
MySQL, MariaDB and PostgreSQL (verified against PostgreSQL 17). The plugin follows your Vendure dbConnectionOptions automatically — there is nothing to configure.
How do updates work?
The plugin checks the npm registry daily. When a newer version exists, the admin dashboard shows an update banner with a What's-new link to the changelog and an "Update now" button that installs the registry-verified release via your own package manager and gracefully restarts under your process supervisor. Prefer manual control? Copy the install command instead, or set HULO_SELF_UPDATE=off.
Where is data stored?
In your Vendure database: the plugin keeps its data in its own tables there, created on boot. Hulo Global never receives your customer data: the plugin sends our licence server only the licence check-ins and usage counts described under “Do the plugins call home?”. To score orders it reads the card checks from your Stripe account; if you switch on IP intelligence it looks up IP addresses at pro.ip-api.com with your own key, and with a licence it downloads public blocklist feeds (FireHOL, Spamhaus, Tor, disposable-email domains). The lookups and feeds are cached, and can be switched off.
Will it survive a Vendure upgrade?
It supports Vendure >=3.5.0 <4.0.0 (its peer dependency), and current releases are built and tested against Vendure 3.8.2 before they are published. A boot-time compatibility check emits a non-fatal warning if @vendure/core is outside that range, so upgrades to a future 3.x are safe to try. The 4.0 line will be tested and re-declared once its changelog lands.
Changelog
What's new.
Latest release: v0.22.0, 16 November 2026. Full changelog for Fraud Prevention for Vendure
v0.22.0NewLatest
Added
- E-mail design. Customer notices (held, approved, rejected) and admin alerts use one layout: a 600px card with the merchant's logo or store name over an accent bar, an order box, info and warning boxes, buttons, a "Kind regards," sign-off and an optional footer. Inline styles only; every value escaped. Admin alerts use a compact version.
- Plain-text part on every e-mail.
emailoption:storeName,accentColor(default#155dfc),logoUrl(https only),logoWidth,footerText,supportEmail.- Customer-message Preview shows the e-mail exactly as sent, in a sandboxed frame, and returns its plain-text version.
Changed
- Default customer messages: British spelling ("e-mail", "working days"); dropped the "keeps prices down" line and the promise of a full refund (refunds depend on
refundOnReject). Messages you have edited are not changed. sendAdminAlert(subject, content)takes structured alert content; a string is still accepted as HTML.- Dev dependencies:
@nestjs/common^12.5.0,@nestjs/schedule^12.0.4,mysql2^3.24.6.
Fixed
- Two admin alerts (protection off, held for review) put the order code, customer e-mail and signal details into the HTML unescaped.
- Variables in an HTML customer message (the customer's first name) were not escaped.
GET /fraud-prevention/notification-configreturned the Slack/Discord/Teams webhook URLs, the Telegram bot token and the webhook signing secret to any admin with read permission. They are now masked, and a masked value saved back keeps the stored one.- Notification settings are validated (alert address, https webhook URLs, lengths).
- Saving a customer message without a channel failed in SQL, and an empty subject was accepted; both now answer 400.
- A non-numeric
takeon the activity log reached SQL asLIMIT NaN.
v0.21.0New
Added
- Hold mode (free). A new per-channel mode between Monitor and Enforce: every shop order is scored on its move to
ArrangingPayment, before any payment is taken, and a block-level order is refused there (neutralOrderStateTransitionError, logged asrefused). Shop API only; admin draft orders are never refused; the check fails open.preChargeCheck: falseturns it off. - Enforce falls back to Hold when the licence or evaluation lapses (it used to drop to Monitor), so a lapse never weakens protection below the free tier.
- Approve captures an authorised payment (premium): approving a case settles the order's
Authorizedpayments throughOrderService.settlePayment(captureOnApprove, orcapture: falseper case). On the free tier the approval reports what is still authorised. - HTTP fulfilment gate (premium):
GET /fraud-prevention/gate/:orderIdandGET /fraud-prevention/held. - Monitor-mode alerts (premium): risky orders flagged in monitor or hold mode, and orders refused before payment, now alert by e-mail and chat.
- Unpaid orders are scored: an order left in
ArrangingPaymentfor 15 minutes is scored once asunpaid, and refused / unpaid attempts count towards IP velocity. - CVC-fail (30) and card country ≠ billing country (15) signals, from Stripe charges, payment metadata or
avsResolver. - Currency-aware limits: value limits are in the channel's default currency, converted for orders in another currency; spend is summed per currency; amounts are formatted in their currency everywhere (no hard-coded £). New channels in high-unit currencies get scaled defaults.
- Misconfigured-proxy notice on the Overview tab, with dismiss.
- Editable activity-log retention (Settings), overriding the
logRetentionDaysoption. - Fraud risk column on the admin orders list (column picker), backed by
GET /fraud-prevention/order-risk?ids=. - Extension events on the EventBus (
FraudAssessedEvent,FraudPaymentRefusedEvent,FraudCaseOpenedEvent,FraudCaseResolvedEvent) and theextraSignalsoption. - Activity filter for
refused,unpaidandshadow.
Changed
- Premium: e-mail and chat alerts, the weekly report and the setup checklist now need a licence or the evaluation (signal weights stay free). The weekly report is not sent and the checklist is empty on the free tier; settings are kept and they resume with a licence.
digest/previewanddigest/send-testanswer 402 on the free tier. - The public
/checkanswersallowed: falsefor what the pre-charge check would refuse (block level in hold or enforce mode). PREMIUM_FEATURESmatches the code: enforce + review queue, HTTP gate, threat feeds, alerts, weekly report and checklist. Manual lists are free (they always were).
Fixed
- IP intelligence called the free ip-api.com endpoint over HTTP on every new address (commercial use is not allowed there). It is now opt-in (Settings → IP intelligence, off by default and off for existing installs), uses HTTPS
pro.ip-api.comwith the merchant's own key, and never looks up private or reserved addresses. The key is never returned by the API or logged. holdFulfilmentwas stored but never read. With it off, cases still open in the review queue butpendingOrderIds(),heldOrderIds()and the gate release the order; rejected orders are always held.cooldownMinutesAfterFailedPaymentwas stored but never read. An address that reached the failed-payment limit keeps thefailed_paymentssignal for that many minutes after its latest failure, and in hold / enforce mode cannot start a payment meanwhile (0 = off).- The
init()options never reached the service, soavsResolver,smtp,defaultAdminEmail,publicBaseUrlandcancelOnReject/refundOnRejectwere ignored by the scoring and review paths. - The daily-value signal counted the order being scored twice once it was placed.
isAssessed()/assessedOrderIds()ignorerefusedandunpaidrows, so the fulfilment gate never treats an unplaced attempt as assessed.
Database
- New index
fraud_log(ip, createdAt). Settings live in the sharedhulo_plugin_prefstable. No destructive changes; MariaDB/MySQL and PostgreSQL.
v0.20.6NewSecurity
- Security Admin REST routes refuse a Shop-API session on Vendure 3.8+. Vendure 3.8 binds every session to the API it was created on and refuses Shop-API sessions on the Admin API (GHSA-5fpx-9m35-w745), but it does not check REST routes added by plugins: an administrator's storefront session still carried their admin permissions into the Fraud Prevention admin REST routes. Those routes now also require a session created on the Admin API (
isAdminApiSessionfrom the licence SDK 0.15.6, the same rule as Vendure's own AuthGuard). The admin UI is unaffected; administrators logged in before the 3.8 upgrade log in again once, as Vendure already requires. No change on Vendure 3.5 to 3.7.
Compatibility
- Tested with Vendure 3.8.2 (NestJS 12,
@nestjs/graphql14, Apollo Server 5), as well as 3.5 to 3.7. The peer range stays@vendure/core >=3.5.0 <4.0.0; nothing here needs 3.8. - Requires
@huloglobal/vendure-licence-sdk^0.15.6.
v0.20.5New
Package metadata
- The
licensefield is nowAGPL-3.0-only, matchingLICENSE, which grants the GNU Affero General Public License version 3 (it saidAGPL-3.0-or-later). Published npm builds remain under the separate commercial licence described inLICENSE. No code changes.
v0.20.4New
Fixed
- PostgreSQL: a review case is decided once. With licence SDK 0.15.3 or older, the claim on a review decision always looked successful on Postgres, so two decisions on the same case at the same moment (two admins, or the auto-release job and a reject) could both go through. The plugin now requires licence SDK
^0.15.4, and only the first decision acts. The first weekly report is no longer skipped either (it used to start a week late). MySQL and MariaDB were not affected. - PostgreSQL: a licence key activated in the admin is now stored. The plugin's licence store left out the conflict column that the Postgres upsert needs, so saving a key failed. Pasting a key into the admin applied it, answered with a server error and did not store it, so the plugin was unlicensed again after a restart. A key bought from the admin, which installs itself, was not stored either. MySQL and MariaDB were not affected.
Package metadata
homepageis now the product page, https://huloglobal.com/vendure-plugins/fraud-prevention/, instead of the GitHub repository.- A shorter
descriptionthat npm shows in full (npm cuts descriptions at 255 characters). - The npm package no longer includes the plugin's compiled unit tests.
v0.20.3New
Documentation
- The README now shows the plugin logo, hosted on huloglobal.com so it displays on npm and GitHub alike, linking to the product page. No code changes.
v0.20.2NewSecurity
- Security The public
POST /fraud-prevention/checkpre-check no longer reveals anything about an e-mail address. It used to run the full assessment, so itsriskLeveltold an anonymous caller whether an address was a customer (returning-customer credit), its last-24 h spend (movingorderValuePenceacross the daily-value limit) and whether it was allow- or blocklisted. It now scores only the caller's own attempt: no allowlist, no e-mail block lists, no e-mail velocity or spend, no customer history. The response shape is unchanged. Placed orders are still scored in full. - Security The pre-check's client address can no longer be chosen by the caller. It used to take
cf-connecting-ipor the left-mostx-forwarded-forentry from any client, so rotating the header bypassed the rate limit and let a caller have any address scored. Forwarding headers (andcf-ipcountry) are now believed only from proxies listed in the newtrustedProxiesoption (right-most untrusted hop); otherwise the address is Express'sreq.ipor the socket. Hosts behind a reverse proxy or Cloudflare should settrustedProxies, or every pre-check is keyed on the proxy's address.
Fixed
- Two concurrent decisions on one review case (two admins, or the hourly auto-release against a reject) could both succeed, so an order could be refunded and cancelled and also released and the customer told it was approved. The decision is now claimed with a conditional update; the second gets
ok: false. - The documented
rateLimitoption was ignored (the endpoint was fixed at 60 / min); it now applies.
v0.20.1
Changed
- Every install now gets a 14-day evaluation with all features on and no card (granted by the HULO licence server). The licence banner's buttons read Subscribe: during the evaluation the first charge falls on the day it ends, so there is no second free trial.
v0.20.0
Added
- Weekly report: every Monday at 08:00 server time the plugin emails the previous week's figures (orders risk-scored, held, blocked, value intercepted, review decisions) with the week before for comparison, the next set-up steps and the licence state when it needs attention. Sent through the plugin's SMTP transport (the
smtpoption orSMTP_*env) to the recipient set under Settings → Weekly report, else the alert email,defaultAdminEmail, the licence customer or the evaluation reminder address. EndpointsGET/POST fraud-prevention/digest/settings,POST fraud-prevention/digest/send-test,GET fraud-prevention/digest/preview; a "Weekly report" card on the Settings tab with Send-me-a-test and Preview. Scheduled on the worker only, once per install across processes. - Set-up checklist at the top of the Overview tab (
GET fraud-prevention/setup): scoring on for a channel, enforce on for a channel, alert email set, threat feeds synced in the last 7 days, first review case worked — real checks, each linking to the tab where it is done. Hideable per browser; returns if an item comes undone. - Admin navigation entry Sales → Fraud Prevention and a dashboard widget (Dashboard → Add widget → Fraud Prevention,
GET fraud-prevention/widget): orders scored, risky orders intercepted and value intercepted for the last 7 days, plus the licence notice. Both are registered by the new sharedFraudPreventionNavModuleinuiExtensions. - Overview tiles "Risky orders intercepted" and "£ value intercepted" (last 30 days;
stats.intercepted30), the latter summing the Vendure order totals behind every review case. metanow carriesnotice(trial/key about to end),premiumFeaturesandrecentStats(top three non-zero 30-day figures). The licence banners show the lifecycle notice in an amber strip, the premium feature list on the trial and free tiers, and a "So far: …" line from the recent figures; the licensed banner reads "renews automatically — current key valid until <date>" for subscriptions.- Usage figures reported to the licence server now cover the last 30 days and include
ordersAssessed,ordersHeld,ordersBlocked,riskyValuePence,casesApprovedandcasesRejected; licensed installs keep reporting through the daily heartbeat (SDK 0.15.0Heartbeat.setStatsProvider).
Changed
@huloglobal/vendure-licence-sdk^0.15.0.- The 402 responses on the feed endpoints keep
error: 'licence_required'and addbuyUrl. In the admin UI any 402 (or alicence_required/premium-featurebody) is shown as "<action> needs a licence — start the free trial or activate a key at the top of this page" instead of the raw message; switching to Enforce on the free tier says the same. - "Email me before it ends" validates the address, times out after 8 s and remembers the address (shared
hulo_plugin_prefstable, keyeval.leadEmail) as the weekly report's last-resort recipient.
v0.19.2
Added
- IPv6 CIDR ranges on the block and allow lists (
2001:db8::/32,::ffff:203.0.113.0/120, a bare address is a /128). Matching runs over the expanded 128-bit form, so::compression, zone ids and IPv4-mapped forms all match; an IPv4 client is also checked against IPv4-mapped ranges and an IPv4-mapped client against IPv4 ranges. IPv4 ranges keep their integer fast path. Entry validation accepts either family. - Allowlisted
ip_rangeentries are now honoured (previously only exactipentries were checked when deciding whether an address bypasses the checks).
Changed
- A best-effort
idx_fp_payment_createdindex on Vendure'spayment(createdAt), created on boot, for the failed-payments signal and the 24 h failed-payment count (Vendure never indexes that column). Failure to create it is logged at debug level and never blocks start-up.
Fixed
- PostgreSQL: every camelCase column read from Vendure's tables (
order,customer,payment,order_channels_channel,channel) is quoted;SUM(condition)counts are written asSUM(CASE WHEN … THEN 1 ELSE 0 END);order.activeis compared as a boolean; the customer-history query no longer sends an untyped null parameter; the feed-sync cross-process lock uses a Postgres advisory lock (it was MariaDBGET_LOCKonly). - The feed-sync lock is taken and released on one connection held for the duration of the sync. Session locks released through the pool could land on a different connection and leave the lock behind, making later syncs report "already running in another process".
- On a fresh install the
fraud_blocked_orders(orderId, status)index was requested before the table existed and silently skipped; it is now created after the table. - A PostgreSQL corpus test (
tests/pg-corpus.test.ts, runs whenHULO_PG_URLis set) extracts every SQL statement insrc/, translates it with the SDK's dialect adapter and prepares it against a scratch database with quoted stand-ins for the Vendure tables, so a quoting or dialect regression fails the unit suite.
v0.19.1
Fixed
- Nightly threat-feed sync no longer deadlocks:
fraud_blocklistgains asourceindex, feeds that have not changed (same content hash) are skipped, changed feeds are loaded under a staging key and swapped in id-sized chunks with deadlock retries, and a sync cannot overlap another (in-process flag plus a database lock across server and worker). - The review case is written before the assessment log in enforce mode, closing the window in which a host fulfilment run could release an order about to be held; a re-delivered event can no longer open a second case.
- IPv4-mapped addresses (
::ffff:1.2.3.4) are normalised, IPv6 addresses reach the IP-intelligence lookup, blocklisted emails match their canonical form, list entries are validated (type, CIDR syntax, email, domain), thresholds are clamped and ordered, and the public pre-check uses the caller's own address. - Ops webhooks treat a non-2xx reply as a failure and log it at warn level.
Changed
fraud_log(orderId)andfraud_blocked_orders(orderId, status)indexes for the host fulfilment gate and order panel.- The IP-intelligence and MX lookups start at the beginning of an assessment and run in parallel with the database signals; a lookup timeout is 2.5 s; failed lookups are remembered for 15 minutes and calls are rate-limited to 40/min so a wave of new addresses cannot stall scoring or exhaust the provider.
- Assessments run at most six at a time; channel/notification config and dashboard stats are memoised for 30 s; the customer-history queries no longer wrap the email in
LOWER()so the index is used. - One pooled SMTP transport with 10 s connect / 25 s send deadlines; admin and customer emails are sent after the case row is written, off the assessment path.
- Audit-log pruning runs in 5,000-row chunks; feed downloads are buffered as bytes.
v0.19.0
Added
- Reject really cancels. Rejecting a review case now cancels the order through Vendure's
OrderService.cancelOrder(state machine, order history and everyOrderStateTransitionEventsubscriber see it), voids Authorized payments (card holds, bank transfers) and refunds every settled payment in full through the payment handler'screateRefund. Previously onlyorder.activewas cleared, so a rejected order was still fulfilled by hosts gating on open cases alone. New plugin optionscancelOnRejectandrefundOnReject(both default true);POST /fraud-prevention/cases/:id/rejectaccepts per-casecancel/refundoverrides and returnscancelled,orderState,refundsandwarnings. Vendure refusals never block the decision — they are reported inwarnings, the audit log, the ops alert and the admin toast. - Stripe Radar and 3-D Secure signals. The existing Stripe lookup also reads
outcome.risk_levelandpayment_method_details.card.three_d_secure:radar_risk_elevated(15),radar_risk_highest(35) andthree_ds_failed(10 — 3DS ran and the cardholder did not authenticate;attempt_acknowledged/exempted/not_supportedare benign).three_ds_failedis gated by the channel's existing 3-D Secure rule, which now does something. The Simulate tab has Radar / 3DS inputs; card-network verdicts (AVS, Radar, 3DS) are highlighted together in the review queue and the order panel. - Checkout-guard failed payments. The Failed payments from IP signal also counts
failed/client_declinedrows fromcheckout_guard_payment_event(written by@huloglobal/vendure-plugin-checkout-guardbefore any VendurePaymentrow exists) when that table is present. Detected automatically; nothing to configure. - Fulfilment gating helpers.
FraudPreventionService.isAssessed(orderId)/assessedOrderIds(ids)— true once the order guard has scored the order — close the race betweenOrderPlacedEventand the asynchronous assessment;heldOrderIds()returns pending and rejected cases.pendingOrderIds()is unchanged. - Exports:
CardChecks(AvsResultstays as an alias),RadarRiskLevel,ThreeDsResult,ResolveCaseResult,cardChecksFromStripeCharge,cardChecksFromMetadata,fetchStripeCardChecks,parseRiskLevel,parseThreeDsAuthenticated,threeDsFailed.
Changed
avsResolvermay return Radar / 3DS fields alongside the AVS ones; payment metadata readers acceptriskLevel/threeDsAuthenticated/threeDsResult(canonicalavsobject), Stripe-styleoutcome/three_d_secureobjects and flat keys.FraudPreventionServicenow injectsOrderServiceandRequestContextService(both provided byPluginCommonModule).
v0.18.4
Added
- Activity log AVS filter. The same AVS fails toggle as the review queue, next to the level and action pickers; combines with both, and the CSV export follows the filtered rows.
GET /fraud-prevention/logacceptssignal=avs.
v0.18.3
Added
- Review queue AVS filter. An AVS fails toggle next to the status filters narrows the queue to cases where the card issuer reported a postcode or street-address mismatch; it combines with pending / approved / rejected.
GET /fraud-prevention/casesacceptssignal=avs(any signal-key prefix).
v0.18.2
Changed
- Review queue & order page: card AVS verdicts are shown as red card chips, sorted first in each case's signal list, with the points in the tooltip; the order-page fraud panel highlights the same rows. The bank's verdict is the first thing a reviewer sees.
v0.18.1
Fixed
- Stripe lookup pinned to API version 2022-11-15. Without a
Stripe-Versionheader the request ran at the account's default version, and on accounts created before November 2022expand[]=latest_chargeis rejected with HTTP 400 — the lookup silently produced nothing. The GET is now pinned (read-only, so it never changes the account), and the unreachablecharges.datafallback is gone. - Multi-channel hosts: the Stripe payment method is now resolved for the order's channel, so two channels with different Stripe accounts each use their own key.
postcode_mismatchno longer fires when one postcode is a partial form of the other (5-digit ZIP vs ZIP+4, UK outward code vs full postcode).
v0.18.0
Added
- Postcode / AVS mismatch signals. Three new weighted signals:
avs_postcode_fail(35) andavs_address_fail(20) fire when the card issuer's AVS verdict on the billing postcode / street address is an explicit fail;postcode_mismatch(8) fires when the typed billing and shipping postcodes differ within the same country. AVS verdicts come from a hostavsResolveroption (any gateway), fromPayment.metadata(avs: { postalCode, line1 }, Stripe-stylechecks, or flat keys), or — for orders paid through Vendure'sStripePlugin— automatically, by fetching the PaymentIntent's latest charge with the payment method's own API key. Fails open;unavailable/uncheckednever score. - Rules → Signals: Check card AVS with Stripe toggle per channel (
avsLookup, default on). - Simulate: billing / shipping postcode and card AVS postcode / street result inputs, so the new signals can be tried against live data.
- Exports:
AvsCheck,AvsResult,avsFromMetadata,avsFromStripeCharge,fetchStripeAvs,normalisePostcode,parseAvsCheck,postcodesDiffer.
Notes
- Stripe only runs AVS when the checkout sends the billing address with the payment. The Payment Element does not collect a street address (and often no postcode) by itself, so pass the order's address in
confirmPayment→confirmParams.payment_method_data.billing_details— see README → Postcode / AVS. Wallet payments (Apple Pay, Google Pay, Link) carry no AVS checks.
Changed
AssessInputgainsbillingPostalCode,shippingPostalCodeandavs; the order guard fills them from the order's addresses andFraudPreventionService.resolveAvsForOrder().
v0.17.1
Changed
- Branding. The bundled
hulo-global-logo.svgis now the HG wordmark on the HULO black rounded square (the same mark as the huloglobal.com header), with explicit-lightand-darkvariants alongside the auto-switching default.
v0.17.0
Added
- Licence & billing card in the admin. Always visible: the current state (free tier, free trial with first-charge date, monthly/annual subscription, lifetime, or master licence) with the actions that apply — start the 14-day free trial or subscribe, buy lifetime, Manage billing (Stripe customer portal: update card, cancel, switch plan) and Upgrade to lifetime (the old subscription stops billing at the end of its paid period). Requires licence SDK ^0.14.0.
v0.16.1
Changed
- The 14-day free trial is now card-backed. Unlicensed installs run in the free tier; start the trial from the admin banner (monthly or annual → Start 14-day free trial) — Stripe collects a card, nothing is charged until day 15, cancel any time before then, one trial per customer — and the licence installs itself within a minute. The automatic no-card evaluation window is retired (licence SDK ^0.13.0).
v0.16.0
Added
- Buy licence from the admin. The evaluation / free-tier banner now has a plan picker and a Buy licence button: checkout opens in a new tab and, once payment completes, the licence installs itself — no email round-trip, no
.envedit, no restart. Renewed subscription keys are picked up automatically too. New admin endpointslicence/purchase-linkandlicence/claim-status.
Changed
- Requires
@huloglobal/vendure-licence-sdk^0.12.0. - The 7-day card trial at checkout has been retired: every install already gets the 14-day no-card evaluation, and paid plans now bill from day one.
v0.15.1
Changed
- Licence SDK ^0.11.0. Master licences (one key that activates every HULO plugin) and hardware-bound keys are now accepted by the runtime licence check.
- Branding. Refreshed HULO Global logo (inline HG monogram) in the admin UI.
v0.15.0
Added
- PostgreSQL support. All of the plugin's SQL now runs on Postgres as well as MySQL/MariaDB — the licence SDK's new dialect adapter translates queries transparently at runtime, so no configuration is needed: the plugin follows whatever database your Vendure
dbConnectionOptionsuse. Verified against PostgreSQL 17. MySQL/MariaDB installs are unaffected (byte-identical passthrough).
v0.14.1
Added
- "What's new" in the update banner. The banner now links straight to this plugin's changelog page on huloglobal.com, so you can read exactly what a release contains before updating.
v0.14.0
Added
- One-click in-app updates. The update banner now has an "Update now" button: the plugin installs the new version via your project's own package manager (yarn/npm/pnpm auto-detected), verifies it landed, and gracefully restarts under your process supervisor (pm2/systemd). Admin-only; the target version is verified against the npm registry; a failed install never restarts anything. Disable with HULO_SELF_UPDATE=off; force restart without a detected supervisor with HULO_SELF_UPDATE=force. Note: a separate worker process picks the update up on its next restart, and the admin UI itself refreshes after your next admin build.
v0.13.0
Changed
- "Off" no longer means "blind". When protection is disabled the engine still evaluates every rule and records a shadow assessment (action 'shadow', never any holds). Risky shadow-scored orders warn in the server log, fan out to the ops channels (new 'shadow.risky' event), optionally email the admin, and the order-detail panel shows a "scored while protection was off" notice — so switching protection off never silently loses the risk picture.
v0.12.0
Added
- Fraud panel on the admin order page. Every paid order's detail page now shows the risk score (/100), level, contributing signals and review-case status, colour-coded and adapted to the admin light/dark theme. Only rendered once the order has a settled payment. New GET order-assessment/:orderId admin endpoint.
v0.11.0
Added
- One-click threat-feed presets. The Custom feeds section now offers seven curated, well-known public lists (IPsum L3+, blocklist.de, FireHOL L2/L3, Emerging Threats compromised, CINS Army, StopForumSpam toxic domains) as add-with-one-click presets — no more hunting URLs. All URLs verified live at publish time; already-added feeds are hidden from the preset row.
Fixed
- Premium buttons (enforce mode, feed sync, custom feeds) were still disabled during the full-featured evaluation — gating now keys off the tier, so trial installs can use everything the server allows.
v0.10.0
Added
- In-admin licence activation. Paste your key into the plugin's admin page and it verifies (signature, plugin id, domain binding, expiry, revocation) and activates instantly — no .env edit, no redeploy. The key persists in the shared hulo_licence_store table and is re-applied on every boot; an explicitly configured env/init key always wins. POST licence/activate + licence/deactivate endpoints.
v0.9.1
Added
- Evaluation pings now include anonymous usage aggregates (counts only, never personal data) so the opt-in reminder emails can say what the plugin actually did during the trial.
v0.9.0
Added
- 14-day full-featured evaluation. Unlicensed installs now get the complete feature set for 14 days instead of the restricted free tier. Enforce mode, review-queue holds, threat feeds and alerts now also run during the evaluation window. The clock is anchored server-side (a hashed instance id — no personal data), so reinstalling does not restart it, and it fails open: if the licence server is unreachable the plugin keeps running fully. After the window the plugin drops to the free tier; all configuration is kept and reactivates instantly with a key.
- Admin-UI evaluation banner with live countdown and an optional "email me before it ends" reminder opt-in (explicit consent — no email is sent anywhere otherwise).
v0.8.0
Added
- Upload image / asset library button in the message editor — opens Vendure's asset picker (browse or upload) and inserts the image, stored in your asset library. Editor selection is saved/restored so toolbar and colour actions apply reliably after a dialog opens.
v0.7.0
Added
- Full editor toolbar for the customer messages: text + highlight colour, font size, underline/strikethrough, headings/quotes, numbered lists, indent/outdent, image insert, custom button, divider, alignment, clear-formatting and undo/redo.
Fixed
- Editor text showed grey in dark mode (admin theme colouring bare block elements). Canvas content now forces dark ink on the white paper.
v0.6.1
Fixed
- Dark mode: the customer-message editor canvas now reads as intentional white paper (framed, visible caret), and the message preview renders on white — it was showing on a dark surface, which misrepresented the email and clashed with its inline colours.
v0.6.0
Added
- Visual email editor for the customer messages (held / approved / rejected): formatting toolbar, drag-and-drop variable chips, and a Visual / HTML toggle. Message bodies are now HTML-aware — the plain-text defaults still render as before, but you can build a fully styled HTML email and it passes through untouched.
v0.5.0Security
Added
- Custom threat feeds. Add your own public blocklist URLs in the Lists tab — any line-based list (one entry per line,
#comments ignored), typed as IP / CIDR range / email / email-domain. They sync nightly alongside the built-ins and are matched identically (CIDR included), with per-feed enable/disable, on-demand sync, and last sync count / error surfaced. Licensed feature. - Endpoints:
GET/POST /fraud-prevention/feeds/custom,POST /feeds/custom/:id(edit /{sync:true}),DELETE /feeds/custom/:id.
- Security Feed fetches reject non-http(s) schemes and internal/private targets (localhost, RFC-1918, link-local) as a basic SSRF guard, and cap the response at 30 MB.
v0.4.3
Fixed
- Public
POST /fraud-prevention/checkreturned Nest's default201for a POST; it's a read-only risk check, so it now returns200.
Added
- End-to-end test suite (
@vendure/testing, real MariaDB dialect): admin auth gating, public-check shape + rate limiting, and the assessment engine (disposable email, order value, returning-customer trust credit, blocklist incl. CIDR ranges, allowlist bypass, unlicensed enforce downgrade). 11 e2e tests.
v0.4.2
Fixed
- Webhook integration row showed nothing, Telegram row was wrong. A regex repair back in 0.3.3 over-matched and deleted the Telegram chat-ID field and the entire Webhook case, leaving the Telegram row bound to the webhook secret. Both integration rows are restored: Telegram (bot token + chat ID) and Webhook (URL + signing secret).
Added
- Customer messages: multi-select + bulk reset. Each of the three templates (held / approved / rejected) shows a default / customised badge; tick any combination and "Reset selected to default", or "Reset all to default" in one click. Per-template reset stays.
v0.4.1
Fixed
- Review queue froze the browser tab ("page unresponsive") when toggling the per-case "email customer" / "blocklist" checkboxes. The checkboxes bound to method calls (
[ngModel]="caseNotify(id)") which Angular re-evaluated every change-detection pass. The per-case ticks are now seeded from the global defaults when cases load and bound to plain state. The Settings integrations list likewise iterates a stable array instead of one rebuilt each cycle.
v0.4.0
Added
- Silent resolution. Approve and Reject each carry a per-case "email customer" tick — untick to resolve without telling the customer anything. Defaults follow the global settings.
- Silent identity blocklist on reject. A per-case "blocklist" tick (and a global default) quietly adds the rejected email + canonical + IP to the blocklist, so a fraudster is turned away next time and never learns why — the classic don't-tip-them-off move.
- Global notification defaults: email-on-approval, email-on-rejection and blocklist-on-reject are all channel-wide toggles in Settings; the per-case ticks pre-fill from them and override for the single case.
v0.3.3
Fixed
- 0.3.2's
@escape was corrupted by the release tooling (sed&back-reference) and still shipped a bare@— admin builds kept failing. Repaired and verified: no bare@remains in any template text node.
v0.3.2
Fixed
- Admin UI failed to compile under Angular 17+ block syntax: the literal
@BotFatherin the Telegram help text is now the@entity.
Changed
- New logo: shield + amber pulse trace (live risk monitoring), also used in the admin hero.
v0.3.1
Changed
- Rules tab simplified. New Protection level presets — Relaxed / Balanced (recommended) / Strict — set thresholds and velocity limits in one click; every numeric field now lives behind an Advanced settings toggle. Editing any value flips the level to Custom.
- Notifications redesigned as an integrations list: one row per channel (Email, Slack, Discord, Teams, Telegram, Webhook) with a connected-status dot, expanding in place to its few fields — instead of seven URL inputs spread across the page.
v0.3.0
Added
- Ops notification fan-out: Slack, Discord, Microsoft Teams, Telegram (bot token + chat id) and a generic signed webhook (JSON POST, HMAC-SHA256 in
X-Hulo-Signature) — every held, approved, rejected and auto-released case pings all configured channels. Each transport fails independently. - Customisable customer messages, per channel: the three gating outcomes (held / approved / rejected) are now editable templates with
{{orderCode}},{{firstName}},{{supportEmail}}and{{reviewHours}}variables, live preview and one-click reset. Bodies are plain text (blank lines = paragraphs) so tone is editable without HTML foot-guns. Defaults rewritten to be honest without being alarming — a held order is "a quick security check", never an accusation, and a rejection includes a human-appeal path. - Hold-notice policy per channel: tell the customer never / only at block level (default) / on every held order; plus a configurable
reviewHourspromise surfaced in the templates. - Auto-released cases now email the customer with the approved template and post an ops event.
v0.2.0
Added
- IP intelligence (ip-api.com, cached 30 days in
fraud_ip_intel, fails open): VPN/proxy and datacentre-IP signals — theblockVpnProxytoggle finally does something — plus IP vs billing-country mismatch. - Email MX validation: a domain that can't receive mail can't receive licence keys either. Authoritative NXDOMAIN/no-MX scores; DNS timeouts fail open. 24h in-memory cache.
- Identity fan-out: ≥3 distinct customer emails ordering from one IP inside 24h — the classic card-testing pattern.
- Customer trust credit: returning customers earn NEGATIVE points (−12 for 1–2 settled orders, −25 for 3+), counted by canonical email so plus-tag variants share one track record. Score floors at 0. High-value first orders still score as before.
- Gibberish-email heuristic (digit-heavy or keyboard-mash local parts; deliberately low-weight) and billing/shipping country mismatch signal.
- Customer Lookup tab: full dossier per email — orders, lifetime value, settled/cancelled split, failed payments, prior cases, assessment history, list status, one-click allow/block.
- Slack alerts: optional webhook pinged on every held order.
- Auto-release timer (per channel, default off): pending cases older than N hours auto-approve so held orders don't strand over a weekend.
- CSV export of the activity log.
v0.1.0Security
First release as a standalone plugin — a full rebuild of the fraud tooling that previously lived inside the HULO host project, with the piece that implementation never had: real enforcement.
Added
- Server-side order guard. Every
OrderPlacedEventis assessed — the old/checkendpoint required the storefront to call it, and nothing did. - Signal-based scoring engine with per-channel weights: velocity (IP/hour, IP/day, email/day, email daily value), order value, disposable emails, block/allow lists, high-risk countries, failed payments, plus-addressing detection (emails canonicalised before velocity counting), first-order-high-value.
- CIDR range matching. Spamhaus DROP and FireHOL ship ranges; the old implementation stored them but never matched them. Prefix-filtered SQL + exact
ipInCidrverification (unit-tested). - Enforcement modes per channel: off / monitor / enforce, with separate review and block thresholds and a plain-English status sentence.
- Review queue workflow. Pending cases hold fulfilment (host hook:
pendingOrderIds()); approve releases + emails the customer, reject cancels + emails. All decisions audited. - Multi-tab admin dashboard on the verified HULO admin design system (WCAG AA both themes): Overview (KPIs, daily chart, top IPs with one-click block), Rules, Review queue (count badge), Lists (manual + feeds), Simulate (full signal breakdown, dry-run), Activity (filterable audit log), Settings (notifications).
- Licensing via the HULO licence SDK: free tier = monitor + manual lists + simulate; enforce, feed sync and alerts require a licence. Update banner + heartbeat as across the HULO suite.
- Retention: audit log pruned nightly (default 180 days).
Changed
- Table names are inherited from the pre-plugin implementation (
fraud_config,fraud_log,fraud_blocked_orders,fraud_blocklist,fraud_whitelist,fraud_notification_config) — upgrading preserves all live data; new columns are added automatically.
- Security Admin REST surface now requires an authenticated admin session (
ReadCatalog/UpdateCatalog) — previously these endpoints were mounted without any auth guard. The public/checkendpoint is rate-limited and returns a minimal shape (no signal internals to probe).
Ready to ship?
Install in five minutes, run the trial on real traffic, keep it if it earns its place.