Repository navigation
Conversation
…er captures A fraud policy takes checkTimes, a list, in place of the single checkTime, which still works on its own. New times run a policy after a declined auth, and after a successful or declined capture (a sale or the capture of an earlier auth). preauth-first and preauth-every cannot be listed together, and ondemand stands alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A policy runs before the auth or after the payment, not both, so a payment is never decided on twice by the same policy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In place of a list of check times, a policy sets when it checks a customer-initiated payment and when it checks a merchant-initiated one, each a single time, so a payment is decided on one side of the auth. postauth runs after an auth's outcome, while an approved auth can still be voided, and postcapture after a capture's. A merchant-initiated payment has no pre-auth time, having no customer present. checkTime still sets one time for every payment, with auth-success run as postauth. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ated payments In place of per-initiator check times, checkTime stays the one time a policy runs at, now with postauth and postcapture, and merchantCheck runs a merchant-initiated payment's check after its outcome instead. Without merchantCheck a policy behaves as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A record-only policy keeps its connectors informed of each payment without asking for a result to act on, so it cannot set declineOn. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
declineOn is ignored while recordOnly is set rather than rejected, so a policy can be made record-only and reverted without losing it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ng them sales Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Corrected definitions for 'postauth' and 'postcapture' in the fraud policy documentation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ecordOnly before recordMIT Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bajb
reviewed
Oct 15, 2026
…and initiator A fraud policy now sets the payment step it runs at (auth, capture-auth or capture), its position (pre, post, post-success, post-decline, or ondemand), which attempts it runs on (first or every), and what it does with customer- and merchant-initiated payments (scan, inform or none). This replaces the check times, recordOnly and recordMIT added on this branch. checkTime still works for existing policies, each value running as the trigger it stands for and scanning both initiators. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The on-demand position is spelt on-demand; checkTime keeps ondemand. The docs and comments now say what each field does as the code does it, with one term, transaction, for the step a policy runs at. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bajb
previously approved these changes
Oct 15, 2026
An on-demand scan is requested outside any payment, so it is set as transactionType on-demand, with no position or attempts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An on-demand scan has no transaction to decline. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A fraud policy could only run before an auth, after a successful auth, or on demand, and treated customer- and merchant-initiated payments the same. Renewals, mostly collected by a capture with no auth, never reached a fraud provider, and whether Kount was paid for a decision was set on the connector rather than per policy.
transactionType(auth,capture-auth,capture,on-demand) andposition(pre,post,post-success,post-decline): the policy runs at that step. Anon-demandpolicy runs when a scan is requested through the API, and has noposition,attemptsordeclineOn.attempts(first,every): the charge's first attempt at the step, or every one; defaults toevery.cit/mit(scan,inform,none): a scan asks the connectors for a result, an inform sends the payment for their records without one, and none leaves it out; both default tonone.checkTimepolicies: unchanged, each value running as its trigger and scanning both initiators.checkTimecan't be combined with the new fields.Test plan:
TestFraudPolicyCheckTimesvalidates throughutils.Validate: full and on-demand triggers and everycheckTimeare accepted;checkTimewith the new fields, a transaction without a position,on-demandwith a position, attempts ordeclineOn, a policy that does nothing for either initiator, and unknown values are rejected.TestFraudPolicyTrigger,TestFraudTriggerRuns,TestFraudTriggerRunsOnDemandandTestFraudTriggerModecover thecheckTimemapping, defaults and matching. Assemble's DEV-3378 work builds and passes its tests against this branch, andchive validatebuilt against it accepts a pre-auth customer scan policy and a post-capture inform policy.🤖 Generated with Claude Code