Convert Price

Definition

https://sandbox.bluesnap.com/services/2/tools/merchant-currency-convertor?{parameters}


The Convert Price service enables you to convert amounts from a source currency to a target currency.

JSON

JSON Request Content

Enter the following parameters into the web service URL in the format:
/services/2/tools/merchant-currency-convertor?from={currency_code}&to={currency_code}&amount={amount}

  • from: 3-letter code of the currency to convert from
  • to: 3-letter code of the currency to convert to
  • amount: Amount to convert

For example:
https://sandbox.bluesnap.com/services/2/tools/merchant-currency-convertor?from=USD&to=EUR&amount=100

JSON Response Details

If successful, the response HTTP status code is 200 OK.
The response body contains the converted price.


JSON Examples

Request Example

curl -v -X GET https://sandbox.bluesnap.com/services/2/tools/merchant-currency-convertor?from=USD&to=EUR&amount=100 \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ='

Response Example

{
  "value": 72.72,
  "currency": "EUR",
  "formattedPrice": {
    "iso": "EUR 72.72",
    "symbol": "€72.72"
  }
}

XML

XML Request Content

Enter the following parameters into the web service URL in the format:
/services/2/tools/merchant-currency-convertor?from={currency_code}&to={currency_code}&amount={amount}

  • from: 3-letter code of the currency to convert from
  • to: 3-letter code of the currency to convert to
  • amount: Amount to convert

For example:
https://sandbox.bluesnap.com/services/2/tools/merchant-currency-convertor?from=USD&to=EUR&amount=100

XML Response Details

If successful, the response HTTP status code is 200 OK.
The response body contains the converted price.


XML Examples

Request Example

curl -v -X GET https://sandbox.bluesnap.com/services/2/tools/merchant-currency-convertor?from=USD&to=EUR&amount=100 \
-H 'Accept: application/xml' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ='

Response Example

HTTP/ 1.1 200 OK

<?xml version="1.0" encoding="UTF-8"?>
<price xmlns="http://ws.plimus.com">
  <value>72.72</value>
  <currency>EUR</currency>
  <formatted-price>
    <iso>EUR 72.72</iso>
    <symbol>€72.72</symbol>
  </formatted-price>
</price>

Back to Top