Skip to navigation

Create Fraud Rule

View as Markdown
Create a new fraud prevention rule.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

account_idstringRequired

Headers

Idempotency-Keystring or nullOptional>=8 characters
A unique key for this request. A retry with the same key returns the first response instead of running again, for 24 hours. Keys are per caller.

Request

This endpoint expects an object.
namestringRequired<=255 characters
Rule name
conditionslist of objectsRequired
List of conditions
logicenumOptionalDefaults to AND

Condition logic: AND or OR

Allowed values:
enabledbooleanOptionalDefaults to true
Whether the rule is active
actionenumOptionalDefaults to block

Rule outcome applied when the rule matches. ‘allow’ approves the transaction (overriding any block rule); ‘block’ rejects it with a visible decline.

Allowed values:
transaction_scopeenumOptionalDefaults to cit

Which transactions the rule applies to: ‘cit’ (interactive/checkout, the default), ‘mit’ (off-session renewals/dunning), or ‘all’.

Allowed values:
reasonstringOptional<=500 charactersDefaults to

Optional reason shown to the customer when this ‘block’ rule matches. When empty, the customer sees the account-level custom message; else, for a brand, card type or country rule, a message naming what was blocked; else a generic message.

Response

Successful Response
idstring
Unique rule identifier
namestring
Rule name
logicenum

Condition logic: AND or OR

Allowed values:
enabledboolean
Whether the rule is active
actionenum
Rule outcome applied when the rule matches.
Allowed values:
transaction_scopeenum

Which transactions the rule applies to: ‘cit’, ‘mit’, or ‘all’.

Allowed values:
reasonstring
Block reason
conditionslist of objects
List of conditions
created_atdatetime
When the rule was created
updated_atdatetime
When the rule was last updated

Errors

422
Unprocessable Entity Error