post https://api.paymongo.com/v1/fraud/rules
Use secret API key to create a Rule
resource.
Creates a new custom fraud rule using the specified set of conditions, logical operator, action, and priority order. The request body must define the rule’s logic (e.g., risk score threshold, country code, amount limits), the operator (AND/OR), the desired action on matched transactions, and the rule’s enabled status.
This endpoint allows you to automate fraud interventions and quickly adapt your strategy as fraud patterns evolve. Use it to add new controls, refine your review criteria, or respond to emerging threats.
Example Response:
{
"id": "frl_abcdefg123456",
"type": "fraud.rule",
"enabled": true,
"name": "My 1st Rule",
"operator": "AND",
"rules": [
{
"rule_attribute": "risk_score_gte",
"rule_value": "700"
},
{
"rule_attribute": "card_country_id",
"rule_value": [
"NG"
]
}
],
"action": "block",
"rule_order": 1
}
See attribute details on List all rules.