# THREE\_D\_SECURE\_RULES

**Type**: `array` of rule objects\
**Default**: `[]` (empty array)\
**Validator**: `ThreeDSecureRuleSerializer`\
**Description**: Rule-based conditions that determine when 3D Secure verification is required.

Each rule object has the following structure:

* `klass`: Rule class path (string, required)
* `defaults`: Rule parameters (JSON object, required)

**Available rule classes**:

* `omnishop.orders.rules.amount_limit`: Requires 3D Secure if transaction amount exceeds specified limit
* `omnishop.orders.rules.masterpass_amount_limit`: Amount limit for Masterpass transactions
* `omnishop.orders.rules.check_pos_slug_three_d_only`: Requires 3D Secure for specific POS terminals
* `omnishop.orders.rules.trial_limit_per_user_email`: Requires 3D Secure after N failed attempts per email
* `omnishop.orders.rules.trial_limit_per_remote_addr`: Requires 3D Secure after N failed attempts per IP
* `omnishop.orders.rules.only_guest_user`: Requires 3D Secure for guest users only
* `omnishop.orders.rules.is_first_order`: Requires 3D Secure for first-time purchasers
* `omnishop.orders.rules.payment_currency`: Requires 3D Secure for specific currencies

**Rule evaluation**:

* Only evaluated if `THREE_D_SECURE_ENABLED` is `true`
* Rules are evaluated in array order
* If ANY rule returns `true`, 3D Secure is required
* If ALL rules return `false`, 3D Secure is not required

**Example configuration**:

```json
[
  {
    "klass": "omnishop.orders.rules.amount_limit",
    "defaults": {"limit": 1000.00}
  },
  {
    "klass": "omnishop.orders.rules.only_guest_user",
    "defaults": {}
  }
]
```

**Used in**: `CreditCardConfirmationPage` via `check_three_d_secure()` function to evaluate rule-based conditions


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://apidocs.akinon.com/commerce-openapis/checkout/dynamic-settings/three_d_secure_rules.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
