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 Integrations or 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.
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)
Transaction Visibility
Every transaction processed through APM routing includes full 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.
This transparency allows you to audit routing decisions and troubleshoot any issues.
If a fallback/default credential was used, this will be clearly indicated in the transaction logs.
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.
Best practices and limitations
- . Always Configure a Default: Ensure every APM has a default credential to handle transactions that don't match specific rules.
- Test Your Rules*: Before going live, test each routing scenario in your staging environment to verify correct credential selection.
- 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.
Take into consideration the following limitations:
- No APM Cascading: Transactions cannot cascade between different APM accounts. Each transaction routes to exactly one credential.
- 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
Updated 21 days ago