Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Retrieve the required fields and validation rules for creating a beneficiary.
cURL
curl --request GET \ --url https://api.onswitch.xyz/beneficiary/requirement \ --header 'x-service-key: <api-key>'
import requests url = "https://api.onswitch.xyz/beneficiary/requirement" headers = {"x-service-key": "<api-key>"} response = requests.get(url, headers=headers) print(response.text)
const options = {method: 'GET', headers: {'x-service-key': '<api-key>'}}; fetch('https://api.onswitch.xyz/beneficiary/requirement', 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.onswitch.xyz/beneficiary/requirement", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "x-service-key: <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" "net/http" "io" ) func main() { url := "https://api.onswitch.xyz/beneficiary/requirement" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("x-service-key", "<api-key>") 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.onswitch.xyz/beneficiary/requirement") .header("x-service-key", "<api-key>") .asString();
require 'uri' require 'net/http' url = URI("https://api.onswitch.xyz/beneficiary/requirement") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["x-service-key"] = '<api-key>' response = http.request(request) puts response.read_body
{ "success": true, "message": "Requirement fetched successfully", "timestamp": "2026-04-18T14:22:08.631Z", "data": [ { "path": "bank.account_number", "regex": "^[0-9]+$", "example": "3048915627", "required": true }, { "path": "bank.nuban_code", "regex": "^[0-9]+$", "example": "2158904376", "required": true }, { "path": "accountHolder.firstName", "regex": "^[0-9a-zA-Z\\s,.#-]{1,15}$", "example": "Chinonso", "required": true }, { "path": "accountHolder.lastName", "regex": "^[0-9a-zA-Z\\s,.#-]{1,15}$", "example": "Adeyemi", "required": true } ] }
{ "success": false, "message": "amount must be greater than 0 for the selected corridor", "timestamp": "2026-04-18T14:22:08.631Z", "data": null }
Service key for API authentication
Transaction direction
OFFRAMP
ONRAMP
Country code
BJ
CD
CI
CM
ET
GA
GH
GM
GN
KE
LR
ML
MW
NG
RW
SL
SN
TZ
UG
ZA
ZM
Currency code (optional).
CDF
ETB
GHS
GMD
GNF
KES
LRD
MWK
NGN
RWF
SLE
TZS
UGX
USD
XAF
XOF
ZAR
ZMW
Account holder type
INDIVIDUAL
BUSINESS
Transfer channel (optional)
BANK
MOBILEMONEY
Successfully retrieved requirements
List of required beneficiary fields and validation rules.
Hide child attributes