Currency conversion
Description
Currency conversion is enabled by the currency_converter section.
Correspondence between IDs and currencies:
-1— In transaction currency.1— US dollars.2— Russian rubles.3— Euro.
{
"id": "currency_converter",
"fields": [
{
"id": "convert_currency_to_field",
"value": "-1",
"choices": [
{
"id": "-1",
"label": "In transaction currency"
},
{
"id": "1",
"label": "US dollars"
},
{
"id": "2",
"label": "Russian rubles"
},
{
"id": "3",
"label": "Euro"
}
]
}
]
}
How to fill out a request
To convert amounts to the selected currency, specify its id in the value parameter:
{
"id": "currency_converter",
"fields": [
{
"id": "convert_currency_to_field",
"value": "2"
}
]
}
Was the article helpful?
Previous