Processing Rules
Apply conditional pricing and funding behavior based on transaction characteristics
Processing rules enable dynamic pricing and funding configuration by applying conditional overrides based on transaction characteristics like amount, payment method, card type, or card brand. Rules are evaluated by priority, and the first matching rule's settings override the default processing settings for that transaction.
Processing rules are read-only through the API and are configured administratively. Rules override default processing settings only for transactions that match their conditions.
Prerequisites
Before working with processing rules, it's helpful to learn about the following topics.
Learn about processing settings
Understand how to configure default processing settings that rules can override for matching transactions.
Learn about automated funding
Understand how funding delays configured in rules affect when funds are disbursed to processing accounts.
What are Processing Rules
Processing rules define conditional overrides for pricing and funding behavior based on transaction characteristics. When a transaction matches a rule's conditions, that rule's pricing or funding settings are applied instead of the default processing settings.
Rules are evaluated by priority (highest to lowest), and the first matching rule is applied. If no rules match, the default processing settings are used.
Common use cases
- Tiered Pricing: Apply different rates based on transaction amount (e.g., lower rate for high-value transactions)
- Card Brand Pricing: Set specific pricing for different card brands (Visa, Mastercard, Amex, Discover) to match interchange rates
- Card Type Pricing: Differentiate pricing between credit, debit, and prepaid cards
- Payment Method Pricing: Apply different rates for card vs. bank account payments
- Instant Funding Surcharge: Add fees for instant funding transactions
- High-Value Transaction Delays: Apply longer funding delays for high-value transactions to manage risk
- Payment Source Pricing: Set different pricing based on transaction source (API, keyed, mobile wallets)
Rule Priority: Rules are evaluated from highest to lowest priority (100 to 0). Set higher priority numbers for more specific rules that should be evaluated first.
How Processing Rules Work
When a transaction is created, Payload evaluates all processing rules scoped to that account or profile in priority order. The evaluation follows these steps:
Identify Applicable Rules
All rules scoped to the account or profile are identified as candidates for evaluation.
Sort by Priority
Rules are sorted from highest priority (100) to lowest priority (0).
Evaluate Conditions
Starting with the highest priority rule, each rule's conditions are checked against the transaction characteristics. All conditions in a rule must match for the rule to apply.
Apply First Match
The first rule where all conditions match has its pricing and funding settings applied to the transaction. Evaluation stops after the first match.
Use Default Settings
If no rules match, the default processing settings are used for pricing and funding.
First Match Wins: Only the first matching rule is applied. If multiple rules could match a transaction, ensure priority values are set correctly so the most specific rule is evaluated first.
Rule Conditions
Conditions determine which transactions a rule applies to. Multiple conditions can be combined, and all specified conditions must match for the rule to apply.
Amount Conditions
Match transactions by amount using comparison operators:
| Operator | Description | Use Case |
|---|---|---|
amount.eq | Exactly equal to the specified amount | Match specific transaction amounts |
amount.gt | Greater than the specified amount | Apply to transactions above a threshold |
amount.ge | Greater than or equal to the specified amount | Tiered pricing for high-value transactions |
amount.lt | Less than the specified amount | Apply to transactions below a threshold |
amount.le | Less than or equal to the specified amount | Tiered pricing for low-value transactions |
Payment Method Conditions
Match by payment method type:
| Condition | Values | Description |
|---|---|---|
payment_method_type.eq | card | Credit and debit card payments |
bank_account | ACH and bank account payments | |
synthetic | Synthetic account transfers |
Card Conditions
Match card transactions by card brand or card type:
Card Brand:
| Operator | Values | Description |
|---|---|---|
card_brand.eq | visa | Match Visa cards |
mastercard | Match Mastercard cards | |
american_express | Match American Express cards | |
discover | Match Discover cards | |
card_brand.ne | Same as above | Exclude specific card brand |
Card Type:
| Operator | Values | Description |
|---|---|---|
card_type.eq | credit | Match credit cards |
debit | Match debit cards | |
prepaid | Match prepaid cards | |
card_type.ne | Same as above | Exclude specific card type |
Transaction Type Conditions
Match by transaction direction:
| Condition | Values | Description |
|---|---|---|
transaction_type.eq | payment | Incoming funds (customer paying processing account) |
payout | Outgoing funds (processing account paying customer) |
Funding Timing Conditions
Match by funding speed:
| Operator | Values | Description |
|---|---|---|
funding_timing.eq | standard | Standard funding timing |
instant | Instant funding | |
rapid | Rapid funding | |
funding_timing.ne | Same as above | Exclude specific funding timing |
Currency Conditions
Match by transaction currency:
| Condition | Values | Description |
|---|---|---|
currency.eq | USD | US Dollars |
CAD | Canadian Dollars |
Source Conditions
Match by transaction source:
| Condition | Values | Description |
|---|---|---|
source.eq | api | API-initiated transactions |
keyed | Manually keyed transactions | |
googlepay | Google Pay transactions | |
applepay | Apple Pay transactions | |
check | Check payments | |
plaid | Plaid-connected transactions |
Rule Pricing Configuration
When a rule matches a transaction, its pricing configuration overrides the default processing settings pricing for that transaction.
| Field | Description | Format / Example |
|---|---|---|
pricing.trans_rate.default | Percentage-based fee applied to transaction amount. Combined with trans_cost to calculate total fee. | Decimal (e.g., 0.029 for 2.9%) |
pricing.trans_cost.default | Fixed fee per transaction, added to the percentage-based fee. Total fee = (amount Ă— trans_rate) + trans_cost | Currency amount (e.g., 0.30 for $0.30) |
pricing.trans_fee_cap | Maximum fee limit for high-value transactions. Prevents excessive fees regardless of transaction amount. Must be non-zero if set. | Currency amount (e.g., 25.00 caps fees at $25) |
pricing.conv_fee_alloc | Portion of processing fee passed to customer as convenience fee. Value between 0 (processing account absorbs all fees) and 1 (all fees passed to customer). Cannot be set if card_brand is a condition. | Decimal 0-1 (e.g., 0.5 for 50% pass-through) |
Card Brand Rules: Convenience fee allocation cannot be configured when card_brand is a condition due to card network regulations. Each card brand has specific rules about fee allocation.
Rule Funding Configuration
Rules can override funding delay for matching transactions.
| Field | Description | Format / Example |
|---|---|---|
funding.delay.default | Number of days to delay funding after transaction settlement. Overrides the processing settings funding delay. Used for risk management on specific transaction types. | Integer 0-10 (e.g., 5 for 5-day delay) |
Common use cases:
- Longer delay for high-value transactions
- Immediate funding (0 days) for trusted payment sources
- Extended delay for new account transactions
Processing Rule Examples
Processing rules are configured administratively and cannot be created or modified through the API. Below are examples of common rule configurations to illustrate how rules work.
Read-Only Access: Processing rules are read-only through the API. Contact your account administrator or Payload support to configure custom processing rules for your account.
Tiered pricing based on amount
Lower rates for high-value transactions:
// Example rule configuration (admin-configured)
{
scope: {
type: "account",
object_id: "acct_processing123"
},
priority: 90,
conditions: {
amount: {
ge: 1000.00
}
},
pricing: {
trans_rate: {
default: 0.020 // 2.0% for large transactions
},
trans_cost: {
default: 0.30
}
}
}Card brand specific pricing
Different rates for each card brand to match interchange:
// Example Visa rule (admin-configured)
{
priority: 80,
conditions: {
card_brand: {
eq: "visa"
}
},
pricing: {
trans_rate: {
default: 0.0275 // 2.75% for Visa
},
trans_cost: {
default: 0.10
}
}
}
// Example Amex rule (admin-configured)
{
priority: 80,
conditions: {
card_brand: {
eq: "american_express"
}
},
pricing: {
trans_rate: {
default: 0.0349 // 3.49% for Amex
},
trans_cost: {
default: 0.10
}
}
}Payment method based pricing
Lower rates for bank account payments:
// Example bank account rule (admin-configured)
{
priority: 85,
conditions: {
payment_method_type: {
eq: "bank_account"
}
},
pricing: {
trans_rate: {
default: 0.008 // 0.8% for bank accounts
},
trans_cost: {
default: 0.25
},
trans_fee_cap: 5.00
}
}Rule Priority and Evaluation Order
Priority determines the order in which rules are evaluated. Higher priority numbers are evaluated first.
Setting Priority
- Priority range: 0 to 100
- Higher numbers = higher priority
- First matching rule wins
Priority Guidelines
- 90-100: Highly specific rules (multiple conditions, narrow scope)
- 70-89: Card brand or card type rules
- 50-69: Payment method type rules
- 30-49: Amount-based tiered pricing
- 0-29: Broad fallback rules
Example Priority Strategy
// Priority 95: Very specific - High-value Amex
{
priority: 95,
conditions: {
amount: { ge: 1000.00 },
card_brand: { eq: "american_express" }
}
}
// Priority 80: Card brand specific
{
priority: 80,
conditions: {
card_brand: { eq: "visa" }
}
}
// Priority 50: Payment method type
{
priority: 50,
conditions: {
payment_method_type: { eq: "bank_account" }
}
}
// Priority 30: Amount-based
{
priority: 30,
conditions: {
amount: { ge: 500.00 }
}
}Rule Scope
Rules can be scoped at the profile level or account level.
Account-Level Rules
Apply to a specific processing account:
scope: {
type: "account",
object_id: "acct_processing123"
}Profile-Level Rules
Apply to all accounts within a profile:
scope: {
type: "profile",
object_id: "acct_profile456"
}Scope Inheritance: Account-level rules are evaluated before profile-level rules. If an account-level rule matches, profile-level rules are not evaluated.
Viewing Processing Rules
You can query processing rules to understand which rules are configured for an account and how they will affect transaction pricing and funding.
Query Rules for an Account
Retrieve all rules scoped to a specific account:
This example queries all processing rules for a specific account and displays them sorted by priority. The output shows each rule's conditions, pricing overrides, and funding configuration.
Get a Specific Rule
Retrieve details of a specific rule by ID:
rule = pl.ProcessingRule.get("prule_abc123")
print("Rule conditions:", rule.conditions)
print("Rule pricing:", rule.pricing)
print("Rule priority:", rule.priority)Configuring Rules: To add, modify, or remove processing rules for your account, contact your account administrator or Payload support. Rules are configured based on your business requirements and pricing model.
Schema Reference
The following fields define processing rule configuration:
ProcessingRule Schema
Complete configuration object for conditional processing overrides:
scopeobject_id^acct_[A-Za-z0-9]+$typeprofile, accountpriorityconditionsamounteqgegtleltcard_brandeqvisa, mastercard, american_express, discovernevisa, mastercard, american_express, discovercard_typeeqcredit, debit, prepaidnecredit, debit, prepaidcurrencyeqUSD, CADfunding_timingeqstandard, instant, rapidnestandard, instant, rapidpayment_method_typeeqbank_account, card, syntheticsourceeqapi, keyed, googlepay, applepay, check, plaidtransaction_typeeqpayment, payoutpricingconv_fee_alloctrans_costdefaulttrans_fee_captrans_ratedefaultfundingdelaydefaultNext Steps
Understand default settings, monitor rule application, and analyze transaction pricing
Configure Processing Settings
Set up processing settings to define default pricing and configuration that rules will override for matching transactions.
Configure Automated Funding
Set up automated funding to understand how funding delays configured in rules affect fund disbursement timing.
Monitor Transaction Fees
Track transaction fees and rule performance to optimize pricing strategies and identify opportunities for rule refinement.