---
updatedAt: 2025-09-17T23:17:11.000Z
agentTools:
  projectIndex: https://docs.nexiopay.com/llms.txt
---

# How do I send a transaction to a specific MID and paymentOptionTag based on transaction currency?

***

## tags: \[route]

There may be cases where you don't want to use Nexio's smart routing feature and you want to send all transactions for a specific transaction currency to one specific merchant account (MID) and payment option for that MID.

You can limit the routing by specifying both a `processingOptions.merchantId` and `processingOptions.paymentOptionTag` in the transaction request (such as [Run card transaction](https://docs.nexiopay.com/reference/runcardtransaction)).

The `merchantId` parameter is a unique code that Nexio assigns to each MID on your account.

The `paymentOptionTag` parameter is a custom value used to route transactions to a specific gateway or merchant account. In order to use the `paymentOptionTag` for routing, contact [Integrations Support](https://docs.nexiopay.com/page/contact-us) to designate one or more tags for your merchant account.

**Before you begin setting up a paymentOptionTag and using merchantId, Nexio recommends that you understand the following notes.**

> 🚧 Important
>
> * When you specify a value for both of these parameters (`processingOptions.merchantId` and `processingOptions.paymentOptionTag`), Nexio uses only this information to process the transaction. The system will not attempt to use any other possible merchant IDs (MIDs) or payment option tags.
>
>   ```
>   	Therefore, using a specific value for both of these parameters means that Nexio does not attempt any other routing, even if other routing rules have been specified in the account.
>   ```
>
> * If the value provided for either `merchantId` or `paymentOptionTag` in the transaction request is invalid for the account, Nexio sends an error rather than attempt the transaction.
>
> * If the transaction would be disqualified because of the specified parameter, Nexio responds with an error message and does not attempt to process the transaction further.

# To set up paymentOptionTag and merchantId

1. Contact [Integrations Support](https://docs.nexiopay.com/page/contact-us) to learn the `merchantId` for each MID on your account and to designate one or more paymentOptionTags for your merchant account.

   **Example 1:** paymentOptionTags for USD as official currency in different countries

   ```
   MID #1
   - merchantId is 100000000039
   - USD currency for United States: usa
   - USD currency for Puerto Rico: pri
   - USD currency for Ecuador: ecu

   MID #2
   - merchantId is 100000000041
   - USD currency for Ecuador: ecu
   ```

2. Make note of the tags that are created for your MIDs. These are not visible in the Dashboard.

   You can see the `merchantId` for each of your MIDs by going to the Dashboard, then Settings > Merchant Management.

   > 📘 Note
   >
   > To get a list of all paymentOptionTags for which a currency is enabled for a given merchant ID, contact [Integrations Support](https://docs.nexiopay.com/page/contact-us).

   <br/>

3. For the transaction request, configure the API as follows:

   Each payment request must include the following parameters for payment routing with the paymentOptionTag and merchantId:

   * `data.amount`
   * `data.currency`
   * `processingOptions.paymentOptionTag`
   * `processingOptions.merchantId`

# What happens when a transaction request includes a paymentOptionTag and merchantId?

After you complete the steps for setting up one or more paymentOptionTags and know the merchantId you want to use, the following process happens for each transaction:

1. A consumer adds an item to the shopping cart and submits payment with a specific transaction currency.

   For example, The consumer with an address in Ecuador uses a card to pay in USD.

   Also, the `processingOptions.paymentOptionTag` parameter is set to 'ecu' and the `processingOptions.merchantId` parameter is set to '100000000041'.

2. The Nexio system checks for the specific MID and if it has support for the transaction currency and the paymentOptionTag.

   **Example 1:**

   ```
   For address in Ecuador and MID of 100000000041

   MID #2 is the only option because it has the correct merchantId and paymentOptionTag.
   ```

   **Example 2:**

   ```
   For address in Puerto Rico and MID of 100000000041

   Nexio returns an error message because that MID does not include that paymentOptionTag.
   ```

3. The system routes the payment to the MID or responds with an error message.