Create an FX quote
curl --request POST \
--url https://api.talescria.com/v1/fx-quotes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fromAccountId": "acct_01M2P8GP7RSDXN81CXRFM2HFV7",
"toCurrency": "NGN",
"amountToMinorUnits": "5000000"
}
'import requests
url = "https://api.talescria.com/v1/fx-quotes"
payload = {
"fromAccountId": "acct_01M2P8GP7RSDXN81CXRFM2HFV7",
"toCurrency": "NGN",
"amountToMinorUnits": "5000000"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
fromAccountId: 'acct_01M2P8GP7RSDXN81CXRFM2HFV7',
toCurrency: 'NGN',
amountToMinorUnits: '5000000'
})
};
fetch('https://api.talescria.com/v1/fx-quotes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"quote": {
"quoteId": "<string>",
"from": "GBP",
"to": "NGN",
"amountFromMinorUnits": "2882",
"amountToMinorUnits": "5000000",
"rateMicro": 1735328951,
"status": "active",
"expiresAt": 123,
"validForSeconds": 179
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Payments
Create an FX quote
Locks an exchange rate for a payment to a destination in a currency the source account doesn’t hold.
Fix exactly one side:
amountToMinorUnits: “the recipient gets exactly this”. This is what most payment flows want.amountFromMinorUnits: “spend exactly this”.
Then send the payment with fxQuoteId and minorUnits equal to the quote’s amountFromMinorUnits.
The two amounts are the agreement. rateMicro (the rate × 1,000,000) is for display. Don’t multiply an amount by it to get the other side; the result can differ from the quoted amount.
Quotes are single-use and expire. Read validForSeconds rather than assuming a lifetime.
Requires the payments:write scope.
POST
/
v1
/
fx-quotes
Create an FX quote
curl --request POST \
--url https://api.talescria.com/v1/fx-quotes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fromAccountId": "acct_01M2P8GP7RSDXN81CXRFM2HFV7",
"toCurrency": "NGN",
"amountToMinorUnits": "5000000"
}
'import requests
url = "https://api.talescria.com/v1/fx-quotes"
payload = {
"fromAccountId": "acct_01M2P8GP7RSDXN81CXRFM2HFV7",
"toCurrency": "NGN",
"amountToMinorUnits": "5000000"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
fromAccountId: 'acct_01M2P8GP7RSDXN81CXRFM2HFV7',
toCurrency: 'NGN',
amountToMinorUnits: '5000000'
})
};
fetch('https://api.talescria.com/v1/fx-quotes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"quote": {
"quoteId": "<string>",
"from": "GBP",
"to": "NGN",
"amountFromMinorUnits": "2882",
"amountToMinorUnits": "5000000",
"rateMicro": 1735328951,
"status": "active",
"expiresAt": 123,
"validForSeconds": 179
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
Headers
Body
application/json