Convert
Currency convertibility is essential in a global economy and critical for international commerce and finance
Convert details
To get detailed information about a specific convert from Tulu Switch API, you can use a POST request to the convert endpoint. Below is an example using cURL:
Request payload
Name
Type
Description
from_currency
string
The currency being converted from.
from_channel
string
The payment method or channel (e.g., fiat).
from_amount
number
The amount being converted.
exchange_rate
number
The exchange rate applied to the conversion.
to_channel
string
The destination payment method/channel.
to_currency
string
The target currency.
to_amount
number
The amount received after conversion.
customer_id
string
The unique ID of the customer making the transaction.
const myHeaders = new Headers();
myHeaders.append("token", "ISN1VNPWRAtBBNE9321GFBCGUaPL
fEfnLmIoeAZA6kExjgsog5aYJqL9LV4LQyAm");
myHeaders.append("Content-Type", "application/json");
const raw = JSON.stringify({
"from_currency": "ngn",
"from_channel": "fiat",
"from_amount": 7620,
"exchange_rate": 762,
"to_channel": "fiat",
"to_currency": "gbp",
"to_amount": 10,
"customer_id": "370fb541-6989-4913-9dc0-4b73aae37a55"
});
const requestOptions = {
method: "POST",
headers: myHeaders,
body: raw,
redirect: "follow"
};
fetch("https://api.switch.tulupay.com/transaction/convert", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
Request details
Response details
A successful response will contain a JSON object. Here's a simplified example:
{
"statusCode": "00",
"status": "convert successfull",
"data": {
"from_amount": 7620,
"to_amount": 10
}
}
Contact Us for Developer Support
Contact our dedicated developer support team for assistance, guidance, or any questions you have regarding Tuluswitch API integration. We're here to ensure your development experience is smooth and successful.
Read Our Developer FAQ for Insights
Master the Tuluswitch API with our Developer Blog! Get expert insights, advanced tips, and industry trends beyond the documentation. Stay connected with the developer community to build exceptional payment platforms. Visit the blog now and unlock your full potential!