Converts amounts from a source currency to a target currency.
Endpoint
https://sandbox.bluesnap.com/services/2/tools/merchant-currency-convertorfrom={currency_code}&to={currency_code}&amount={amount}
Request Content
No content is required in the request body. Enter the relevant information in the request URL with query string parameters:
/services/2/tools/merchant-currency-convertor?from={currency_code}&to={currency_code}&amount={amount}
For example:
https://sandbox.bluesnap.com/services/2/tools/merchant-currency-convertor?from=USD&to=EUR&amount=100
Query String Parameters
Parameter | Type | Required | Description |
---|---|---|---|
from | string | required | Three-letter currency code of the original currency. |
to | string | required | Three-letter currencycode of the converted currency. |
amount | string | required | Amount of the original currency to convert. |
Response Details
If successful, the response HTTP status code is 200 OK. The response body contains the converted price.
Examples
JSON
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
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>