Obtenha uma cotação de câmbio
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"
}
]
}
Serviços de FX
Obtenha uma cotação de câmbio
GET
/
api
/
fx
/
currency-exchange
/
{type}
Obtenha uma cotação de câmbio
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"
}
]
}
Este endpoint gera uma cotação de câmbio segura, fixando a taxa de câmbio, o prazo de validade e um token exclusivo para processamento de pagamentos. Por padrão, as cotações são atualizadas a cada 60 segundos, mas frequências personalizadas de um minuto a um dia estão disponíveis mediante solicitação para atender às suas necessidades operacionais.
Casos de uso suportados:
- Payin (DCC) : fixe a taxa antes de cobrar um pagamento do seu usuário.
- Payout (DCC) : fixe a taxa antes de enviar um pagamento a um beneficiário.
- Bulk Exchange : fixe a taxa antes de converter fundos entre as suas próprias contas.
Para uma explicação completa de quando e por que usar cada opção, consulte Visão geral de FX.
Casos de uso suportados:
- Payin (DCC) : fixe a taxa antes de cobrar um pagamento do seu usuário.
- Payout (DCC) : fixe a taxa antes de enviar um pagamento a um beneficiário.
- Bulk Exchange : fixe a taxa antes de converter fundos entre as suas próprias contas.
Para uma explicação completa de quando e por que usar cada opção, consulte Visão geral de FX.
Autorizações
Cabeçalhos
Token de acesso Bearer para autenticação. Este token é obtido nos endpoints Obter token de acesso ou Renovar token de acesso.
Parâmetros de caminho
Parâmetros de consulta
Moeda da qual você deseja converter. Códigos de moeda. As stablecoins USDC e USDT são suportadas.
Exemplo:
"ARS"
Moeda para a qual você deseja converter. Códigos de moeda.
Exemplo:
"USD"
Resposta
OK
- Option 1
- Option 2
Opções disponíveis:
ARS, BOB, BRL, CLP, COP, CRC, DOP, USD, GTQ, MXN, PYG, PEN, UYU, USDC, USDT Última modificação em 10 de novembro de 2026

