Wallets, history and earning rules.
POST/api/v1/actions/economy.points_give
Give points (counts against the key's daily cap)
economy:act
Send an Idempotency-Key: the same key returns the first result and never acts twice. Read the result at status_url.
Body
steam_id * | string | Full Steam ID |
amount * | integer | |
currency | any | |
reason | string | Shown in the admin log |
Answers
200OK
{
"id": "act_00000000000000000000000000000000",
"action": "economy.points_give",
"state": "done",
"at": 0,
"status_url": "/api/v1/actions/act_00000000000000000000000000000000"
}
401Error
error | object | |
error.code | string | |
error.message | string | |
403Error
error | object | |
error.code | string | |
error.message | string | |
429Error
error | object | |
error.code | string | |
error.message | string | |
Code
curl -X POST "https://your-site.com/api/v1/actions/economy.points_give" \
-H "Authorization: Bearer $SEQUENCE_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"steam_id":"string","amount":0,"currency":"points","reason":"string"}'
Try it
Add your site and key at the top.
POST/api/v1/actions/economy.points_take
Take points (counts against the key's daily cap)
economy:act
Send an Idempotency-Key: the same key returns the first result and never acts twice. Read the result at status_url.
Body
steam_id * | string | Full Steam ID |
amount * | integer | |
currency | any | |
reason | string | Shown in the admin log |
Answers
200OK
{
"id": "act_00000000000000000000000000000000",
"action": "economy.points_take",
"state": "done",
"at": 0,
"status_url": "/api/v1/actions/act_00000000000000000000000000000000"
}
401Error
error | object | |
error.code | string | |
error.message | string | |
403Error
error | object | |
error.code | string | |
error.message | string | |
429Error
error | object | |
error.code | string | |
error.message | string | |
Code
curl -X POST "https://your-site.com/api/v1/actions/economy.points_take" \
-H "Authorization: Bearer $SEQUENCE_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"steam_id":"string","amount":0,"currency":"points","reason":"string"}'
Try it
Add your site and key at the top.
GET/api/v1/economy/earning
How players earn: points per minute, interval awards, kill points, daily rewards
economy:read
Answers
200OK
{
"points_per_minute": 1,
"interval_minutes": 30,
"points_per_interval": 50,
"kill_points_on": true
}
401Error
error | object | |
error.code | string | |
error.message | string | |
403Error
error | object | |
error.code | string | |
error.message | string | |
429Error
error | object | |
error.code | string | |
error.message | string | |
Code
curl "https://your-site.com/api/v1/economy/earning" \
-H "Authorization: Bearer $SEQUENCE_KEY"
Try it
Add your site and key at the top.
GET/api/v1/economy/wallets/{steam_id}/history
A player's wallet history, newest first
economy:read
Parameters
steam_id * | path · string | Full Steam ID (17 digits) |
cursor | query · string | next_cursor of the previous page |
currency | query · string | points (default) or premium |
Answers
200OK
{
"data": [
{
"id": 9,
"amount": 50,
"balance": 550,
"what": "Kill",
"at": 1761955200
}
],
"next_cursor": "8"
}
401Error
error | object | |
error.code | string | |
error.message | string | |
403Error
error | object | |
error.code | string | |
error.message | string | |
429Error
error | object | |
error.code | string | |
error.message | string | |
Code
curl "https://your-site.com/api/v1/economy/wallets/{steam_id}/history" \
-H "Authorization: Bearer $SEQUENCE_KEY"
Try it