Options set by rules
Set or override payment method options dynamically with Configuration and Configuration Overrides rules in Pay.com's rules engine.
Configuration and Configuration Overrides rules in Pay.com's rules engine set payment method options for payments that match their conditions. Use them to change processing behavior for specific segments, such as requiring 3D Secure on cards issued in one country, without changing what your server sends.
How configuration rules work
Pay.com evaluates your Configuration and Configuration Overrides rules alongside routing rules before processing a charge, hold, payment session, setup session, card verification, or payout. Matching rules affect only the payment being evaluated:
- Configuration rules replace your defaults. When a Configuration rule matches, the payment starts from the rule's options instead of your account defaults. Defaults aren't merged in, so include every option the payment needs in the rule.
- Request options override Configuration rules. The
payment_method_optionsyou send on the API request merge field by field over your defaults or a matching Configuration rule. - Configuration Overrides rules apply last on every matching payment. Configuration Overrides rules evaluate on every matching payment (both initial attempts and fallback attempts) and merge as the highest precedence layer, overriding your account defaults, Configuration rules, and request
payment_method_options. When multiple Configuration Overrides rules match, they combine, with higher-priority rules taking precedence on overlapping fields. A fallback attempt that applies its own configuration set uses that set and the requestpayment_method_optionsinstead, without the override.
Create a configuration rule
Create Configuration and Configuration Overrides rules under Rules in the Pay.com dashboard once Pay.com enables them for your account. Define their matching conditions using the standard condition builder. See Rules and Rule conditions.
Example
Suppose your account defaults leave 3D Secure to Pay.com and accept three card brands:
{
"card": {
"accepted_card_brands": ["visa", "mastercard", "amex"],
"account_billing_updater": { "enabled": true }
}
}A Configuration rule that matches cards issued in one country sets:
{
"card": {
"request_threed_secure": "challenge",
"accepted_card_brands": ["visa", "mastercard"]
}
}A charge on a card from that country starts from the Configuration rule's
options, then merges any payment_method_options sent on the request. Because
the rule replaced your defaults, account_billing_updater isn't inherited from
your defaults. Add account_billing_updater to the rule to keep it active.
If a Configuration Overrides rule also matches that payment and sets
"accepted_card_brands": ["visa"], the payment accepts only Visa cards. That
value replaces the brands from the Configuration rule and any
accepted_card_brands sent in the API request.
Next steps
- Merchant defaults: How defaults, rules, requests, and overrides combine.
- Rules: How Pay.com's rules engine matches payments.
- Payment method options: Browse all options a rule can set.