cURL
curl --request POST \
--url https://api.nomba.com/v1/global-payout/money/convert \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'accountId: <accountid>' \
--data '
{
"amount": 15,
"currency": "USD",
"destinationCurrency": "EUR",
"transactionType": "EXCHANGE"
}
'import requests
url = "https://api.nomba.com/v1/global-payout/money/convert"
payload = {
"amount": 15,
"currency": "USD",
"destinationCurrency": "EUR",
"transactionType": "EXCHANGE"
}
headers = {
"Authorization": "<authorization>",
"accountId": "<accountid>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: '<authorization>',
accountId: '<accountid>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: 15,
currency: 'USD',
destinationCurrency: 'EUR',
transactionType: 'EXCHANGE'
})
};
fetch('https://api.nomba.com/v1/global-payout/money/convert', 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.nomba.com/v1/global-payout/money/convert",
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([
'amount' => 15,
'currency' => 'USD',
'destinationCurrency' => 'EUR',
'transactionType' => 'EXCHANGE'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json",
"accountId: <accountid>"
],
]);
$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.nomba.com/v1/global-payout/money/convert"
payload := strings.NewReader("{\n \"amount\": 15,\n \"currency\": \"USD\",\n \"destinationCurrency\": \"EUR\",\n \"transactionType\": \"EXCHANGE\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("accountId", "<accountid>")
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.nomba.com/v1/global-payout/money/convert")
.header("Authorization", "<authorization>")
.header("accountId", "<accountid>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 15,\n \"currency\": \"USD\",\n \"destinationCurrency\": \"EUR\",\n \"transactionType\": \"EXCHANGE\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nomba.com/v1/global-payout/money/convert")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["accountId"] = '<accountid>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 15,\n \"currency\": \"USD\",\n \"destinationCurrency\": \"EUR\",\n \"transactionType\": \"EXCHANGE\"\n}"
response = http.request(request)
puts response.read_body{
"code": "00",
"description": "Successful",
"data": {
"fromAmount": 15,
"fromCurrency": "USD",
"fromFormatted": "$15.00",
"toAmount": 13.04,
"toCurrency": "EUR",
"toFormatted": "13,04 €",
"spreadAmount": 0.12,
"spreadCurrency": "EUR",
"exchangeRateId": "01kkk4b7rh8pcvtw1s1nxs144s",
"currencyPairName": "EUR/USD",
"feeAmount": 0,
"feeCurrency": "USD"
}
}Global Payout
Convert money
Calculate a currency conversion and lock an exchange rate before initiating a transfer.
POST
/
v1
/
global-payout
/
money
/
convert
cURL
curl --request POST \
--url https://api.nomba.com/v1/global-payout/money/convert \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'accountId: <accountid>' \
--data '
{
"amount": 15,
"currency": "USD",
"destinationCurrency": "EUR",
"transactionType": "EXCHANGE"
}
'import requests
url = "https://api.nomba.com/v1/global-payout/money/convert"
payload = {
"amount": 15,
"currency": "USD",
"destinationCurrency": "EUR",
"transactionType": "EXCHANGE"
}
headers = {
"Authorization": "<authorization>",
"accountId": "<accountid>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: '<authorization>',
accountId: '<accountid>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: 15,
currency: 'USD',
destinationCurrency: 'EUR',
transactionType: 'EXCHANGE'
})
};
fetch('https://api.nomba.com/v1/global-payout/money/convert', 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.nomba.com/v1/global-payout/money/convert",
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([
'amount' => 15,
'currency' => 'USD',
'destinationCurrency' => 'EUR',
'transactionType' => 'EXCHANGE'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json",
"accountId: <accountid>"
],
]);
$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.nomba.com/v1/global-payout/money/convert"
payload := strings.NewReader("{\n \"amount\": 15,\n \"currency\": \"USD\",\n \"destinationCurrency\": \"EUR\",\n \"transactionType\": \"EXCHANGE\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("accountId", "<accountid>")
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.nomba.com/v1/global-payout/money/convert")
.header("Authorization", "<authorization>")
.header("accountId", "<accountid>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 15,\n \"currency\": \"USD\",\n \"destinationCurrency\": \"EUR\",\n \"transactionType\": \"EXCHANGE\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nomba.com/v1/global-payout/money/convert")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["accountId"] = '<accountid>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 15,\n \"currency\": \"USD\",\n \"destinationCurrency\": \"EUR\",\n \"transactionType\": \"EXCHANGE\"\n}"
response = http.request(request)
puts response.read_body{
"code": "00",
"description": "Successful",
"data": {
"fromAmount": 15,
"fromCurrency": "USD",
"fromFormatted": "$15.00",
"toAmount": 13.04,
"toCurrency": "EUR",
"toFormatted": "13,04 €",
"spreadAmount": 0.12,
"spreadCurrency": "EUR",
"exchangeRateId": "01kkk4b7rh8pcvtw1s1nxs144s",
"currencyPairName": "EUR/USD",
"feeAmount": 0,
"feeCurrency": "USD"
}
}Headers
Bearer token for authentication.
Example:
"Bearer <token>"
The parent accountId of the business.
Example:
"890022ce-bae0-45c1-9b9d-ee7872e6ca27"
Body
application/json
Currency conversion payload
⌘I