Skip to navigation Skip to main content
Free on WordPress.org 4.9 · 13 reviews WordPress.org Explore both Plugins
Free on WordPress.org 4.9 · 13 reviews WordPress.org Explore both Plugins
  • WordPress
    WordPress Plugins
    View all
    Smart Cycle Discounts logo

    Smart Cycle Discounts

    Automate discount campaigns with scheduling, analytics, and smart product targeting.

    7 Discount Types Cycle AI
    Free Pro from $59
    TrustLens logo

    TrustLens

    Customer trust intelligence for WooCommerce. Score customers, spot abuse, protect revenue.

    Trust Scores Abuse Detection
    Free Pro from $79

    New Plugin

    Coming Soon

    Something exciting is in the works. Join the waitlist to be first to know.

    Get Notified
    Notify Me
    Secure Checkout
    WordPress.org
    14-Day Refund
    Resources
    Documentation Guides & tutorials
    Discount Calculator Plan your strategy
    Support Get help
    SCD Changelog Discount plugin updates
    TrustLens Changelog Trust intelligence updates
    Get notified on new releases
  • Affiliate
    Program
    Overview How the program works
    How It Works 4 steps from apply to earn
    Commission Details 30% · 60-day cookie · recurring
    Get Started
    Apply Now Open
    Takes ~2 minutes
    Earnings Calculator Estimate your monthly income
    FAQ Payouts, cookies, renewals
    Resources
    Brand Kit Logos, banners, copy, social
    Playbook Tactics that actually convert
    FTC Disclosure How to disclose properly
    Affiliate Terms Full program agreement
    Contact Team Open the contact form
    Earn 30% recurring on every sale Free to join · 60-day cookie · monthly PayPal payouts
    Apply Now
  • Blog
  • DOCS
    Docs & Resources

    Guides, references, and answers for every Webstepper plugin.

    Smart Cycle Discounts Automated WooCommerce discount campaigns
    Getting started › Discount types › Cycle AI ›
    TrustLens Customer 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 create WordPress tools that solve real problems.

    Learn more
    Built from Experience Real solutions we use ourselves
    Time is Precious Simple, intuitive tools
    Real Support Talk to the founders
    Legal & Contact
    Contact Us Privacy Policy Terms of Service Refund Policy
    14-Day Money-Back Guarantee No 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
  • Setting Configuration
  • API and Webhooks

API and Webhooks

3 min read

The API and Webhooks settings tab configures TrustLens’s REST API access and outgoing webhook delivery. The REST API exposes customer scores, signals, and segment data for integration with external systems. Outgoing webhooks let TrustLens push events to your CRM, helpdesk, or custom internal tools. This page covers settings on the tab; for the full API surface, see the developer documentation.

Location: TrustLens → Settings → API (and Settings → Webhooks).


REST API Access #

REST API Enabled #

Default: On

Master toggle for the TrustLens REST API. When off, all /wp-json/trustlens/v1/* endpoints return 404.

Authentication Methods #

TrustLens accepts two authentication mechanisms:

  1. WordPress user authentication. Any authenticated user with the manage_woocommerce capability. Commonly implemented via WordPress application passwords in HTTP Basic Auth.
  2. TrustLens API Key. A static key sent in the X-TrustLens-API-Key header. The key is stored as a SHA-256 hash in the trustlens_api_key option and compared with timing-safe hash_equals().

Generate or rotate the API key in Settings → API → API Key. The key is shown once at generation and masked thereafter.


Rate Limiting #

The plugin does not enforce application-level rate limits on REST API requests. If you need rate limiting for your deployment, apply it at the web server (nginx, Apache), reverse proxy (Cloudflare, CDN), or WAF layer.

This is a deliberate design choice — rate limiting at the application layer is duplicative with infrastructure-level controls that most production WordPress deployments already have, and it adds latency to every request.


Endpoints Available #

The 8 REST endpoints (all under /wp-json/trustlens/v1/):

Endpoint Method Description
/customers GET List customers with filtering and pagination
/customers/lookup GET Look up a customer by raw email
/customers/{hash} GET Get full customer record
/customers/{hash} POST/PUT/PATCH Update mutable state (is_blocked, is_allowlisted, admin_notes, tags)
/customers/{hash}/events GET List events from the customer timeline
/customers/{hash}/recalculate POST Trigger immediate score recalculation
/stats GET Store-wide aggregate statistics
/stats/segments GET Segment distribution counts

All endpoints require authentication. There are no separate /block, /allowlist, or /disputes endpoints — block and allowlist state are set via PATCH on the customer record, and dispute data is exposed via the customer record’s stat columns and events.

See REST API Reference for full request/response schemas.


Outgoing Webhook Settings #

Global Webhook URL (Pro) #

If set, all TrustLens events fire to this URL in addition to any per-automation-rule webhooks. Useful for sending a firehose of events to a central event-collection system.

Global Webhook Secret (Pro) #

HMAC-SHA256 signing key for the global webhook. Auto-generated.

Webhook Timeout #

Default: 10 seconds

How long to wait for webhook receivers to respond before considering the delivery failed.

Webhook Retry Policy #

Default: 3 retries with 60/120/240 second backoff

See Async Dispatch & Retries for the full retry model.


Webhook Event Subscription (Pro) #

For the global webhook, you can subscribe to specific event types rather than receiving all events. The subscribable events are:

  • score_updated — a customer’s trust score changed
  • customer_blocked — a customer was blocked
  • customer_unblocked — a block was removed
  • customer_allowlisted — a customer was allowlisted
  • customer_allowlist_removed — an allowlist entry was removed
  • checkout_blocked — a checkout was blocked by enforcement
  • high_risk_order — an order was placed by a high-risk customer
  • automation_triggered — a Pro automation rule fired

Custom Headers (Pro) #

Add custom HTTP headers to all outgoing webhooks. Useful for:

  • Routing to specific destinations on a multi-tenant receiver
  • Authentication tokens for receivers that require them in addition to HMAC
  • Versioning headers

Headers are sent on every webhook from this TrustLens instance.


Testing #

Send Test Webhook #

Button to fire a synthetic test event to the configured global webhook URL. Useful for verifying the receiver is reachable, the secret is correct, and the payload format is what you expect.

Test API Endpoint #

Inline tool that lets you make a sample API request directly from the settings page and see the response. Useful for verifying authentication is working before pointing a real integration at it.


API Logs #

The Activity Log tab shows recent API requests:

  • Timestamp
  • Authenticated user
  • Endpoint
  • Response status
  • Response time

Useful for confirming API integrations are running correctly, spotting unexpected request patterns, and debugging authentication issues.


Webhook Logs #

Similarly, the Webhook Activity Log shows recent outgoing webhook deliveries with attempt status, retry counts, and receiver responses. See Webhooks and HMAC for the receiver-side implementation.


Security Considerations #

  • API access is admin-level. Don’t expose API credentials to untrusted parties. Use scoped API keys (Pro) for partner integrations.
  • Webhook URLs should be HTTPS. TrustLens warns when configuring HTTP-only webhook URLs.
  • HMAC secrets are stored encrypted at rest. They’re shown only at creation time; thereafter masked.
  • Rate limits protect against abuse. Lower them if you’re seeing suspicious traffic.

Common Integration Patterns #

  • Read customer score from CRM: CRM pulls /customers/{hash} when displaying a customer record
  • Sync customer state to data warehouse: Subscribe to score_changed webhooks; insert into warehouse table
  • Help desk integration: Helpdesk app calls /customers/{hash} when an agent opens a ticket from a customer
  • Custom fraud rule engine: External service consumes TrustLens webhooks, applies its own logic, then PATCHes /customers/{hash} with is_blocked: true if needed
Updated on June 18, 2026

What are your Feelings

  • Happy
  • Normal
  • Sad

Share This Article :

  • Facebook
  • X
  • LinkedIn
  • Pinterest
Data and PrivacyReports Settings
Table of Contents
  • REST API Access
    • REST API Enabled
    • Authentication Methods
  • Rate Limiting
  • Endpoints Available
  • Outgoing Webhook Settings
    • Global Webhook URL (Pro)
    • Global Webhook Secret (Pro)
    • Webhook Timeout
    • Webhook Retry Policy
  • Webhook Event Subscription (Pro)
  • Custom Headers (Pro)
  • Testing
    • Send Test Webhook
    • Test API Endpoint
  • API Logs
  • Webhook Logs
  • Security Considerations
  • Common Integration Patterns
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

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
    WordPress Plugins
    View all
    Smart Cycle Discounts logo

    Smart Cycle Discounts

    Automate discount campaigns with scheduling, analytics, and smart product targeting.

    7 Discount Types Cycle AI
    Free Pro from $59
    TrustLens logo

    TrustLens

    Customer trust intelligence for WooCommerce. Score customers, spot abuse, protect revenue.

    Trust Scores Abuse Detection
    Free Pro from $79

    New Plugin

    Coming Soon

    Something exciting is in the works. Join the waitlist to be first to know.

    Get Notified
    Notify Me
    Secure Checkout
    WordPress.org
    14-Day Refund
    Resources
    Documentation Guides & tutorials
    Discount Calculator Plan your strategy
    Support Get help
    SCD Changelog Discount plugin updates
    TrustLens Changelog Trust intelligence updates
    Get notified on new releases
  • Affiliate
    Back
    Program
    Overview How the program works
    How It Works 4 steps from apply to earn
    Commission Details 30% · 60-day cookie · recurring
    Get Started
    Apply Now Open
    Takes ~2 minutes
    Earnings Calculator Estimate your monthly income
    FAQ Payouts, cookies, renewals
    Resources
    Brand Kit Logos, banners, copy, social
    Playbook Tactics that actually convert
    FTC Disclosure How to disclose properly
    Affiliate Terms Full program agreement
    Contact Team Open the contact form
    Earn 30% recurring on every sale Free 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 Discounts Automated WooCommerce discount campaigns
    Getting started › Discount types › Cycle AI ›
    TrustLens Customer 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 create WordPress tools that solve real problems.

    Learn more
    Built from Experience Real solutions we use ourselves
    Time is Precious Simple, intuitive tools
    Real Support Talk to the founders
    Legal & Contact
    Contact Us Privacy Policy Terms of Service Refund Policy
    14-Day Money-Back Guarantee No 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