Skip to navigation Skip to main content
Free on WordPress.org 4.9 / 5 WordPress.org Explore both Plugins
Free on WordPress.org 4.9 / 5 WordPress.org Explore both Plugins
  • WordPress
    Products
    Smart Cycle DiscountsDiscount automation › TrustLensCustomer trust intel › Cycle AI AIPlain-English campaigns ›
    New pluginComing soon
    Resources & toolsDocs, pricing, support ›
    Smart Cycle Discounts

    Smart Cycle Discounts

    Automate WooCommerce discount campaigns — schedule, target, and measure.

    62%
    Free Pro $59 5 discount types Recurring
    Jump into the page
    How it works Capabilities Promo codes Pricing
    Docs
    Getting started Discount types Scheduling
    Explore Smart Cycle Discounts → Changelog
    TrustLens

    TrustLens

    Customer trust intelligence — score buyers, spot abuse, protect revenue.

    Trust 86
    Free Pro $79 6 segments Abuse detection
    Jump into the page
    How it works Detection Outcomes Pricing
    Docs
    Trust scoring Detection modules Card-testing defense
    Explore TrustLens → Verify a report Changelog

    Cycle AI inside Smart Cycle Discounts

    Describe a sale in plain English — Cycle AI builds the whole campaign.

    “20% off hoodies this weekend”
    Included in Pro Natural language Catalog-aware
    See it work

    Type a sentence, get a ready-to-launch discount campaign that already understands your products, prices, and schedule.

    Live demo How it works
    Meet Cycle AI →

    A new plugin Coming soon

    Something is loading in the lab. Join the list to get the reveal first.

    Notify me on launch →

    Resources & tools

    Everything around the plugins — docs, free tools, and help.

    Learn
    Documentation Pricing & bundle Support
    Free tools
    Discount Calculator Sale Calendar
    Stay current
    SCD changelog TrustLens changelog
    Compare all plans →
    Secure checkout WordPress.org 14-day refund View pricing →
  • Affiliate
    Program
    OverviewHow the program works How it works4 steps from apply to earn Commission details30% · 60-day cookie · recurring
    Get started
    Apply nowOpen Takes ~2 minutes Earnings calculatorEstimate your monthly income FAQPayouts, cookies, renewals
    Resources
    Brand kitLogos, banners, copy, social PlaybookTactics that actually convert FTC disclosureHow to disclose properly Affiliate termsFull program agreement Contact teamOpen the contact form
    Earn 30% recurring on every saleFree to join · 60-day cookie · monthly PayPal payouts Apply now
  • Blog
  • DOCS
    Docs & resources

    Guides, references, and answers for every Webstepper plugin.

    Smart Cycle DiscountsAutomated WooCommerce discount campaigns
    Getting started› Discount types› Cycle AI›
    TrustLensCustomer trust & fraud intelligence
    Trust scoring› Detection modules› Card-testing defense›
    Docs home Guides FAQ Pricing Support
    WordPress tools that solve real problems
  • Contact Us
  • About
    Company

    Our Story

    Founded 2020

    Built by store owners, for store owners. We make WordPress tools that solve real problems.

    Learn more
    Built from experienceTools we use ourselves
    Time is preciousSimple, intuitive UX
    Real supportTalk to the founders
    Legal & contact
    Contact us Privacy policy Terms of service Refund policy
    14-day money-backNo questions asked
Popular requests
  • smart cycle discounts
  • trustlens
  • chargeback protection
GET STARTED

Glossary

1
  • TrustLens Glossary

Detection Modules

9
  • Card Testing Defense
  • Chargeback Tracking
  • Shipping Anomalies
  • Linked Accounts Detection
  • Category Aware Risk
  • Coupon Abuse Detection
  • Order Pattern Analysis
  • Return Abuse Detection
  • Modules Overview

Card Testing Defense

9
  • Attack History
  • Allowlists
  • Geo Diversity
  • Auto Escalation
  • Fingerprinting
  • VIP Bypass
  • Panic Button
  • Velocity Thresholds
  • Overview

Chargeback Monitor

7
  • Ratio Email Alerts
  • Dispute Evidence Report
  • Chargeback Monitor
  • Manual Dispute Entry
  • Stripe WooPayments Ingestion
  • Card Network Thresholds
  • Chargeback Ratio Speedometer

Customer Management

7
  • Admin Notes
  • Checkout Enforcement
  • Order Trust Column
  • Bulk Actions
  • Blocking and Allowlisting
  • Customer Detail Profile
  • Customer List

Automation

7
  • Async Dispatch Retries
  • Webhooks and HMAC
  • Rule Inspector
  • Actions Reference
  • Conditions Reference
  • Triggers Reference
  • Automation Overview

Trust Scoring

5
  • Account Age Loyalty Bonus
  • Signals Explained
  • Six Customer Segments
  • The 0–100 Score
  • How Trust Scoring Works
View Categories
  • Home
  • Docs
  • Trustlens
  • Developer Documentation
  • Webhook Payloads

Webhook Payloads

5 min read

TrustLens delivers JSON payloads over two separate webhook paths, and they do not share a payload shape. This page documents the exact body and headers each one sends so receivers can be implemented against the real contract.

  • Global webhook endpoints (Settings → Webhooks) — fire on a fixed set of customer/order lifecycle events. Flat payload, one shape per event.
  • Automation-rule webhooks (the send_webhook action on a Pro automation rule) — fire whenever a rule with that action matches. Every one of these carries the same trustlens_automation envelope regardless of which trigger fired it.

Global Webhook Events #

Global endpoints emit exactly these event strings (the value of the top-level event field and the X-TrustLens-Event header):

Event Fires when
score_updated A customer’s trust score is recalculated
customer_blocked A customer is blocked
customer_unblocked A block is removed
customer_allowlisted A customer is allowlisted
customer_allowlist_removed An allowlist entry is removed
checkout_blocked A checkout is blocked by enforcement
high_risk_order An order is placed by a customer in the risk or critical segment
automation_triggered A Pro automation rule fires (one event per matched rule)

Each endpoint can subscribe to a subset of these; the global “Events to Send” setting controls which fire by default (score_updated, customer_blocked, checkout_blocked, high_risk_order out of the box).


Global Webhook Envelope #

Global payloads are flat — there is no nested data wrapper. Every global payload has at minimum:

{
  "event": "score_updated",
  "timestamp": "2024-03-15T12:00:00+00:00",
  "customer": { ... },
  "site": {
    "url": "https://store.example.com",
    "name": "Example Store"
  }
}
Field Description
event Event ID (one of the strings in the table above)
timestamp ISO 8601 string (current_time('c')) at dispatch
customer Customer object (see below); empty object if the customer record can’t be resolved
site Origin store URL and name, added to every global payload

Individual events add their own fields alongside these — documented per-event below.

Headers (global) #

  • Content-Type: application/json
  • X-TrustLens-Event — the event ID
  • X-TrustLens-Delivery — a UUID, unique per delivery attempt
  • X-TrustLens-Webhook-ID — the configured endpoint’s ID
  • X-TrustLens-Timestamp — Unix epoch at dispatch
  • X-TrustLens-Signature — present only when the endpoint has a secret; format sha256=hex...

Signature note: the HMAC-SHA256 is computed over timestamp + "." + raw_body (not the body alone), so receivers should reconstruct the signing string from the X-TrustLens-Timestamp header value and the raw request body. Signing the timestamp lets you reject replays by checking the timestamp is recent (a 5-minute window is recommended).


Customer Object #

The customer object on global events contains:

"customer": {
  "email_hash": "...",
  "email": "...",
  "trust_score": 47,
  "segment": "caution",
  "total_orders": 12,
  "total_refunds": 3,
  "return_rate": 25.0,
  "is_blocked": false,
  "is_allowlisted": false
}

Per-Event Payloads (Global) #

score_updated #

{
  "event": "score_updated",
  "timestamp": "...",
  "customer": { ... },
  "new_score": 47,
  "new_segment": "caution",
  "site": { ... }
}

customer_blocked #

{
  "event": "customer_blocked",
  "timestamp": "...",
  "customer": { ... },
  "reason": "Manual block by admin",
  "site": { ... }
}

customer_unblocked / customer_allowlisted / customer_allowlist_removed #

{
  "event": "customer_unblocked",
  "timestamp": "...",
  "customer": { ... },
  "site": { ... }
}

These three carry only the standard envelope plus the customer object — no extra event-specific fields.

checkout_blocked #

{
  "event": "checkout_blocked",
  "timestamp": "...",
  "customer": { ... },
  "email": "[email protected]",
  "site": { ... }
}

automation_triggered #

{
  "event": "automation_triggered",
  "timestamp": "...",
  "customer": { ... },
  "rule": {
    "id": 42,
    "name": "Block critical at checkout",
    "trigger": "checkout_blocked"
  },
  "action": "block_customer",
  "order_id": 5432,
  "site": { ... }
}

order_id is null when the action wasn’t tied to an order.

high_risk_order #

{
  "event": "high_risk_order",
  "timestamp": "...",
  "customer": { ... },
  "order": {
    "id": 5432,
    "number": "5432",
    "total": 159.99,
    "currency": "USD",
    "status": "processing"
  },
  "site": { ... }
}

Only sent when the ordering customer is in the risk or critical segment; orders from healthier segments never fire this event.


Automation-Rule Webhooks #

The send_webhook action on a Pro automation rule posts a single, fixed envelope. The event is always trustlens_automation — the specific trigger that fired the rule is carried in the trigger field, not in event. There is no per-trigger payload variation and no nested data wrapper.

{
  "event": "trustlens_automation",
  "rule": "Block critical at checkout",
  "rule_id": "42",
  "trigger": "checkout_blocked",
  "email_hash": "...",
  "trust_score": 18,
  "segment": "critical",
  "fired_at": "2024-03-15 12:00:00",
  "attempt": 1
}
Field Description
event Always the literal trustlens_automation
rule, rule_id Name and ID of the rule whose send_webhook action fired
trigger The automation trigger key that matched (e.g. checkout_blocked, score_updated, chargeback_filed)
email_hash Target customer’s email hash
trust_score, segment Current score/segment at fire time; null if the customer can’t be resolved
fired_at Local MySQL datetime at dispatch
attempt 1 on first try; increments on each retry

Headers (automation) #

  • Content-Type: application/json
  • X-TrustLens-Event: trustlens_automation
  • X-TrustLens-Delivery — a UUID per attempt
  • X-TrustLens-Rule-ID — the rule ID
  • X-TrustLens-Timestamp — Unix epoch at dispatch
  • X-TrustLens-Signature — sha256=hex..., signed by default with the per-install automation secret (overridable via the trustlens/automation/webhook_secret filter)

Automation webhooks are dispatched blocking with up to 3 retries on non-2xx (60s / 120s / 240s backoff). See Async Dispatch & Retries for the full retry model.


Field Type Notes #

  • Timestamps: global payloads use an ISO 8601 string in timestamp; automation payloads use a local MySQL datetime in fired_at; both signature schemes use the Unix epoch from the X-TrustLens-Timestamp header.
  • Monetary amounts: decimal numbers (not strings).
  • Hashes: lowercase hex email hashes.
  • Enums: lowercase strings matching the database/segment values.

Backward Compatibility #

Receivers should:

  • Ignore unknown fields (forward-compatible)
  • Not depend on field order (JSON objects are unordered)
  • Handle missing fields gracefully (e.g. an empty customer object when the record can’t be resolved)

Breaking changes to payloads are rare and announced in the changelog. Minor additions happen routinely.


Testing #

For testing receivers without waiting for real events, use the “Send Test Webhook” feature in Settings → Webhooks. It dispatches a payload with event: "test" and the standard headers so you can verify your receiver’s parsing and signature verification end to end.

Updated on June 18, 2026

What are your Feelings

  • Happy
  • Normal
  • Sad

Share This Article :

  • Facebook
  • X
  • LinkedIn
  • Pinterest
Extending with Custom ModulesDatabase Schema
Table of Contents
  • Global Webhook Events
  • Global Webhook Envelope
    • Headers (global)
  • Customer Object
  • Per-Event Payloads (Global)
    • score_updated
    • customer_blocked
    • customer_unblocked / customer_allowlisted / customer_allowlist_removed
    • checkout_blocked
    • automation_triggered
    • high_risk_order
  • Automation-Rule Webhooks
    • Headers (automation)
  • Field Type Notes
  • Backward Compatibility
  • Testing
Newsletter

Insights that grow your business

Join thousands of WooCommerce store owners who get actionable tips, plugin updates, and industry news every week — plus 10% off either of our plugins as a welcome.

We respect your privacy. Unsubscribe at any time.

10% off welcome gift — A code for either plugin, on us
Weekly updates — Fresh content every Tuesday
Exclusive content — Tips you won't find on our blog
Early access — Be first to know about new plugins
Webstepper
Weekly WooCommerce Tips
Just now
This week: 5 proven strategies to boost your average order value using smart discount campaigns...
10% off inside
Webstepper

Tools for store owners who'd rather grow than grind.

Simple, powerful plugins that help WooCommerce store owners sell more — without the learning curve.

Products

  • Smart Cycle Discounts
  • TrustLens
  • Discount Calculator
  • Sale Calendar

Company

  • About Us
  • Blog
  • Contact
  • Affiliates
  • Log In

Resources

  • Help Center
  • Guides
  • Verify a report
  • Affiliate Program
  • Become a Partner

Questions? We actually answer.

Real humans, real help. No bots, no runaround. Usually within a few hours.

Get in touch
Operated by Setmood LLC · 7901 4th St N, St Petersburg, FL 33702 · United States

© 2026 Webstepper. All rights reserved.

Privacy Terms Refunds
Visa Mastercard PayPal Apple Pay Google Pay & more
Limited Time Offer

Get 10% off
Smart Cycle Discounts or TrustLens

Drop your email and we’ll send you a unique, single-use code — works on either plugin at checkout. New customers, first payment.

23 hours
:
59 minutes
:
59 seconds

No spam. Unsubscribe anytime.

  • WordPress
    Back
    Products
    Smart Cycle DiscountsDiscount automation › TrustLensCustomer trust intel › Cycle AI AIPlain-English campaigns ›
    New pluginComing soon
    Resources & toolsDocs, pricing, support ›
    Smart Cycle Discounts

    Smart Cycle Discounts

    Automate WooCommerce discount campaigns — schedule, target, and measure.

    62%
    Free Pro $59 5 discount types Recurring
    Jump into the page
    How it works Capabilities Promo codes Pricing
    Docs
    Getting started Discount types Scheduling
    Explore Smart Cycle Discounts → Changelog
    TrustLens

    TrustLens

    Customer trust intelligence — score buyers, spot abuse, protect revenue.

    Trust 86
    Free Pro $79 6 segments Abuse detection
    Jump into the page
    How it works Detection Outcomes Pricing
    Docs
    Trust scoring Detection modules Card-testing defense
    Explore TrustLens → Verify a report Changelog

    Cycle AI inside Smart Cycle Discounts

    Describe a sale in plain English — Cycle AI builds the whole campaign.

    “20% off hoodies this weekend”
    Included in Pro Natural language Catalog-aware
    See it work

    Type a sentence, get a ready-to-launch discount campaign that already understands your products, prices, and schedule.

    Live demo How it works
    Meet Cycle AI →

    A new plugin Coming soon

    Something is loading in the lab. Join the list to get the reveal first.

    Notify me on launch →

    Resources & tools

    Everything around the plugins — docs, free tools, and help.

    Learn
    Documentation Pricing & bundle Support
    Free tools
    Discount Calculator Sale Calendar
    Stay current
    SCD changelog TrustLens changelog
    Compare all plans →
    Secure checkout WordPress.org 14-day refund View pricing →
  • Affiliate
    Back
    Program
    OverviewHow the program works How it works4 steps from apply to earn Commission details30% · 60-day cookie · recurring
    Get started
    Apply nowOpen Takes ~2 minutes Earnings calculatorEstimate your monthly income FAQPayouts, cookies, renewals
    Resources
    Brand kitLogos, banners, copy, social PlaybookTactics that actually convert FTC disclosureHow to disclose properly Affiliate termsFull program agreement Contact teamOpen the contact form
    Earn 30% recurring on every saleFree to join · 60-day cookie · monthly PayPal payouts Apply now
  • Blog
  • DOCS
    Back
    Docs & resources

    Guides, references, and answers for every Webstepper plugin.

    Smart Cycle DiscountsAutomated WooCommerce discount campaigns
    Getting started› Discount types› Cycle AI›
    TrustLensCustomer trust & fraud intelligence
    Trust scoring› Detection modules› Card-testing defense›
    Docs home Guides FAQ Pricing Support
    WordPress tools that solve real problems
  • Contact Us
  • About
    Back
    Company

    Our Story

    Founded 2020

    Built by store owners, for store owners. We make WordPress tools that solve real problems.

    Learn more
    Built from experienceTools we use ourselves
    Time is preciousSimple, intuitive UX
    Real supportTalk to the founders
    Legal & contact
    Contact us Privacy policy Terms of service Refund policy
    14-day money-backNo questions asked
We use cookies to improve your experience on our website. By browsing this website, you agree to our use of cookies.
More info More info Accept