Conversion Rate
Get Conversion Rate
Retrieves the currency conversion rate for a given transaction using an external provider
POST
/
currency-conversion
Get Conversion Rate
curl --request POST \
--url https://api-sandbox.y.uno/v1/currency-conversion \
--header 'Content-Type: application/json' \
--header 'X-Private-Secret-Key: <api-key>' \
--header 'X-Public-Api-Key: <api-key>' \
--data '
{
"account_id": "fe14c7c6-c75e-43b7-bdbe-4c87ad52c482",
"amount": {
"value": 10000,
"currency": "COP",
"currency_conversion": {
"cardholder_currency": "USD"
}
},
"provider_data": {
"id": "CIBC"
},
"payment_method": {
"card": {
"card_data": {
"number": "4111111111111111",
"holder_name": "JOHN DOE",
"expiration_month": 12,
"expiration_year": 25
}
}
}
}
'import requests
url = "https://api-sandbox.y.uno/v1/currency-conversion"
payload = {
"account_id": "fe14c7c6-c75e-43b7-bdbe-4c87ad52c482",
"amount": {
"value": 10000,
"currency": "COP",
"currency_conversion": { "cardholder_currency": "USD" }
},
"provider_data": { "id": "CIBC" },
"payment_method": { "card": { "card_data": {
"number": "4111111111111111",
"holder_name": "JOHN DOE",
"expiration_month": 12,
"expiration_year": 25
} } }
}
headers = {
"X-Public-Api-Key": "<api-key>",
"X-Private-Secret-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Public-Api-Key': '<api-key>',
'X-Private-Secret-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
account_id: 'fe14c7c6-c75e-43b7-bdbe-4c87ad52c482',
amount: {
value: 10000,
currency: 'COP',
currency_conversion: {cardholder_currency: 'USD'}
},
provider_data: {id: 'CIBC'},
payment_method: {
card: {
card_data: {
number: '4111111111111111',
holder_name: 'JOHN DOE',
expiration_month: 12,
expiration_year: 25
}
}
}
})
};
fetch('https://api-sandbox.y.uno/v1/currency-conversion', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.y.uno/v1/currency-conversion",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account_id' => 'fe14c7c6-c75e-43b7-bdbe-4c87ad52c482',
'amount' => [
'value' => 10000,
'currency' => 'COP',
'currency_conversion' => [
'cardholder_currency' => 'USD'
]
],
'provider_data' => [
'id' => 'CIBC'
],
'payment_method' => [
'card' => [
'card_data' => [
'number' => '4111111111111111',
'holder_name' => 'JOHN DOE',
'expiration_month' => 12,
'expiration_year' => 25
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Private-Secret-Key: <api-key>",
"X-Public-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.y.uno/v1/currency-conversion"
payload := strings.NewReader("{\n \"account_id\": \"fe14c7c6-c75e-43b7-bdbe-4c87ad52c482\",\n \"amount\": {\n \"value\": 10000,\n \"currency\": \"COP\",\n \"currency_conversion\": {\n \"cardholder_currency\": \"USD\"\n }\n },\n \"provider_data\": {\n \"id\": \"CIBC\"\n },\n \"payment_method\": {\n \"card\": {\n \"card_data\": {\n \"number\": \"4111111111111111\",\n \"holder_name\": \"JOHN DOE\",\n \"expiration_month\": 12,\n \"expiration_year\": 25\n }\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Public-Api-Key", "<api-key>")
req.Header.Add("X-Private-Secret-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-sandbox.y.uno/v1/currency-conversion")
.header("X-Public-Api-Key", "<api-key>")
.header("X-Private-Secret-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"account_id\": \"fe14c7c6-c75e-43b7-bdbe-4c87ad52c482\",\n \"amount\": {\n \"value\": 10000,\n \"currency\": \"COP\",\n \"currency_conversion\": {\n \"cardholder_currency\": \"USD\"\n }\n },\n \"provider_data\": {\n \"id\": \"CIBC\"\n },\n \"payment_method\": {\n \"card\": {\n \"card_data\": {\n \"number\": \"4111111111111111\",\n \"holder_name\": \"JOHN DOE\",\n \"expiration_month\": 12,\n \"expiration_year\": 25\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/currency-conversion")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Public-Api-Key"] = '<api-key>'
request["X-Private-Secret-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_id\": \"fe14c7c6-c75e-43b7-bdbe-4c87ad52c482\",\n \"amount\": {\n \"value\": 10000,\n \"currency\": \"COP\",\n \"currency_conversion\": {\n \"cardholder_currency\": \"USD\"\n }\n },\n \"provider_data\": {\n \"id\": \"CIBC\"\n },\n \"payment_method\": {\n \"card\": {\n \"card_data\": {\n \"number\": \"4111111111111111\",\n \"holder_name\": \"JOHN DOE\",\n \"expiration_month\": 12,\n \"expiration_year\": 25\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "599cc714-9bb6-4a3c-8465-c360cd47e04e",
"amount": {
"value": 10000,
"currency": "COP",
"currency_conversion": {
"cardholder_currency": "USD",
"cardholder_amount": 2.58,
"rate": 3879.812207,
"provider_data": {
"id": "CIBC",
"transaction_id": "274c4fc9a1e3c27625fc4d925e0331783c3c5c94358280158d3980e97ac66795a80970d48c176078f394106345c05215431bbc6260a6980db3a2e0b753db1a3f32d0c8adfc02c18794dc07ac1c13a14e581a3d78ba4b9c5afdae537f38cc495628239b7470a997cc8d5b51ae787603b64de3b19cea09f825f6fd13896656b75092bd7fe19a0560df29b94",
"response_code": "2000",
"response_message": "Successful",
"raw_response": {
"fxRateInquiryResponse": {
"localDate": 210,
"localTime": 180927,
"merchantID": "18695684",
"rateEndTime": 1739212767659,
"ratePreferenceCode": "R1",
"rateStartTime": 1739210967659,
"rateValidityPeriod": 30,
"rates": [
{
"cardholderAmount": 2.58,
"cardholderCurrency": "840",
"merchantAmount": 10000,
"merchantCurrency": "170",
"rate": 3879.812207,
"rateInquiryRef": "274c4fc9a1e3c27625fc4d925e0331783c3c5c94358280158d3980e97ac66795a80970d48c176078f394106345c05215431bbc6260a6980db3a2e0b753db1a3f32d0c8adfc02c18794dc07ac1c13a14e581a3d78ba4b9c5afdae537f38cc495628239b7470a997cc8d5b51ae787603b64de3b19cea09f825f6fd13896656b75092bd7fe19a0560df29b94"
}
],
"responseCode": "2000",
"responseMessage": "Successful",
"sessionId": "2a587fa2-e7da-11ef-8b88-7e36493c761f",
"terminalID": "CT000001",
"traceNumber": 3594
}
}
}
}
},
"expired_at": "2025-02-10T18:39:27Z"
}{}This page will help you get started with Currency conversions.
For more information on how to use the currency conversion service, please refer to the Currency conversion page in the guides section.
Authorizations
Body
application/json
The unique identifier of the account. You find this information on the Yuno dashboard (UUID; 36 chars).
Amount to be converted
Show child attributes
Show child attributes
Provider information
Show child attributes
Show child attributes
Payment method information. Provide either token, vaulted_token, or card.
Show child attributes
Show child attributes
Was this page helpful?
Previous
Banking ConnectivityUnified API to create bank accounts, run transfers, and onboard entities across multiple banking providers
Next
⌘I
Get Conversion Rate
curl --request POST \
--url https://api-sandbox.y.uno/v1/currency-conversion \
--header 'Content-Type: application/json' \
--header 'X-Private-Secret-Key: <api-key>' \
--header 'X-Public-Api-Key: <api-key>' \
--data '
{
"account_id": "fe14c7c6-c75e-43b7-bdbe-4c87ad52c482",
"amount": {
"value": 10000,
"currency": "COP",
"currency_conversion": {
"cardholder_currency": "USD"
}
},
"provider_data": {
"id": "CIBC"
},
"payment_method": {
"card": {
"card_data": {
"number": "4111111111111111",
"holder_name": "JOHN DOE",
"expiration_month": 12,
"expiration_year": 25
}
}
}
}
'import requests
url = "https://api-sandbox.y.uno/v1/currency-conversion"
payload = {
"account_id": "fe14c7c6-c75e-43b7-bdbe-4c87ad52c482",
"amount": {
"value": 10000,
"currency": "COP",
"currency_conversion": { "cardholder_currency": "USD" }
},
"provider_data": { "id": "CIBC" },
"payment_method": { "card": { "card_data": {
"number": "4111111111111111",
"holder_name": "JOHN DOE",
"expiration_month": 12,
"expiration_year": 25
} } }
}
headers = {
"X-Public-Api-Key": "<api-key>",
"X-Private-Secret-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Public-Api-Key': '<api-key>',
'X-Private-Secret-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
account_id: 'fe14c7c6-c75e-43b7-bdbe-4c87ad52c482',
amount: {
value: 10000,
currency: 'COP',
currency_conversion: {cardholder_currency: 'USD'}
},
provider_data: {id: 'CIBC'},
payment_method: {
card: {
card_data: {
number: '4111111111111111',
holder_name: 'JOHN DOE',
expiration_month: 12,
expiration_year: 25
}
}
}
})
};
fetch('https://api-sandbox.y.uno/v1/currency-conversion', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.y.uno/v1/currency-conversion",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account_id' => 'fe14c7c6-c75e-43b7-bdbe-4c87ad52c482',
'amount' => [
'value' => 10000,
'currency' => 'COP',
'currency_conversion' => [
'cardholder_currency' => 'USD'
]
],
'provider_data' => [
'id' => 'CIBC'
],
'payment_method' => [
'card' => [
'card_data' => [
'number' => '4111111111111111',
'holder_name' => 'JOHN DOE',
'expiration_month' => 12,
'expiration_year' => 25
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Private-Secret-Key: <api-key>",
"X-Public-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.y.uno/v1/currency-conversion"
payload := strings.NewReader("{\n \"account_id\": \"fe14c7c6-c75e-43b7-bdbe-4c87ad52c482\",\n \"amount\": {\n \"value\": 10000,\n \"currency\": \"COP\",\n \"currency_conversion\": {\n \"cardholder_currency\": \"USD\"\n }\n },\n \"provider_data\": {\n \"id\": \"CIBC\"\n },\n \"payment_method\": {\n \"card\": {\n \"card_data\": {\n \"number\": \"4111111111111111\",\n \"holder_name\": \"JOHN DOE\",\n \"expiration_month\": 12,\n \"expiration_year\": 25\n }\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Public-Api-Key", "<api-key>")
req.Header.Add("X-Private-Secret-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-sandbox.y.uno/v1/currency-conversion")
.header("X-Public-Api-Key", "<api-key>")
.header("X-Private-Secret-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"account_id\": \"fe14c7c6-c75e-43b7-bdbe-4c87ad52c482\",\n \"amount\": {\n \"value\": 10000,\n \"currency\": \"COP\",\n \"currency_conversion\": {\n \"cardholder_currency\": \"USD\"\n }\n },\n \"provider_data\": {\n \"id\": \"CIBC\"\n },\n \"payment_method\": {\n \"card\": {\n \"card_data\": {\n \"number\": \"4111111111111111\",\n \"holder_name\": \"JOHN DOE\",\n \"expiration_month\": 12,\n \"expiration_year\": 25\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/currency-conversion")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Public-Api-Key"] = '<api-key>'
request["X-Private-Secret-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_id\": \"fe14c7c6-c75e-43b7-bdbe-4c87ad52c482\",\n \"amount\": {\n \"value\": 10000,\n \"currency\": \"COP\",\n \"currency_conversion\": {\n \"cardholder_currency\": \"USD\"\n }\n },\n \"provider_data\": {\n \"id\": \"CIBC\"\n },\n \"payment_method\": {\n \"card\": {\n \"card_data\": {\n \"number\": \"4111111111111111\",\n \"holder_name\": \"JOHN DOE\",\n \"expiration_month\": 12,\n \"expiration_year\": 25\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "599cc714-9bb6-4a3c-8465-c360cd47e04e",
"amount": {
"value": 10000,
"currency": "COP",
"currency_conversion": {
"cardholder_currency": "USD",
"cardholder_amount": 2.58,
"rate": 3879.812207,
"provider_data": {
"id": "CIBC",
"transaction_id": "274c4fc9a1e3c27625fc4d925e0331783c3c5c94358280158d3980e97ac66795a80970d48c176078f394106345c05215431bbc6260a6980db3a2e0b753db1a3f32d0c8adfc02c18794dc07ac1c13a14e581a3d78ba4b9c5afdae537f38cc495628239b7470a997cc8d5b51ae787603b64de3b19cea09f825f6fd13896656b75092bd7fe19a0560df29b94",
"response_code": "2000",
"response_message": "Successful",
"raw_response": {
"fxRateInquiryResponse": {
"localDate": 210,
"localTime": 180927,
"merchantID": "18695684",
"rateEndTime": 1739212767659,
"ratePreferenceCode": "R1",
"rateStartTime": 1739210967659,
"rateValidityPeriod": 30,
"rates": [
{
"cardholderAmount": 2.58,
"cardholderCurrency": "840",
"merchantAmount": 10000,
"merchantCurrency": "170",
"rate": 3879.812207,
"rateInquiryRef": "274c4fc9a1e3c27625fc4d925e0331783c3c5c94358280158d3980e97ac66795a80970d48c176078f394106345c05215431bbc6260a6980db3a2e0b753db1a3f32d0c8adfc02c18794dc07ac1c13a14e581a3d78ba4b9c5afdae537f38cc495628239b7470a997cc8d5b51ae787603b64de3b19cea09f825f6fd13896656b75092bd7fe19a0560df29b94"
}
],
"responseCode": "2000",
"responseMessage": "Successful",
"sessionId": "2a587fa2-e7da-11ef-8b88-7e36493c761f",
"terminalID": "CT000001",
"traceNumber": 3594
}
}
}
}
},
"expired_at": "2025-02-10T18:39:27Z"
}{}