curl --request GET \
--url https://hpay-api.host-sl.com/api/v1/wallets/?is_active=true \
--header 'api-key: YOUR_API_KEY' \
--header 'secret-key: YOUR_SECRET_KEY'
from hostpay import HostPay
client = HostPay(api_key="YOUR_API_KEY", secret_key="YOUR_SECRET_KEY")
wallets = client.wallets.list(is_active=True)
for wallet in wallets:
print(wallet["id"], wallet["balance"], wallet["currency"])
import { HostPay } from "@hostpay/sdk";
const client = new HostPay({ apiKey: "YOUR_API_KEY", secretKey: "YOUR_SECRET_KEY" });
const wallets = await client.wallets.list({ isActive: true });
for (const wallet of wallets) console.log(wallet.id, wallet.balance, wallet.currency);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://hpay-api.host-sl.com/api/v1/wallets/?is_active=true",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"api-key: YOUR_API_KEY",
"secret-key: YOUR_SECRET_KEY"
]
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
[
{
"id": "wall_123",
"user_id": "user_123",
"balance": 150.50,
"currency": "SLE",
"is_active": true
},
{
"id": "wall_456",
"user_id": "user_456",
"balance": 0.0,
"currency": "SLE",
"is_active": true
}
]
{
"detail": "Invalid application credentials"
}
Wallets
List Wallets
Retrieve all wallets for your application
GET
/
api
/
v1
/
wallets
/
curl --request GET \
--url https://hpay-api.host-sl.com/api/v1/wallets/?is_active=true \
--header 'api-key: YOUR_API_KEY' \
--header 'secret-key: YOUR_SECRET_KEY'
from hostpay import HostPay
client = HostPay(api_key="YOUR_API_KEY", secret_key="YOUR_SECRET_KEY")
wallets = client.wallets.list(is_active=True)
for wallet in wallets:
print(wallet["id"], wallet["balance"], wallet["currency"])
import { HostPay } from "@hostpay/sdk";
const client = new HostPay({ apiKey: "YOUR_API_KEY", secretKey: "YOUR_SECRET_KEY" });
const wallets = await client.wallets.list({ isActive: true });
for (const wallet of wallets) console.log(wallet.id, wallet.balance, wallet.currency);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://hpay-api.host-sl.com/api/v1/wallets/?is_active=true",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"api-key: YOUR_API_KEY",
"secret-key: YOUR_SECRET_KEY"
]
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
[
{
"id": "wall_123",
"user_id": "user_123",
"balance": 150.50,
"currency": "SLE",
"is_active": true
},
{
"id": "wall_456",
"user_id": "user_456",
"balance": 0.0,
"currency": "SLE",
"is_active": true
}
]
{
"detail": "Invalid application credentials"
}
Endpoint
GET /api/v1/wallets/
Headers
string
required
Your application API key
string
required
Your application secret key
Query Parameters
boolean
Filter wallets by active status.
Response
An array of wallet objects.array
curl --request GET \
--url https://hpay-api.host-sl.com/api/v1/wallets/?is_active=true \
--header 'api-key: YOUR_API_KEY' \
--header 'secret-key: YOUR_SECRET_KEY'
from hostpay import HostPay
client = HostPay(api_key="YOUR_API_KEY", secret_key="YOUR_SECRET_KEY")
wallets = client.wallets.list(is_active=True)
for wallet in wallets:
print(wallet["id"], wallet["balance"], wallet["currency"])
import { HostPay } from "@hostpay/sdk";
const client = new HostPay({ apiKey: "YOUR_API_KEY", secretKey: "YOUR_SECRET_KEY" });
const wallets = await client.wallets.list({ isActive: true });
for (const wallet of wallets) console.log(wallet.id, wallet.balance, wallet.currency);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://hpay-api.host-sl.com/api/v1/wallets/?is_active=true",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"api-key: YOUR_API_KEY",
"secret-key: YOUR_SECRET_KEY"
]
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
[
{
"id": "wall_123",
"user_id": "user_123",
"balance": 150.50,
"currency": "SLE",
"is_active": true
},
{
"id": "wall_456",
"user_id": "user_456",
"balance": 0.0,
"currency": "SLE",
"is_active": true
}
]
{
"detail": "Invalid application credentials"
}