Skip to main content

User Balance

This section covers how to get and add balance to a user by either username or email.

Getting User Balance

Retrieve the user balance by providing either a username or an email address.

Include Parameters

ParameterDescription
usernameFind a user by username
emailFind a user by email. It must be a valid email address.

Example Request

Using username:

curl "https://api.gamecms.org/v2/websites/user/balance/get?username=Wohaho" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer your-token' \
-X GET

Using email:

curl "https://api.gamecms.org/v2/websites/user/balance/[email protected]" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer your-token' \
-X GET

Adding User Balance

Add a balance to a specific user by providing either a username or an email address.

Please note

This balance will be added to the user's Virtual Balance. Our API does not support changing the paid balance for a user and never will.

Body Fields

ParameterRequired?TypeDescription
balancetruedecimalThe balance which needs to be added to the user's virtual balance. Example format: 15.00

Example Request

Using username:

curl "https://api.gamecms.org/v2/websites/user/balance/add?username=Wohaho" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer your-token' \
-X POST \
-d 'balance=15.00'

Using email:

curl "https://api.gamecms.org/v2/websites/user/balance/[email protected]" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer your-token' \
-X POST \
-d 'balance=15.00'