Get fiat payout options
List the values a fiat payout can be built from.
Reference data, identical for every organization and stable between
releases, so it is safe to cache for a day. Fetch it instead of hardcoding
the codes: new purposes are added here first, and a value absent from this
response is rejected by POST /v1/transactions/fiat-payouts with
400 invalid_request.
purposes carries the ISO 20022 ExternalPurpose1Code values we accept.
Send code on the payout and show label to whoever is choosing.
curl --request GET \
--url https://api.nxos.io/v1/transactions/fiat-payouts/options \
--header 'Authorization: <authorization>'import requests
url = "https://api.nxos.io/v1/transactions/fiat-payouts/options"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.nxos.io/v1/transactions/fiat-payouts/options', 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.nxos.io/v1/transactions/fiat-payouts/options",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.nxos.io/v1/transactions/fiat-payouts/options"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.nxos.io/v1/transactions/fiat-payouts/options")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nxos.io/v1/transactions/fiat-payouts/options")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"object": "fiat_payout_options",
"purposes": [
{
"code": "GDDS",
"label": "Buying goods",
"description": "Purchase of goods"
},
{
"code": "SUPP",
"label": "Paying a supplier",
"description": "Supplier payment"
}
]
}{
"error": {
"code": "missing_api_key",
"message": "No Authorization header provided.",
"requestId": "req_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4"
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded: 1000 requests per minute. Retry in 23 seconds.",
"requestId": "req_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4"
}
}{
"error": {
"code": "internal_error",
"message": "An unexpected server error occurred.",
"requestId": "req_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4"
}
}Accepted purpose codes
Accepted purpose codes
| Code | Meaning |
|---|---|
GDDS | Purchase of goods |
SUPP | Supplier payment |
SCVE | Purchase of services |
GDSV | Purchase of goods and services together |
IVPT | Payment against an invoice |
TRAD | Trade services operation |
ADVA | Advance payment ahead of delivery |
BEXP | Payment of business expenses |
SUBS | Subscription to information or entertainment services |
REFU | Payment of a refund |
AIRB | Air transport related business |
FERB | Ferry related business |
SALA | Payment of salaries |
BONU | Payment of a bonus |
ALLW | Payment of allowances |
COMM | Payment of commission |
COMP | Payment of compensation |
PENS | Payment of pension |
DIVD | Payment of dividends |
INTC | Payment between two companies in the same group |
TREA | Treasury operation between accounts we hold |
INVS | Payment for investment products, funds or shares |
LOAN | Transfer of a loan to a borrower |
LOAR | Repayment of a loan to a lender |
INTE | Payment of interest |
TAXS | Payment of taxes |
GOVT | Payment to a government department |
RENT | Payment of rent |
UBIL | Gas, water or electricity bill |
INSU | Payment of an insurance premium |
ROYA | Payment of royalties |
EDUC | Study or tuition fees |
CHAR | Payment for charity reasons |
GIFT | Payment with no commercial or statutory purpose |
FREX | Foreign exchange operation |
OTHR | Purpose not covered by another option |
Headers
Bearer token. Format: Bearer <api_key>
Response
The request has succeeded.
The values a fiat payout can be built from.
Object type. Always fiat_payout_options.
fiat_payout_options Every purpose code accepted by POST /v1/transactions/fiat-payouts, in the
order we recommend presenting them. Safe to render straight into a picker:
send code, show label.
Show child attributes
Show child attributes
curl --request GET \
--url https://api.nxos.io/v1/transactions/fiat-payouts/options \
--header 'Authorization: <authorization>'import requests
url = "https://api.nxos.io/v1/transactions/fiat-payouts/options"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.nxos.io/v1/transactions/fiat-payouts/options', 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.nxos.io/v1/transactions/fiat-payouts/options",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.nxos.io/v1/transactions/fiat-payouts/options"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.nxos.io/v1/transactions/fiat-payouts/options")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nxos.io/v1/transactions/fiat-payouts/options")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"object": "fiat_payout_options",
"purposes": [
{
"code": "GDDS",
"label": "Buying goods",
"description": "Purchase of goods"
},
{
"code": "SUPP",
"label": "Paying a supplier",
"description": "Supplier payment"
}
]
}{
"error": {
"code": "missing_api_key",
"message": "No Authorization header provided.",
"requestId": "req_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4"
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded: 1000 requests per minute. Retry in 23 seconds.",
"requestId": "req_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4"
}
}{
"error": {
"code": "internal_error",
"message": "An unexpected server error occurred.",
"requestId": "req_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4"
}
}