Stripe Fraud Signal Triage
When Stripe Radar flags a charge as high-risk (or a review event fires), the flow gathers customer and order history from Dataverse, scores the risk, posts a triage card to a fraud Teams channel, and on decision approves or refunds/blocks via Stripe. Brings human-in-the-loop review to Stripe fraud signals.
Provided as-is, without warranty of any kind. Review and test each pattern in a non-production environment before deploying it to live automations. See our Terms.
Overview
This flow brings human-in-the-loop review to Stripe fraud signals. It polls Stripe for new charges, and whenever Stripe Radar flags one as elevated or highest risk it enriches the charge with the customer's order history from Dataverse, derives a numeric risk score, and decides: charges at/above an auto-block threshold are refunded automatically, while the rest are routed to a fraud analyst via an Approvals card rendered in Teams. Every decision (auto-block, reviewer block, or approve) is written to a Dataverse decision log, and the fraud Teams channel is notified at each step.
Why it matters: Auto-blocking every flagged charge loses good customers; ignoring risk loses money. A fast, context-rich triage balances fraud loss against customer experience.
Build status: Built via API-first deployment (workflow-table clientdata). Ships Off. Flow Checker: 0 errors / 0 warnings. To go live: authorize the four connections, set the flowlibs_Stripe*, flowlibs_Teams*, and flowlibs_FraudReviewer environment variable values, and turn the flow on.
Use Case
A payments / finance team wants Stripe Radar-flagged charges triaged quickly with full customer context, with a clear audit trail and a configurable line between automated blocking and human judgment.
Flow Architecture
When a new Stripe charge is created
Stripe OnNewCharge (polling every 5 min, splitOn)Fires per new Stripe charge; exposes outcome/risk_level from Radar.
Init config variables
Initialize VariableLoad Auto Block Score, History Table, Teams Group/Channel Id, Stripe Api Key/Base, and Fraud Reviewer from environment variables.
Init Correlation Id
Initialize Variable@guid() stamped on the decision-log row for end-to-end tracing.
Compose Risk Level
Composecoalesce(outcome/risk_level, 'not_assessed').
Compose Risk Score
ComposeMaps the Radar level to a 0-100 number (highest = 95, elevated = 65, else 15).
Compose Charge Amount
ComposeConverts the Stripe cents amount to a major-unit decimal.
Charge Is Flagged
ConditionTrue when risk level is elevated or highest. If flagged: gather Dataverse customer history, then auto-block above threshold (HTTP refund + log + Teams) or route to human review via Approvals card in Teams, log the decision, and notify. If not flagged: Compose Skipped, no action.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_AutoBlockScore | String | 90 | Risk-score cutoff at/above which a flagged charge is auto-refunded without human review. |
| flowlibs_HistoryTable | String | flowlibs_orders | Dataverse entity set name used for the customer/order history lookup. |
| flowlibs_FraudChannel | String | Fraud Triage | Display name of the fraud triage channel (documentation/reference). |
| flowlibs_StripeApiKey | String | REPLACE_WITH_STRIPE_SECRET_KEY | Stripe secret key (refund/review write) for the built-in HTTP refund call. |
| flowlibs_StripeApiBase | String | https://api.stripe.com/v1 | Stripe REST base URL. |
| flowlibs_FraudReviewer | String | REPLACE_WITH_REVIEWER_EMAIL | Email of the analyst assigned the human-in-the-loop approval. |
| flowlibs_TeamsGroupId | String | (reused) | Team (group) id of the fraud triage channel. |
| flowlibs_TeamsChannelId | String | (reused) | Channel id where triage and decision messages post. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Stripe | shared_stripe | OnNewCharge |
| Microsoft Dataverse | shared_commondataserviceforapps | ListRecords CreateRecord |
| Microsoft Teams | shared_teams | PostMessageToConversation |
| Approvals | shared_approvals | StartAndWaitForAnApproval |
Customization Guide
Almost every realistic variant of this flow can be implemented by changing environment variable values. A few cases require small edits inside the flow definition — those are called out explicitly below.
- Auto-block threshold
- Raise/lower flowlibs_AutoBlockScore to shift the automated-vs-human line.
- Risk scoring
- Edit Compose Risk Score to weight Radar levels differently, or incorporate outcome/risk_score directly if you have Radar for Fraud Teams.
- Allowlist
- Add a condition before triage to skip known-good customers (e.g. those with N+ historical orders from Compose History Count).
- Velocity
- Query flowlibs_order for repeat attempts in a short window and escalate.
- Outcome log
- The flowlibs_fraudreview rows feed Radar tuning and Power BI reporting; export periodically.
Key Expressions
The flow is intentionally light on Power Fx / WDL gymnastics — the heaviest expressions are the branch-name concatenation and the approval outcome check. They are listed below in the order they appear in the flow.
EXPR.01Risk score from Radar level
Maps the Radar risk level to a numeric score.
EXPR.02Cents -> dollars
Converts the charge cents amount to a major-unit decimal.
EXPR.03Flagged gate
True only when the charge is elevated or highest risk.
EXPR.04Auto-block test
True when the risk score meets the auto-block threshold.
EXPR.05Customer history filter
OData filter for the Dataverse order-history lookup.
EXPR.06Reviewer comments
Pulls the reviewer's comment from the approval response.
Customize & download
Generate a ready-to-import copy of this solution with your environment-variable values baked in — available on Base, Pro, or Team.
Upgrade to customize
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.