curl --request GET \
--url https://hpay-api.host-sl.com/api/v1/users/user_abc123/ \
--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")
user = client.users.get("user_abc123")
print(user["name"])
import { HostPay } from "@hostpay/sdk";
const client = new HostPay({ apiKey: "YOUR_API_KEY", secretKey: "YOUR_SECRET_KEY" });
const user = await client.users.get("user_abc123");
console.log(user.name);
{
"id": "user_abc123",
"app_user_id": "1",
"name": "John Doe",
"email": "john@example.com",
"phone_number": "+23279123456",
"is_active": true,
"created_at": "2025-01-16T10:30:00Z"
}
{
"detail": "User not found"
}
Users
Get User
Retrieve a specific user by their ID
GET
/
api
/
v1
/
users
/
{user_id}
/
curl --request GET \
--url https://hpay-api.host-sl.com/api/v1/users/user_abc123/ \
--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")
user = client.users.get("user_abc123")
print(user["name"])
import { HostPay } from "@hostpay/sdk";
const client = new HostPay({ apiKey: "YOUR_API_KEY", secretKey: "YOUR_SECRET_KEY" });
const user = await client.users.get("user_abc123");
console.log(user.name);
{
"id": "user_abc123",
"app_user_id": "1",
"name": "John Doe",
"email": "john@example.com",
"phone_number": "+23279123456",
"is_active": true,
"created_at": "2025-01-16T10:30:00Z"
}
{
"detail": "User not found"
}
Endpoint
GET /api/v1/users/{user_id}/
Path Parameters
string
required
The unique identifier of the user to retrieve
Headers
string
required
Your application API key
string
required
Your application secret key
Response
string
Unique identifier for the user
string
The user ID from your own application
string
User’s full name
string
User’s email address
string
User’s phone number
boolean
Whether the user account is active
string
ISO 8601 timestamp of creation
curl --request GET \
--url https://hpay-api.host-sl.com/api/v1/users/user_abc123/ \
--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")
user = client.users.get("user_abc123")
print(user["name"])
import { HostPay } from "@hostpay/sdk";
const client = new HostPay({ apiKey: "YOUR_API_KEY", secretKey: "YOUR_SECRET_KEY" });
const user = await client.users.get("user_abc123");
console.log(user.name);
{
"id": "user_abc123",
"app_user_id": "1",
"name": "John Doe",
"email": "john@example.com",
"phone_number": "+23279123456",
"is_active": true,
"created_at": "2025-01-16T10:30:00Z"
}
{
"detail": "User not found"
}