POST
/
api
/
v1
/
users
/
create
/
curl --request POST \
  --url https://hpay-api.host-sl.com/api/v1/users/create/ \
  --header 'api-key: YOUR_API_KEY' \
  --header 'secret-key: YOUR_SECRET_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "app_user_id": 1001,
    "name": "John Doe",
    "email": "john.doe@example.com",
    "phone_number": "+23279123456"
  }'
{
  "id": "9b2c1f0e-8a3d-4c7b-9e1a-2f5d6c8b0a11",
  "app_user_id": 1001,
  "name": "John Doe",
  "email": "john.doe@example.com",
  "phone_number": "+23279123456",
  "is_active": true,
  "created_at": "2025-01-16T10:30:00Z",
  "updated_at": "2025-01-16T10:30:00Z"
}

Endpoint

POST /api/v1/users/create/

Headers

api-key
string
required
Your application API key
secret-key
string
required
Your application secret key
Content-Type
string
default:"application/json"
Content type of the request body

Body Parameters

app_user_id
integer
required
Your own identifier for this user in your system. Use it to reconcile HOST Pay users with your database.
name
string
required
Full name of the user
phone_number
string
required
Phone number with country code (e.g., +23279123456)
email
string
Email address of the user (optional)
username
string
Optional username for the user
is_active
boolean
default:"true"
Whether the user is active on creation

Response

id
string
HOST Pay’s unique identifier for the user (UUID)
app_user_id
integer
The identifier you supplied when creating the user
name
string
User’s full name
email
string
User’s email address
phone_number
string
User’s phone number
is_active
boolean
Whether the user account is active (default: true)
created_at
string
ISO 8601 timestamp of creation
updated_at
string
ISO 8601 timestamp of last update
curl --request POST \
  --url https://hpay-api.host-sl.com/api/v1/users/create/ \
  --header 'api-key: YOUR_API_KEY' \
  --header 'secret-key: YOUR_SECRET_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "app_user_id": 1001,
    "name": "John Doe",
    "email": "john.doe@example.com",
    "phone_number": "+23279123456"
  }'
{
  "id": "9b2c1f0e-8a3d-4c7b-9e1a-2f5d6c8b0a11",
  "app_user_id": 1001,
  "name": "John Doe",
  "email": "john.doe@example.com",
  "phone_number": "+23279123456",
  "is_active": true,
  "created_at": "2025-01-16T10:30:00Z",
  "updated_at": "2025-01-16T10:30:00Z"
}

Notes

After creating a user, you need to create a wallet for them using the Create Wallet endpoint. You can then retrieve it using the Get Wallet endpoint.
Email addresses must be unique within your application’s schema. Attempting to create a user with an existing email will result in a 400 error.

Next Steps

Create User Wallet

Create a wallet for the new user

Make a Deposit

Add funds to the user’s wallet