Show Menu

Get Exchange Rate

Get Exchange Rate

This allows you to get the exchange for the given from and to currency.

post/API/v4/Payment/GetExchangeRate

Header Parameters

Authorizationstring

bearer access_token

Content-typestring

application/json

Request Parameters

IssuerAccountNumberstring

String length: inclusive between 1 and 25

FromCurrencystring

String length: 3

ToCurrencystring

String length: 3

Reponse Parameters

Get Exchange Ratestring

Returned if successful. Allowed parameters are
IssuerAccountNumber—Issuer account number
FromCurrency—From currency code
ToCurrency— To currecny code
Amount— 1 is default
ExchangeRate— Spot exchange rate. This may differ while exchanging the currecny depending on the time taken to perform book exchange rate API call.

OperationStatusstring

Always returned Indicates the status of the operation. Allowed parameters are:
Errors - Displays an error message if the Property name Obligation Definition/value operation was unsuccessful. For more information, see API Error Message Appendix.
Success—Indicates whether the operation was successful. Returns True if the action was successful or False if it was not successful.

Sample Request:

sandbox.xapi.xtrm.com/API/v4/Payment/GetExchangeRate

 {  
  "GetExchangeRate":{  
    "Request":{  
      "IssuerAccountNumber":"SPN Account Number",
      "FromCurrency":"Currency code",
      "ToCurrency":"Currency code"
    }
  }
}
						

Sample Response:


{
	"GetExchangeRateMethodsResponse": {
		"ExchangeRateMethodResult": {
			"ExchangeRateMethods": {
				"ExchangeRateMethodsDetail": [
					{
						"IssuerAccountNumber": "SPN15111156",
						"FromCurrency": "USD",
						"ToCurrency": "GBP",
						"Amount": 1,
						"ExchangeRate": 0.7312
					}
				]
			},
			"OperationStatus": {
				"Success": true,
				"Errors": null
			}
		}
	}
}