APM routing
APM Routing allows you to automatically direct transactions to the right Alternative Payment Method (APM) account based on intelligent rules.
What is APM routing?
APM Routing is essential for merchants operating with multiple accounts for the same APM provider, which are typically segmented by currency, country, or transaction amount.
If you process PayPal transactions in both MXN and USD, then you likely have separate PayPal credentials for each currency. APM Routing ensures each transaction automatically uses the correct account without manual intervention.
How it works
When a customer initiates a transaction, DEUNA's routing engine evaluates your configured rules in real-time and selects the appropriate APM credential based on the transaction context (currency, country, amount).
This selection happens automatically across all critical touchpoints:
- Payment method retrieval (
GET /payment-methods) — Returns the correct credential for frontend initialization - Consent flow (
/consent) — Ensures proper account selection - Final payment processing — Routes the transaction to the matching account
The system follows a priority-based resolution: specific rules are evaluated first, followed by your default configuration if no rule matches.
APM cascading is not supported. Each transaction is routed to a single APM account based on your rules.
Configure APM routing
Setting up APM routing in the DEUNA Admin is straightforward:
Step 1: Connect your APM credentials
- Log in to the DEUNA Admin.
- Navigate to Payment Methods.
- Connect your first APM credential.
- This automatically becomes your default credential.
- A default payment strategy is created automatically.
- Add additional credentials for the same APM as needed.
Each APM must always have one credential marked as default. This ensures fallback coverage when no specific rule matches.
Step 2: Create routing rules
- Navigate to Strategies.
- Click the APMs tab.
- Click Create New Rule.
- Define your routing conditions:
- Currency: Routing on transaction currency.
- Country: Country where the transaction occurs.
- Amount: Routing based on transaction value.
- Select which APM credential should handle matching transactions.
- Name the routing rule
- Set the routing priority.
- Save the rule
Available rule conditions:
- Currency
- Country
- Amount
You can combine multiple conditions in a single rule using AND logic. For example: "Currency = USD AND Country = US AND Amount > 100".
Step 3: Manage rule priorities
Rules are evaluated in priority order from highest to lowest:
- In Strategies, go to the APMs section.
- View your rules table.
- Drag and drop rules to reorder priority.
- Rules at the top are evaluated first.
- If no specific rule matches, then the default credential is used.
Order your most specific rules first, with broader rules lower in priority.
Anti-fraud evaluation for APMs
DEUNA supports a pre-APM anti-fraud evaluation step that allows merchants to assess APM transactions for fraud risk before the payment is sent to the APM provider. This capability brings the same level of fraud protection available for PSP-based card flows to alternative payment methods.
Why anti-fraud for APMs?
Some APMs — such as PayPal — can still generate fraud losses, disputes, or chargebacks. Merchants who want more control over these flows can now configure an anti-fraud provider to evaluate the transaction before it reaches the APM. This ensures risky transactions are blocked early, reducing exposure to fraud-related losses.
How it works
When anti-fraud is enabled for a supported APM flow, DEUNA adds a pre-APM orchestration step to the payment flow:
- The customer initiates a payment using a supported APM (e.g., PayPal).
- DEUNA evaluates the transaction through the configured anti-fraud provider before sending it to the APM.
- The anti-fraud provider returns a risk assessment.
- DEUNA normalizes the response into a standardized risk outcome: Low Risk, Medium Risk, or High Risk.
- DEUNA applies the action configured by the merchant for that risk level:
- Allow (Route): The transaction continues to the APM for payment processing.
- Decline (Block): DEUNA stops the transaction before it reaches the APM.
- If the action is Allow, the payment proceeds to the APM with the correct APM-specific payload preserved.
The anti-fraud step is treated as part of the orchestration rule — it is an active decision point, not a passive validation.
Not all APMs support anti-fraud evaluation. DEUNA will expand support for additional APMs (such as BNPL, bank transfers, or voucher-based methods) in future phases.
Configure anti-fraud for APMs
Step 1: Connect your anti-fraud provider
- Log in to the DEUNA Admin.
- Navigate to Connections.
- Select and configure the anti-fraud provider you want to use for APM evaluation (e.g., Cybersource or Riskified).
- Follow the provider-specific setup instructions in the Anti-fraud engines documentation.
Step 2: Configure the APM + anti-fraud rule in Strategies
- In the DEUNA Admin, navigate to Strategies.
- Go to the APMs tab.
- Create or edit a routing rule for the supported APM (e.g., PayPal).
- Enable anti-fraud evaluation for the rule and select the anti-fraud provider.
- Configure the action for each normalized risk outcome:
- Low Risk: Allow or Block
- Medium Risk: Allow or Block
- High Risk: Allow or Block
- Save the rule.
Only supported APM + anti-fraud provider combinations are available for selection. Unsupported combinations will not appear in the Admin.
Step 3: Verify in order details
After processing transactions, verify that anti-fraud evaluation is working correctly:
- Navigate to Transactions > Order Details.
- Confirm the following information is visible:
- Whether anti-fraud was executed before the APM.
- Which anti-fraud provider was used.
- The normalized risk result (Low / Medium / High).
- The action DEUNA applied (Allow or Block).
- The execution timing of the anti-fraud step.
Transactions blocked by anti-fraud are clearly distinguishable from transactions rejected or failed at the APM layer.
Transaction visibility
Every transaction processed through APM routing — with or without anti-fraud — includes full traceability.
Routing traceability
- In Transactions, go to Transaction Details.
- View the JSON Request and Response.
- See which routing rule was applied.
- Identify the specific merchant payment processor name used.
If a fallback/default credential was used, this will be clearly indicated in the transaction logs.
Anti-fraud traceability
When anti-fraud is enabled for an APM flow, the order detail includes:
- Anti-fraud provider used for the evaluation.
- Normalized risk outcome (Low Risk, Medium Risk, or High Risk).
- Action applied by DEUNA (Allow or Block).
Transaction visibility events
DEUNA generates the following transaction visibility events for APM anti-fraud flows:
| Event | Description |
|---|---|
tv_fraud_analysis | Generated when anti-fraud evaluation completes. The response_data payload includes the APM identifier and APM name associated with the transaction, clearly indicating which alternative payment method was evaluated. |
tv_antifraud_unavailable | Generated when the anti-fraud provider returns no response, times out, or fails with a technical error. Includes the failure reason. |
Managing APM credentials
Manage APM credentials in DEUNA.
Change the default APM
- In Strategies, go to the APMs section.
- Locate the credential you want to set as the default credential.
- Click Set as Default.
Changes take effect immediately for all future transactions
Delete a credential
When deleting an APM credential:
- If it is the default: Select a new default credential
- If it is used in active rules:
- Deactivate the associated rules.
- Reassign the rules to a different credential.
This prevents accidental disruption of your payment routing.
Rule management
DEUNA Admin provides complete control over your routing rules:
Rule Actions:
- Create: Define new routing rules
- Edit: Modify existing rule conditions or assignments
- Inactivate: Temporarily disable rules without deletion
- Save as Draft: Prepare rules before activating them
Rule Visibility:
All rules are displayed in a comprehensive table showing:
- Priority
- Rule Name
- Creation Date
- APM Provider
- Status (Active/Inactive/Draft)
Common use cases
Learn about common use-cases for APM routing in DEUNA.
Use case 1: Currency-based routing
Scenario: You process PayPal transactions in both MXN and USD with separate accounts.
Configuration:
- Connect PayPal MXN credential (set as default).
- Connect the PayPal USD credential.
- Create rule:
- "Currency = USD"
- Route to PayPal USD
- The default rule automatically handles MXN transactions.
USD transactions automatically use PayPal USD credentials, while MXN transactions use PayPal MXN credentials.
Use case 2: Country-specific routing
Scenario: You have different PayPal accounts for Mexico and the United States.
Configuration:
- Create rule: "Country = US" to route to PayPal US
- Create rule: "Country = MX" tp route to PayPal MX
- Set one as the default for other countries
Result: Each country's transactions route to the appropriate regional account.
Use case 3: Decline specific transactions
Scenario: You want to decline USD orders without processing them.
Configuration:
- Create rule: "Currency = USD" to set to Decline.
- The default rule handles all other currencies normally.
Result: USD transactions are automatically declined before processing, while other currencies proceed normally.
Use case 4: Pre-APM anti-fraud evaluation
Scenario: You want to evaluate PayPal transactions through an anti-fraud provider (e.g., Cybersource) before sending them to PayPal, so that high-risk transactions are blocked before payment execution.
Configuration:
- Connect your anti-fraud credentials in Connections.
- Navigate to Strategies > APMs.
- Create a routing rule.
- Enable anti-fraud evaluation and select anti-fraud (Ex. Cybersource) as the provider.
- Configure risk actions:
- Low Risk: Allow Ex. PayPal wallet
- Medium Risk: Allow -> Ex. PayPal wallet
- High Risk: Block
- Save the rule.
Result: Every PayPal transaction is evaluated by Cybersource before reaching PayPal. Low and medium-risk transactions proceed normally, while high-risk transactions are blocked. The order detail shows the anti-fraud evaluation result and the action applied.
Best practices and limitations
- Always Configure a Default: Ensure every APM has a default credential to handle transactions that don't match specific rules.
- Monitor Transaction Logs: Regularly review transaction details to ensure routing behaves as expected and identify any fallback usage.
- Document Your Strategy: Maintain internal documentation explaining why each rule exists and what business logic it serves.
- Start Simple: Begin with basic currency-based routing before adding complex multi-condition rules.
- Review Anti-fraud Results: When anti-fraud is enabled for an APM, regularly review order details to verify that risk outcomes and actions are aligned with your fraud prevention goals.
Take into consideration the following limitations:
- No APM Cascading: Transactions cannot cascade between different APM accounts. Each transaction routes to exactly one credential.
- No cross-APM routing: It is not possible to route an order between different APMs.
- AND Logic Only: Multiple conditions in a rule are combined with AND (not OR)
- Rule Evaluation Order: Rules are evaluated by priority, not creation date
- Immediate Effect: Rule changes take effect immediately for new transactions
- Supported Combinations Only: Anti-fraud for APMs is only available for explicitly supported APM + anti-fraud provider combinations. The Admin prevents unsupported configurations.
- Refund Requirement for Manual Review: Manual-review-based anti-fraud flows require the APM to support refunds. If the APM does not support refunds, manual review flows are not available.
Updated 18 days ago