Most checkout analytics are built to detect hesitation. Funnels, session replays, and abandonment reports all show where a buyer stopped. None of them show a buyer who did everything right, clicked Pay, and was rejected by your own fraud rules.
That is a false decline. Funnel tools don't count it as abandonment because the user completed the attempt. Nobody flags it as an error because the system did what it was told. The customer usually leaves without saying anything, and the loss doesn't show up as a line item anywhere.
For the product side of this problem, including which friction to remove and which to keep, see Checkout Friction: What to Remove, What to Keep & What You Can't See. This article covers the engineering side: how to instrument your payment flow so false declines become measurable, attributable to a specific rule or issuer, and testable.
Two kinds of decline, two different owners
Before writing any queries, separate the two places a transaction can be rejected:
- Merchant-side rejects. Your fraud rules, risk scores, velocity checks, or a third-party screening service block the order before or instead of authorization. You own these rules and can change them.
- Issuer declines. The authorization reaches the card issuer and comes back declined with a response code. You don't control the issuer's model. You do control what you send it (data quality, 3DS results, retry behavior).
Many systems log both as status = 'declined'. Once that happens, you can't diagnose anything. The first fix is almost always in the schema.
Step 1: Log every decision as a structured event
Emit one event for each decision point, not one per order. A single checkout attempt can pass your rules, get a soft decline from the issuer, trigger a 3DS challenge, and then succeed on retry. Each step needs its own record.
{
"attempt_id": "att_9f2c",
"checkout_session_id": "cs_41aa",
"customer_key": "cust_hash_77e1",
"payment_fingerprint": "pm_fp_0c3d",
"bin": "45717360",
"issuer_country": "US",
"amount_minor": 12900,
"currency": "USD",
"stage": "merchant_rules",
"outcome": "reject",
"rules_fired": ["velocity_3_cards_24h", "ship_bill_mismatch"],
"deciding_rule": "velocity_3_cards_24h",
"risk_score": 0.71,
"issuer_response_code": null,
"ruleset_version": "2024-06-03.2",
"ts": "2024-06-10T14:22:05Z"
}
Fields that matter later:
-
stage:merchant_rules,authorization,3ds,capture. This is how you separate your rejects from issuer declines. -
deciding_ruleandrules_fired: Record all rules that fired, not only the one that decided. Several rules often overlap, and you need to know whether removing one would actually change the outcome. -
ruleset_version: Without this, you can't compare performance before and after a rule change. -
customer_keyandpayment_fingerprint: Stable, tokenized identifiers. Never log the PAN. Use the processor's card fingerprint or your own salted hash of a token. -
bin: Store the full BIN your processor exposes. Card networks have moved toward 8-digit BINs, so don't hardcode 6.
Step 2: Slice decline rates by issuer, BIN, and rule
Once events are structured, two queries tell you most of what you need.
Decline rate by BIN, merchant-side only:
SELECT
bin,
COUNT(*) AS attempts,
SUM(CASE WHEN outcome = 'reject' THEN 1 ELSE 0 END) AS rejects,
ROUND(AVG(CASE WHEN outcome = 'reject' THEN 1.0 ELSE 0 END), 4) AS reject_rate
FROM payment_decisions
WHERE stage = 'merchant_rules'
AND ts >= NOW() - INTERVAL '30 days'
GROUP BY bin
HAVING COUNT(*) >= 200
ORDER BY reject_rate DESC;
If one BIN range is rejected at several times your baseline, ask what it has in common. Prepaid cards, a neobank, or a foreign issuer is the usual answer. Concentration by issuer more often points to a rule that is miscalibrated for that population than to a sudden fraud wave.
Rejects attributed to each rule, with overlap:
SELECT
deciding_rule,
COUNT(*) AS rejects,
SUM(CASE WHEN cardinality(rules_fired) = 1 THEN 1 ELSE 0 END) AS sole_cause
FROM payment_decisions
WHERE stage = 'merchant_rules' AND outcome = 'reject'
GROUP BY deciding_rule
ORDER BY rejects DESC;
The sole_cause column is the one to watch. A rule that blocks thousands of orders, but rarely alone, contributes little at the margin. A rule that is frequently the only reason for a reject is the one you need ground truth on.
Step 3: Use proxy signals to estimate false positives
You rarely get a label that says "this reject was a good customer." You can approximate one with behavior that fraudsters seldom show.
Rescued declines. The same customer or device completes a successful, non-disputed purchase shortly after being rejected:
WITH rejects AS (
SELECT attempt_id, customer_key, ts
FROM payment_decisions
WHERE stage = 'merchant_rules' AND outcome = 'reject'
),
later_success AS (
SELECT r.attempt_id
FROM rejects r
JOIN orders o
ON o.customer_key = r.customer_key
AND o.created_at BETWEEN r.ts AND r.ts + INTERVAL '7 days'
AND o.status = 'captured'
LEFT JOIN disputes d ON d.order_id = o.order_id
WHERE d.order_id IS NULL
)
SELECT
COUNT(DISTINCT r.attempt_id) AS total_rejects,
COUNT(DISTINCT l.attempt_id) AS rescued
FROM rejects r
LEFT JOIN later_success l USING (attempt_id);
This undercounts, because most falsely declined customers don't come back. Treat it as a floor, not an estimate. Its main value is comparing rules against each other.
Other useful proxies:
-
Support contacts mentioning failed or rejected payments, joined to
checkout_session_id. - Reject followed by session exit with no retry. Ambiguous on its own, but useful when one rule produces far more of these than the others.
- Rejected customers with clean history. A prior account with captured orders and zero disputes, rejected by a new rule, is a strong candidate for review.
Step 4: Get real ground truth with a controlled holdout
Proxies tell you where to look. A holdout tells you what a rule actually catches. The idea is to let a small, random fraction of rule-flagged traffic through, then measure its dispute and fraud rate against unflagged traffic.
def decide(attempt, ruleset, holdout_cfg):
result = ruleset.evaluate(attempt)
if result.outcome != "reject":
return result
rule = result.deciding_rule
cfg = holdout_cfg.get(rule)
eligible = (
cfg is not None
and attempt.amount_minor <= cfg.max_amount_minor
and stable_bucket(attempt.attempt_id) < cfg.sample_rate
)
if eligible:
log_decision(attempt, outcome="holdout_pass", deciding_rule=rule)
return Decision(outcome="approve", holdout=True)
return result
Guardrails to apply:
- Cap the amount. Only release low-value orders into the holdout.
- Use a deterministic bucket. Hash the attempt ID so you get the same decision on replay and can reproduce it in analysis.
- Prefer shadow mode for new rules. Run the rule in log-only mode before it ever blocks anything. Its "would have rejected" set becomes your test population.
- Get sign-off. A holdout knowingly accepts some fraud. Risk, finance, and compliance should agree on the sample rate and caps before it runs.
Step 5: Measure on the dispute clock, not the conversion clock
Conversion effects appear within days. Disputes arrive weeks later, and card network dispute windows can run for months. If you judge a rule change after one week, you are only looking at its upside.
Group outcomes by order date and ruleset_version, then let each cohort mature:
SELECT
ruleset_version,
date_trunc('week', o.created_at) AS cohort_week,
COUNT(*) AS orders,
COUNT(d.order_id) AS disputes,
ROUND(COUNT(d.order_id)::numeric / COUNT(*), 5) AS dispute_rate
FROM orders o
LEFT JOIN disputes d ON d.order_id = o.order_id
GROUP BY 1, 2
ORDER BY 2, 1;
Don't compare a cohort that has had 90 days to mature against one that has had 10. Either compare them at the same age (disputes within N days of the order) or wait until both have matured.
Reading the results: a decision table
| Pattern you see | Likely cause | What to do |
|---|---|---|
| Merchant reject rate spikes for one BIN range | Rule miscalibrated for that issuer or card type | Inspect which rule fires; add a segment-specific threshold |
| One rule is often the sole cause and has a high rescue rate | Over-aggressive rule | Shadow it or lower its weight; run a capped holdout |
| Issuer declines rise after a deploy | Data quality change (AVS, missing fields, 3DS data) | Diff the authorization payloads before and after the release |
| Holdout dispute rate is close to baseline | Rule catches little real fraud | Retire it or convert it to a step-up challenge |
| Holdout dispute rate is far above baseline | Rule is doing its job | Keep it; consider tightening only the high-value segment |
The last two rows point to a useful option: not every flagged order has to be either approved or rejected. Routing borderline cases to a step-up challenge such as 3-D Secure, rather than a hard reject, often recovers good customers without simply waving the risk through.
Common mistakes and how to catch them
-
One
declinedstatus for everything. You can't tell your rules from the issuer's. Catch it by checking whether you can answer "who said no?" for any single attempt. -
Counting attempts instead of customers. A good customer who retries three times shows up as three rejects. Deduplicate by
checkout_session_idbefore computing rates. -
Ignoring small samples. A 40% reject rate on 12 attempts means very little. Use minimum-volume thresholds (the
HAVINGclause above) or confidence intervals. -
Not versioning rulesets. Without
ruleset_version, before/after comparisons depend on deploy timestamps and guesswork. - Treating rescues as the full count. Most false declines never return. Rescue rate is for ranking rules against each other, not for sizing the problem.
- Logging card data in decision events. Use tokens and fingerprints. Your analytics warehouse shouldn't fall into PCI DSS scope.
Wrapping up
False declines are invisible mainly because the data model hides them. If every decision is logged with its stage, deciding rule, and ruleset version, and you have one source of ground truth (a holdout or shadow mode), they become an ordinary metric you can track, attribute, and improve.
Top comments (0)