Ottenere una quotazione FX
curl --request GET \
--url https://api.stage.localpayment.com/api/fx/currency-exchange/{type} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.stage.localpayment.com/api/fx/currency-exchange/{type}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.stage.localpayment.com/api/fx/currency-exchange/{type}', 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.stage.localpayment.com/api/fx/currency-exchange/{type}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.stage.localpayment.com/api/fx/currency-exchange/{type}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.stage.localpayment.com/api/fx/currency-exchange/{type}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stage.localpayment.com/api/fx/currency-exchange/{type}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"exchangeRateToken": "5c3q89a7-f1bc-4ba5-a3b5-411ba0d144ca",
"transactionType": "PayIn",
"accountNumber": "{{sourceAccountNumber}}",
"sourceCurrency": "ARS",
"creationDate": "2024-12-27T21:33:32.6513692+00:00",
"expirationDate": "2024-12-28T05:33:32.6513692+00:00",
"quotes": [
{
"paymentMethodCode": "1005",
"rate": 0.0008369108482392735,
"quoteCurrency": "USD"
},
{
"paymentMethodCode": "1023",
"rate": 0.0008369108482392735,
"quoteCurrency": "USD"
},
{
"paymentMethodCode": "1000",
"rate": 0.0008369108482392735,
"quoteCurrency": "USD"
},
{
"paymentMethodCode": "1004",
"rate": 0.0008369108482392735,
"quoteCurrency": "USD"
},
{
"paymentMethodCode": "1002",
"rate": 0.0008369108482392735,
"quoteCurrency": "USD"
}
]
}
Servizi FX
Ottenere una quotazione FX
GET
/
api
/
fx
/
currency-exchange
/
{type}
Ottenere una quotazione FX
curl --request GET \
--url https://api.stage.localpayment.com/api/fx/currency-exchange/{type} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.stage.localpayment.com/api/fx/currency-exchange/{type}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.stage.localpayment.com/api/fx/currency-exchange/{type}', 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.stage.localpayment.com/api/fx/currency-exchange/{type}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.stage.localpayment.com/api/fx/currency-exchange/{type}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.stage.localpayment.com/api/fx/currency-exchange/{type}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stage.localpayment.com/api/fx/currency-exchange/{type}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"exchangeRateToken": "5c3q89a7-f1bc-4ba5-a3b5-411ba0d144ca",
"transactionType": "PayIn",
"accountNumber": "{{sourceAccountNumber}}",
"sourceCurrency": "ARS",
"creationDate": "2024-12-27T21:33:32.6513692+00:00",
"expirationDate": "2024-12-28T05:33:32.6513692+00:00",
"quotes": [
{
"paymentMethodCode": "1005",
"rate": 0.0008369108482392735,
"quoteCurrency": "USD"
},
{
"paymentMethodCode": "1023",
"rate": 0.0008369108482392735,
"quoteCurrency": "USD"
},
{
"paymentMethodCode": "1000",
"rate": 0.0008369108482392735,
"quoteCurrency": "USD"
},
{
"paymentMethodCode": "1004",
"rate": 0.0008369108482392735,
"quoteCurrency": "USD"
},
{
"paymentMethodCode": "1002",
"rate": 0.0008369108482392735,
"quoteCurrency": "USD"
}
]
}
Questo endpoint genera una quotazione sicura del cambio valuta, bloccando il tasso FX, il periodo di validità e un token univoco per l’elaborazione del pagamento. Per impostazione predefinita le quotazioni si aggiornano ogni 60 secondi, ma su richiesta sono disponibili frequenze personalizzate da un minuto a un giorno, in base alle tue esigenze operative.
Casi d’uso supportati:
- Payin (DCC): blocca il tasso prima di incassare un pagamento dal tuo utente.
- Payout (DCC): blocca il tasso prima di inviare un pagamento a un beneficiario.
- Cambio massivo: blocca il tasso prima di convertire fondi tra i tuoi conti.
Per una spiegazione completa di quando e perché usare ciascuna opzione, consulta Panoramica di FX.
Casi d’uso supportati:
- Payin (DCC): blocca il tasso prima di incassare un pagamento dal tuo utente.
- Payout (DCC): blocca il tasso prima di inviare un pagamento a un beneficiario.
- Cambio massivo: blocca il tasso prima di convertire fondi tra i tuoi conti.
Per una spiegazione completa di quando e perché usare ciascuna opzione, consulta Panoramica di FX.
Autorizzazioni
Intestazioni
Token di accesso Bearer per l'autenticazione. Questo token si ottiene dagli endpoint Ottenere il token di accesso o Rinnovare il token di accesso.
Parametri del percorso
Parametri della query
Valuta da cui vuoi convertire. Codici valuta. Sono supportate le stablecoin USDC e USDT.
Esempio:
"ARS"
Valuta in cui vuoi convertire. Codici valuta.
Esempio:
"USD"
Risposta
OK
- Option 1
- Option 2
Opzioni disponibili:
ARS, BOB, BRL, CLP, COP, CRC, DOP, USD, GTQ, MXN, PYG, PEN, UYU, USDC, USDT Ultima modifica il 22 novembre 2026

