Skip to Content
Docs

Payment rules

Block charges or control 3D Secure before a payment reaches the card network, based on conditions you define in the dashboard.

Payment rules block card payments or control 3D Secure before authorization. When a payment matches a rule's conditions, Pay.com applies the rule's action before the payment reaches the card network, and the result is in the API response under risk_assessment_details.

Actions

Each payment rule applies one action when its conditions match:

ActionWhat happens
BlockThe payment is declined before it reaches the card network, with decline_code: "blocked_by_risk_rule".
3DS challengePay.com asks the issuer for an interactive challenge, even if it would allow frictionless authentication.
Require 3DSPay.com authenticates the customer with 3D Secure before authorization.
3DS not requiredPay.com skips 3D Secure without requesting an exemption.
3DS exemptionPay.com requests an SCA exemption and skips 3D Secure.

A Block rule can also set a Failure Message, which the payment's failure_message shows. See Blocked payments for every decline code and how to unblock customers.

When multiple rules match one payment, the action with the highest severity applies. From highest to lowest, the order is Block, 3DS challenge, Require 3DS, 3DS not required, and 3DS exemption. Rules that match at the winning level are all listed in risk_assessment_details.rules_id.

Which payments they run on

Payment rules run on card payments, including saved cards, Apple Pay, Google Pay, and network tokens. On payouts, they can only block. A payment created with off_session: true counts as a recurring payment, and a rule runs on it only if its Evaluate in recurring transactions setting is on.

Each rule has a Rule Scope:

  • Global rules run before Pay.com chooses the settlement account, regardless of the acquirer.
  • Settlement Account rules run after routing, including fallbacks, for one settlement account. They can only block. When one blocks, Pay.com tries the next fallback account if there is one.

Conditions

Payment rules evaluate the fields available before authorization, including card, customer, and IP address fields, your merchant context fields, and aggregations over past payments. See Rule conditions and operators for every field and operator.

Simulation mode

Before you make a rule live, you can turn on Simulation Mode. Pay.com then evaluates payments against the rule and logs the matches, but doesn't apply the action. The rule's ID appears in risk_assessment_details.simulated on the payments it matched, so you can see it in the API and in webhooks too. In Activity, the Simulated Matched Payment Rules filter lists those payments.

Simulation mode is useful when:

  • You want to confirm the rule's conditions match the payments you expect.
  • The rule blocks payments, and you want to check it won't block legitimate ones.

Gradual rollout

Use Rollout to apply a live rule to a chosen percentage of matching payments, from 1% to 100%, so you can ramp up enforcement gradually.

The payment rules page

Go to Rules → Payment in the Pay.com dashboard. The page has these tabs:

  • Rules lists your payment rules, with the Global rules and one tab for each settlement account. Toggle a rule on or off, open it with the eye icon, or edit, duplicate, or delete it. Rules Pay.com created are read-only.
  • All Blocked Customers to Review lists customers your Block rules blocked. See Unblock a customer.
  • Logs shows the payments each rule evaluated, and whether it matched.
  • Audit Log shows who created, changed, or deleted each rule, with the old and new versions.

Create a payment rule

Create the rule in the Pay.com dashboard's rule builder. It's enabled as soon as you save it.

  1. 1

    Open the rule builder

    In Rules → Payment, click Create new rule.

    Give the rule a name, and choose its Rule Scope. To also run it on recurring payments, check Evaluate in recurring transactions. It's off by default.

  2. 2

    Configure the logic

    Define the conditions the rule evaluates on each payment. For each condition, choose a Field, an Operator, and a Value. Combine conditions with AND and OR.

    To match against a set of values, choose the is in list operator and select a risk list.

  3. 3

    Choose an action

    In Choose action, select what Pay.com does when a payment matches. See Actions.

    For the 3DS actions, server-to-server requests must include authentication_context with browser details in the card object. Without it, the 3DS flow can't complete.

  4. 4

    Save the rule

    To run the rule in simulation mode first, check Simulation Mode. Click Confirm & Save Rule.

Next steps

Was this page helpful?