Soap API v1.4


Find currency conversion rate for a transaction amount.


This method allows you to determine the rate of conversion for different currencies in multi-currency transactions. A merchant account must have support for specific types of currency before it will be able to run multi-currency transactions.

To determine if a currency is supported by a merchant account, use either the getSupportedCurrencies or the getAccountDetails method.

Each currency type is assigned a three digit numeric code (ie: USD=840, Japanese yen=392). You must enter the three digit code for both the original currency and the converted currency in a conversion. The Currency Code list provides all of the three digit codes and their corresponding currencies for international currency conversion.

If you would like to add support for multi-currency transactions to a merchant account please contact the merchant's service provider or customer service.

See also bulkCurrencyConversion, getSupportedCurrencies, getAccountDetails


CurrencyConversion currencyConversion ( ueSecurityToken Token, integer FromCurrency, integer ToCurrency, double Amount )


Type Name Description
ueSecurityToken Token Merchant security token: used to identify merchant and validate transaction.
string FromCurrency Currency code funds will be converted from.
string ToCurrency Currency code funds will be converted to.
double Amount Amount of currency to be converted.

Return Value

CurrencyConversion Returns the rate of conversion and the amount of the converted currency.



// for directions on how to set up the 
// WSDL link and create "$mctoken" and "$client,"
// see: 
try {
   $res=$client->currencyConversion($mctoken, $FromCurrency, $ToCurrency, $Amount);
   $this->assertEquals($res->FromCurrency, $FromCurrency);
   $this->assertEquals($res->Currency, $ToCurrency);
   $this->assertTrue($res->Rate > 0);
   $this->assertTrue($res->Amount > 0);
} catch (SoapFault $e) {
     echo $client->__getLastRequest();
     echo $client->__getLastResponse();
     die('Currency conversion failed : '.$e->getMessage());


Dim from As String
        Dim convert As String
        Dim amount As Double
        from = "036"
        convert = "826"
        amount = 50
        Dim response As usaepay.CurrencyConversion = New usaepay.CurrencyConversion
        response = client.currencyConversion(token, from, convert, amount)


            string from = "840";
            string to = "978";
            int amount = 50;
            usaepay.CurrencyConversion response = new usaepay.CurrencyConversion();
                response = client.currencyConversion(token, from, to, amount);
            catch (Exception err)

Change History

Version Change
1.4 FromCurrency and ToCurrency changed from integer to string
1.1 Method added prior to soap-1.1
developer/soap-1.4/methods/currencyconversion.txt · Last modified: 2010/09/02 17:39 by irina

Page Tools