Docs

# Exchange Rates

This endpoint allows you to check the EUR–RON exchange rates for each operator (Orange, Vodafone, and Telekom).

# Send a Request

To retrieve the exchange rates, send a POST request to the /v1/recharge/exchange-rates endpoint.

# Code Samples

# Staging

curl -X POST "https://api-staging.reincarcareprepay.ro/v1/recharge/exchange-rates" \
     -H "X-Authorization: [STAGING_API_KEY]" \
     -H "Content-Type: application/json"
try {
    const res = await fetch("https://api-staging.reincarcareprepay.ro/v1/recharge/exchange-rates", {
        method: "POST",
        headers: {
            "X-Authorization": "[STAGING_API_KEY]",
            "Content-Type": "application/json"
        }
    })
    const json = await res.json()
    console.log(json)
} catch(err) {
    console.log(err)
}
<?php

$url = "https://api-staging.reincarcareprepay.ro/v1/recharge/exchange-rates";
$apiKey = "[STAGING_API_KEY]";

$ch = curl_init($url);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "X-Authorization: $apiKey",
    "Content-Type: application/json"
]);

$response = curl_exec($ch);
curl_close($ch);

echo $response;

# Production

curl -X POST "https://api.reincarcareprepay.ro/v1/recharge/exchange-rates" \
     -H "X-Authorization: [PROD_API_KEY]" \
     -H "Content-Type: application/json"
try {
    const res = await fetch("https://api.reincarcareprepay.ro/v1/recharge/exchange-rates", {
        method: "POST",
        headers: {
            "X-Authorization": "[PROD_API_KEY]",
            "Content-Type": "application/json"
        }
    })
    const json = await res.json()
    console.log(json)
} catch(err) {
    console.log(err)
}
<?php

$url = "https://api.reincarcareprepay.ro/v1/recharge/exchange-rates";
$apiKey = "[PROD_API_KEY]";

$ch = curl_init($url);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "X-Authorization: $apiKey",
    "Content-Type: application/json"
]);

$response = curl_exec($ch);
curl_close($ch);

echo $response;

The endpoint returns:

{
    "ORANGE_EUR_TO_RON": 5.15,
    "TELEKOM_EUR_TO_RON": 5.15,
    "VODAFONE_EUR_TO_RON": 5.15
}