Yes, the Braintree Payment Gateway module fully supports multiple currencies. It achieves this by routing transactions through multiple Braintree merchant accounts, each tied to a specific currency. Place your primary merchant account ID in the standard Merchant ID field. Map additional accounts in the Merchant Currencies field, one currency per line. The module automatically selects the correct merchant account ID at checkout based on the customer's active currency.
This setup matters for any business accepting payments in more than one currency. Braintree often requires separate merchant accounts for currency-specific settlement, local banking rules, and optimized interchange rates. Without the mappings, transactions may fail or default to the primary account, causing processing errors or unexpected fees. The configuration lives entirely inside WHMCS gateway settings once the accounts are provisioned with Braintree.
#Prerequisites
- Multiple merchant accounts already created and approved inside your Braintree control panel, one per currency.
- The Braintree module installed and enabled under Setup > Payment Gateways in WHMCS.
- All desired currencies enabled in WHMCS at Setup > General Settings > Localization.
- Administrative access to both Braintree and your WHMCS instance.
#Provisioning Additional Merchant Accounts
Contact Braintree support or your account representative to request additional merchant accounts for each extra currency. Supply the currencies you need and any relevant business details. Braintree will generate unique merchant account IDs for them. Keep the original account as your primary ID; it remains the fallback and is entered in the main Merchant ID field. This step must be completed first because the WHMCS module cannot create accounts on its own.
#WHMCS Configuration Steps
In the WHMCS admin area, go to Setup > Payment Gateways and open the Braintree module settings. Enter your primary merchant account ID in the Merchant ID field. Scroll to the Merchant Currencies field and add one mapping per line. Save the changes. The module will now inspect the customer's selected currency on every invoice or order and substitute the appropriate merchant account ID when communicating with the Braintree API. Test the entire flow in sandbox mode before going live.
USD:yourCompanyUSD
EUR:yourCompanyEUR
The example above demonstrates the exact required syntax. Each line begins with the three-letter ISO currency code, followed immediately by a colon with no spaces, then the merchant account ID exactly as provided by Braintree. The module reads this field at runtime, splits on newlines, then matches against the active currency. You must supply an entry for every currency that is active in your WHMCS installation; otherwise the primary account will be used for unmapped currencies.
#Runtime Selection Behavior
When a customer views an invoice or proceeds to checkout, WHMCS passes the invoice currency to the gateway module. The Braintree module parses the Merchant Currencies list, locates the matching key, and injects that specific merchantAccountId into the Braintree transaction request. This happens transparently without further administrator intervention. The approach scales cleanly when you later add new currencies, provided you first create the corresponding Braintree account and update the mapping.
#Common Pitfalls and Troubleshooting
- Currency codes do not match exactly (use USD, not US or Dollars).
- Extra spaces or missing newlines in the Merchant Currencies field break parsing.
- New currencies added to WHMCS without corresponding Braintree accounts and mappings.
- Using sandbox IDs in production or live IDs in testing causes immediate failures.
After configuration, create test invoices in each currency and complete sandbox transactions while inspecting the Braintree dashboard to confirm the correct merchant account processed each one. Review WHMCS gateway logs if a transaction selects the wrong account. Keep the primary Merchant ID field populated even when using multiple currencies. This configuration delivers reliable multi-currency processing once the initial mapping is verified.
Comments
No comments yet