cURL
curl --request POST \
--url https://api.nomba.com/v1/global-payout/exchange/authorize \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'accountId: <accountid>' \
--data '
{
"amount": 1,
"sourceCurrency": "USD",
"destinationCurrency": "CDF",
"senderName": "John Doe",
"receiverName": "John Doe",
"sourceCountryIsoCode": "CD",
"destinationCountryIsoCode": "CD",
"narration": "Transfer between my accounts",
"lockedExchangeRateId": "01kkk4b7rh8pcvtw1s1nxs144s"
}
'import requests
url = "https://api.nomba.com/v1/global-payout/exchange/authorize"
payload = {
"amount": 1,
"sourceCurrency": "USD",
"destinationCurrency": "CDF",
"senderName": "John Doe",
"receiverName": "John Doe",
"sourceCountryIsoCode": "CD",
"destinationCountryIsoCode": "CD",
"narration": "Transfer between my accounts",
"lockedExchangeRateId": "01kkk4b7rh8pcvtw1s1nxs144s"
}
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: 1,
sourceCurrency: 'USD',
destinationCurrency: 'CDF',
senderName: 'John Doe',
receiverName: 'John Doe',
sourceCountryIsoCode: 'CD',
destinationCountryIsoCode: 'CD',
narration: 'Transfer between my accounts',
lockedExchangeRateId: '01kkk4b7rh8pcvtw1s1nxs144s'
})
};
fetch('https://api.nomba.com/v1/global-payout/exchange/authorize', 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/exchange/authorize",
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' => 1,
'sourceCurrency' => 'USD',
'destinationCurrency' => 'CDF',
'senderName' => 'John Doe',
'receiverName' => 'John Doe',
'sourceCountryIsoCode' => 'CD',
'destinationCountryIsoCode' => 'CD',
'narration' => 'Transfer between my accounts',
'lockedExchangeRateId' => '01kkk4b7rh8pcvtw1s1nxs144s'
]),
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/exchange/authorize"
payload := strings.NewReader("{\n \"amount\": 1,\n \"sourceCurrency\": \"USD\",\n \"destinationCurrency\": \"CDF\",\n \"senderName\": \"John Doe\",\n \"receiverName\": \"John Doe\",\n \"sourceCountryIsoCode\": \"CD\",\n \"destinationCountryIsoCode\": \"CD\",\n \"narration\": \"Transfer between my accounts\",\n \"lockedExchangeRateId\": \"01kkk4b7rh8pcvtw1s1nxs144s\"\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/exchange/authorize")
.header("Authorization", "<authorization>")
.header("accountId", "<accountid>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 1,\n \"sourceCurrency\": \"USD\",\n \"destinationCurrency\": \"CDF\",\n \"senderName\": \"John Doe\",\n \"receiverName\": \"John Doe\",\n \"sourceCountryIsoCode\": \"CD\",\n \"destinationCountryIsoCode\": \"CD\",\n \"narration\": \"Transfer between my accounts\",\n \"lockedExchangeRateId\": \"01kkk4b7rh8pcvtw1s1nxs144s\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nomba.com/v1/global-payout/exchange/authorize")
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\": 1,\n \"sourceCurrency\": \"USD\",\n \"destinationCurrency\": \"CDF\",\n \"senderName\": \"John Doe\",\n \"receiverName\": \"John Doe\",\n \"sourceCountryIsoCode\": \"CD\",\n \"destinationCountryIsoCode\": \"CD\",\n \"narration\": \"Transfer between my accounts\",\n \"lockedExchangeRateId\": \"01kkk4b7rh8pcvtw1s1nxs144s\"\n}"
response = http.request(request)
puts response.read_body{
"code": "00",
"description": "Successful",
"data": {
"wtTransactionId": "01kkk8cjk0fpw9jx2n01wd8yfw",
"coreTransactionId": "API-P2P-CB9EC-0c2d962e-4730-48e7-b522-d65cac511549",
"status": "PROCESSING",
"coreStatus": "SUCCESS",
"type": "EXCHANGE"
}
}Global Payout
Authorize exchange
Transfer funds between your own accounts in different currencies.
POST
/
v1
/
global-payout
/
exchange
/
authorize
cURL
curl --request POST \
--url https://api.nomba.com/v1/global-payout/exchange/authorize \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'accountId: <accountid>' \
--data '
{
"amount": 1,
"sourceCurrency": "USD",
"destinationCurrency": "CDF",
"senderName": "John Doe",
"receiverName": "John Doe",
"sourceCountryIsoCode": "CD",
"destinationCountryIsoCode": "CD",
"narration": "Transfer between my accounts",
"lockedExchangeRateId": "01kkk4b7rh8pcvtw1s1nxs144s"
}
'import requests
url = "https://api.nomba.com/v1/global-payout/exchange/authorize"
payload = {
"amount": 1,
"sourceCurrency": "USD",
"destinationCurrency": "CDF",
"senderName": "John Doe",
"receiverName": "John Doe",
"sourceCountryIsoCode": "CD",
"destinationCountryIsoCode": "CD",
"narration": "Transfer between my accounts",
"lockedExchangeRateId": "01kkk4b7rh8pcvtw1s1nxs144s"
}
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: 1,
sourceCurrency: 'USD',
destinationCurrency: 'CDF',
senderName: 'John Doe',
receiverName: 'John Doe',
sourceCountryIsoCode: 'CD',
destinationCountryIsoCode: 'CD',
narration: 'Transfer between my accounts',
lockedExchangeRateId: '01kkk4b7rh8pcvtw1s1nxs144s'
})
};
fetch('https://api.nomba.com/v1/global-payout/exchange/authorize', 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/exchange/authorize",
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' => 1,
'sourceCurrency' => 'USD',
'destinationCurrency' => 'CDF',
'senderName' => 'John Doe',
'receiverName' => 'John Doe',
'sourceCountryIsoCode' => 'CD',
'destinationCountryIsoCode' => 'CD',
'narration' => 'Transfer between my accounts',
'lockedExchangeRateId' => '01kkk4b7rh8pcvtw1s1nxs144s'
]),
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/exchange/authorize"
payload := strings.NewReader("{\n \"amount\": 1,\n \"sourceCurrency\": \"USD\",\n \"destinationCurrency\": \"CDF\",\n \"senderName\": \"John Doe\",\n \"receiverName\": \"John Doe\",\n \"sourceCountryIsoCode\": \"CD\",\n \"destinationCountryIsoCode\": \"CD\",\n \"narration\": \"Transfer between my accounts\",\n \"lockedExchangeRateId\": \"01kkk4b7rh8pcvtw1s1nxs144s\"\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/exchange/authorize")
.header("Authorization", "<authorization>")
.header("accountId", "<accountid>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 1,\n \"sourceCurrency\": \"USD\",\n \"destinationCurrency\": \"CDF\",\n \"senderName\": \"John Doe\",\n \"receiverName\": \"John Doe\",\n \"sourceCountryIsoCode\": \"CD\",\n \"destinationCountryIsoCode\": \"CD\",\n \"narration\": \"Transfer between my accounts\",\n \"lockedExchangeRateId\": \"01kkk4b7rh8pcvtw1s1nxs144s\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nomba.com/v1/global-payout/exchange/authorize")
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\": 1,\n \"sourceCurrency\": \"USD\",\n \"destinationCurrency\": \"CDF\",\n \"senderName\": \"John Doe\",\n \"receiverName\": \"John Doe\",\n \"sourceCountryIsoCode\": \"CD\",\n \"destinationCountryIsoCode\": \"CD\",\n \"narration\": \"Transfer between my accounts\",\n \"lockedExchangeRateId\": \"01kkk4b7rh8pcvtw1s1nxs144s\"\n}"
response = http.request(request)
puts response.read_body{
"code": "00",
"description": "Successful",
"data": {
"wtTransactionId": "01kkk8cjk0fpw9jx2n01wd8yfw",
"coreTransactionId": "API-P2P-CB9EC-0c2d962e-4730-48e7-b522-d65cac511549",
"status": "PROCESSING",
"coreStatus": "SUCCESS",
"type": "EXCHANGE"
}
}Headers
Bearer token for authentication.
Example:
"Bearer <token>"
The parent accountId of the business.
Example:
"890022ce-bae0-45c1-9b9d-ee7872e6ca27"
Body
application/json
Exchange authorization payload
Example:
1
Example:
"USD"
Example:
"CDF"
Example:
"John Doe"
Example:
"John Doe"
Example:
"CD"
Example:
"CD"
Example:
"Transfer between my accounts"
The exchangeRateId from a prior Fetch Exchange Rates call. When provided, the exchange is fulfilled at that exact rate.
Example:
"01kkk4b7rh8pcvtw1s1nxs144s"
⌘I