const response = await afriex.paymentMethods.getCryptoWallet({
asset: "USDT", // or 'USDC'
customerId: "optional-customer-id",
});
// Returns: { data: [{ address, network }], total, page }curl --request GET \
--url https://sandbox.api.afriex.com/api/v1/payment-method/crypto-wallet \
--header 'x-api-key: <api-key>'import requests
url = "https://sandbox.api.afriex.com/api/v1/payment-method/crypto-wallet"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://sandbox.api.afriex.com/api/v1/payment-method/crypto-wallet', 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://sandbox.api.afriex.com/api/v1/payment-method/crypto-wallet",
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-api-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://sandbox.api.afriex.com/api/v1/payment-method/crypto-wallet"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-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://sandbox.api.afriex.com/api/v1/payment-method/crypto-wallet")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.afriex.com/api/v1/payment-method/crypto-wallet")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "695271a3ba52c13b669fad2b",
"addresses": [
{
"address": "0x1234567890123456789012345678901234567890",
"network": "ETHEREUM_MAINNET"
},
{
"address": "TYASr5UV6HEcXatwdFQfmLVUqQQQMUxHLS",
"network": "TRON_MAINNET"
}
]
}
}Get or Create Crypto Wallet
Retrieves an existing crypto wallet or creates a new one for the specified crypto asset. Important: This endpoint is only active in production and does not work on staging/dev. Supports idempotency to prevent duplicate wallet creation. Currently supports USDT and USDC assets. Send a GET request with the required asset parameter (and optional customerId). The system will either return existing wallet addresses or automatically create and return new ones if none exist for that asset/customer (or business if no customerId is provided).
const response = await afriex.paymentMethods.getCryptoWallet({
asset: "USDT", // or 'USDC'
customerId: "optional-customer-id",
});
// Returns: { data: [{ address, network }], total, page }curl --request GET \
--url https://sandbox.api.afriex.com/api/v1/payment-method/crypto-wallet \
--header 'x-api-key: <api-key>'import requests
url = "https://sandbox.api.afriex.com/api/v1/payment-method/crypto-wallet"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://sandbox.api.afriex.com/api/v1/payment-method/crypto-wallet', 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://sandbox.api.afriex.com/api/v1/payment-method/crypto-wallet",
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-api-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://sandbox.api.afriex.com/api/v1/payment-method/crypto-wallet"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-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://sandbox.api.afriex.com/api/v1/payment-method/crypto-wallet")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.afriex.com/api/v1/payment-method/crypto-wallet")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "695271a3ba52c13b669fad2b",
"addresses": [
{
"address": "0x1234567890123456789012345678901234567890",
"network": "ETHEREUM_MAINNET"
},
{
"address": "TYASr5UV6HEcXatwdFQfmLVUqQQQMUxHLS",
"network": "TRON_MAINNET"
}
]
}
}https://dev.to/afriex/send-a-link-get-paid-building-payment-links-with-afriex-13ak
Authorizations
Static business API key issued from the dashboard. A business can provision multiple API keys, each scoped to a configurable set of permissions (e.g. read transactions, create deposits, etc). Permissions are chosen per key at creation time in the dashboard and may be revoked by deleting the key. Requests made with a key that does not include the permission required by the target endpoint is rejected with a 401 Unauthorized response, the same response an unrecognised, malformed or revoked key returns. The API does not distinguish the two cases on the wire. Manage your keys and their permissions under Developer → API keys in the dashboard.
Headers
API version in ISO 8601 format. The only supported version is 2026-05-18, which is also the default when the header is omitted. Any other value is rejected with a 400 Bad Request.
Query Parameters
The crypto asset symbol for the wallet
USDT, USDC Optional customer ID. If not provided, the wallet will be created for the business.
Response
Crypto wallet addresses retrieved or created successfully.
Show child attributes
Show child attributes
