Routing Currency Validation

Deuna automatically validates the currency of each transaction before routing it to a payment processor. This prevents mis-charges caused by configuration mistakes (for example, sending a USD order to a processor configured only for MXN).

What this validation does

  • Compares the order currency sent in the checkout or order API with the currency configured for each Merchant Payment Processor (MPP) in the Deuna Admin.
  • Excludes any processor whose configured currency does not match the transaction currency. The processor is skipped and no authorization attempt is made.
  • If, after filtering, there is no valid processor left, the transaction is declined with a routing-related currency error instead of being processed in the wrong currency.

This logic applies to all routing evaluations, including single-processor routes.

Why it matters

Without this validation, a wrong configuration could lead to situations such as:

  • A 100 USD order being charged as 100 MXN.
  • A 100 MXN order being charged as 100 USD (around 2000 MXN).

This can create financial losses, reconciliation issues, and confusion in settlements. The validation makes sure Deuna fails fast when currencies do not match, instead of sending traffic to an incompatible processor.

High-level behavior

When Deuna receives a transaction:

  1. The order is created with a currency (for example, USD or MXN).
  2. The routing engine builds the list of candidate processors based on the merchant's routing rules.
  3. For each candidate MPP, Deuna checks:
    1. transaction.currency (from the API payload)
    2. mpp.currency (from the Admin configuration)
  4. If transaction.currency != mpp.currency, that MPP is removed from the routing queue.
  5. If the list of candidates becomes empty, Deuna returns a hard decline with a specific error indicating there is no valid processor for that currency.

Deuna does not perform Dynamic Currency Conversion (DCC). It only enforces that the order currency and the processor currency match.

Typical scenarios

Scenario 1: Mismatch prevented

Order100 USD
ConfigurationRouting rule points to a processor configured as MXN only
ValidationDeuna detects USD MXN
ResultProcessor is skipped. If no other USD processor is available, returns a currency-mismatch routing error. The shopper is not charged.

Scenario 2: Happy path

Order500 MXN
ConfigurationRouting rule points to a processor configured as MXN
ValidationDeuna detects MXN = MXN
ResultTransaction is sent to authorization normally

Scenario 3: Overcharge risk avoided

Order100 MXN
ConfigurationMisconfigured rule tries to send it to a processor configured as USD
ValidationDeuna detects mismatch
ResultTransaction is blocked, avoiding charging 100 USD for a 100 MXN order

Error handling

If no compatible processor is available after currency filtering:

  • The transaction is declined as a hard failure.
  • Deuna returns an error with a routing-currency-mismatch code (for example, ROUTING_CURRENCY_MISMATCH / NO_VALID_PROCESSOR_FOR_CURRENCY, or an equivalent gateway-level code surfaced in your integration).

You should treat this as a configuration issue rather than a transient processing failure.

Best practices for merchants and integrators

To avoid unexpected declines due to currency mismatch:

  • Ensure that each MPP in Deuna Admin is configured with the correct currency for that processor.
  • Review routing rules to confirm they only send, for example, USD traffic to USD-capable processors and MXN traffic to MXN-capable processors.
  • When adding a new country, currency, or processor, double-check that the order currency you send in the API matches the processor's configuration.

If you see repeated currency-mismatch errors in your logs or responses, review your routing rules and MPP configuration in the Admin first. If everything looks correct and the issue persists, contact Deuna support with example transaction IDs for further analysis.