Create Player
POST
/api/v1/player/createThe createPlayer method should be invoked before sending other requests. For safe integration you should always call this, even if you already created player before. If the player exists already, we redirect your request to the playerExists method.
curl -X POST https://your-domain.com/api/v1/player/create \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"username": "player123",
"secret": "playerSecretPassword"
}'Request Format
{
"username": "player123",
"secret": "playerSecretPassword"
}Response Format
{
"success": true,
"data": {
"error": 0,
"response": {
"id": 51,
"username": "player123_USD_merchant1",
"balance": "0.00",
"currencycode": "USD",
"created": "2023-10-10T11:44:22.000000Z",
"agent_balance": null
}
}
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| username | string | Required | Player's unique username |
| secret | string | Required | Player's password |
Important Notes
- The API key must be associated with an active merchant account
- Username format will be: username_CURRENCY_merchantusername
- Currency is automatically set based on the merchant's settings
- All requests must include the Authorization header with a valid API key
- Response times may vary based on network conditions