Create Conversion
curl --request POST \
--url https://api-sandbox.uqpaytech.com/api/v1/ramp/conversion \
--header 'Content-Type: application/json' \
--header 'x-auth-token: <api-key>' \
--data '
{
"quote_id": "<string>",
"sell_currency": "<string>",
"sell_amount": "<string>",
"buy_currency": "<string>",
"buy_amount": "<string>",
"reason": "<string>"
}
'import requests
url = "https://api-sandbox.uqpaytech.com/api/v1/ramp/conversion"
payload = {
"quote_id": "<string>",
"sell_currency": "<string>",
"sell_amount": "<string>",
"buy_currency": "<string>",
"buy_amount": "<string>",
"reason": "<string>"
}
headers = {
"x-auth-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-auth-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
quote_id: '<string>',
sell_currency: '<string>',
sell_amount: '<string>',
buy_currency: '<string>',
buy_amount: '<string>',
reason: '<string>'
})
};
fetch('https://api-sandbox.uqpaytech.com/api/v1/ramp/conversion', 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-sandbox.uqpaytech.com/api/v1/ramp/conversion",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'quote_id' => '<string>',
'sell_currency' => '<string>',
'sell_amount' => '<string>',
'buy_currency' => '<string>',
'buy_amount' => '<string>',
'reason' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-auth-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.uqpaytech.com/api/v1/ramp/conversion"
payload := strings.NewReader("{\n \"quote_id\": \"<string>\",\n \"sell_currency\": \"<string>\",\n \"sell_amount\": \"<string>\",\n \"buy_currency\": \"<string>\",\n \"buy_amount\": \"<string>\",\n \"reason\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-auth-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-sandbox.uqpaytech.com/api/v1/ramp/conversion")
.header("x-auth-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"quote_id\": \"<string>\",\n \"sell_currency\": \"<string>\",\n \"sell_amount\": \"<string>\",\n \"buy_currency\": \"<string>\",\n \"buy_amount\": \"<string>\",\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.uqpaytech.com/api/v1/ramp/conversion")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-auth-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"quote_id\": \"<string>\",\n \"sell_currency\": \"<string>\",\n \"sell_amount\": \"<string>\",\n \"buy_currency\": \"<string>\",\n \"buy_amount\": \"<string>\",\n \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"message": "Success",
"data": {
"order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"short_order_id": "<string>",
"sell_currency": "<string>",
"sell_amount": "<string>",
"buy_currency": "<string>",
"buy_amount": "<string>",
"quote_price": "<string>",
"processing_fee": "<string>",
"network_fee": "<string>",
"order_type": "<string>",
"reason": "<string>"
}
}Conversions
Create Conversion
Initiate Fiat and Crypto conversion. Stablecoin Account API Publisher Disclaimer
POST
/
v1
/
ramp
/
conversion
Create Conversion
curl --request POST \
--url https://api-sandbox.uqpaytech.com/api/v1/ramp/conversion \
--header 'Content-Type: application/json' \
--header 'x-auth-token: <api-key>' \
--data '
{
"quote_id": "<string>",
"sell_currency": "<string>",
"sell_amount": "<string>",
"buy_currency": "<string>",
"buy_amount": "<string>",
"reason": "<string>"
}
'import requests
url = "https://api-sandbox.uqpaytech.com/api/v1/ramp/conversion"
payload = {
"quote_id": "<string>",
"sell_currency": "<string>",
"sell_amount": "<string>",
"buy_currency": "<string>",
"buy_amount": "<string>",
"reason": "<string>"
}
headers = {
"x-auth-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-auth-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
quote_id: '<string>',
sell_currency: '<string>',
sell_amount: '<string>',
buy_currency: '<string>',
buy_amount: '<string>',
reason: '<string>'
})
};
fetch('https://api-sandbox.uqpaytech.com/api/v1/ramp/conversion', 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-sandbox.uqpaytech.com/api/v1/ramp/conversion",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'quote_id' => '<string>',
'sell_currency' => '<string>',
'sell_amount' => '<string>',
'buy_currency' => '<string>',
'buy_amount' => '<string>',
'reason' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-auth-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.uqpaytech.com/api/v1/ramp/conversion"
payload := strings.NewReader("{\n \"quote_id\": \"<string>\",\n \"sell_currency\": \"<string>\",\n \"sell_amount\": \"<string>\",\n \"buy_currency\": \"<string>\",\n \"buy_amount\": \"<string>\",\n \"reason\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-auth-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-sandbox.uqpaytech.com/api/v1/ramp/conversion")
.header("x-auth-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"quote_id\": \"<string>\",\n \"sell_currency\": \"<string>\",\n \"sell_amount\": \"<string>\",\n \"buy_currency\": \"<string>\",\n \"buy_amount\": \"<string>\",\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.uqpaytech.com/api/v1/ramp/conversion")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-auth-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"quote_id\": \"<string>\",\n \"sell_currency\": \"<string>\",\n \"sell_amount\": \"<string>\",\n \"buy_currency\": \"<string>\",\n \"buy_amount\": \"<string>\",\n \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"message": "Success",
"data": {
"order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"short_order_id": "<string>",
"sell_currency": "<string>",
"sell_amount": "<string>",
"buy_currency": "<string>",
"buy_amount": "<string>",
"quote_price": "<string>",
"processing_fee": "<string>",
"network_fee": "<string>",
"order_type": "<string>",
"reason": "<string>"
}
}Authorizations
The API token for login provided by UQPay.
Headers
Specifies the sub-account on whose behalf the request is made. This should be set to the account_id, which can be retrieved via the List Connected Accounts API. If omitted or empty, the request is executed using the master account.
More information at Connected Accounts.
A unique identifier (UUID) used to maintain operation idempotency, ensuring that repeated executions of the same operation do not result in unintended effects or duplication. It helps preserve data consistency in the face of network errors, retries, or failures.
Body
application/json
⌘I

