Skip to main content
Replace GUILD_ID, USER_ID, ITEM_ID and the token with your own values. Read the token from an environment variable, never from your source code.
Balance and inventory changes need a token with the right scope: economy:read, economy:write or items:write. See Get a token.

Get a balance

GET /guilds/{guild_id}/users/{user_id} needs economy:read. A member with no wallet has a balance of 0.
Response:

Add money

PATCH /guilds/{guild_id}/users/{user_id} needs economy:write. Send signed amounts for cash, bank or both. Use a negative number to subtract. If either balance would drop below zero, nothing changes and you get 400 insufficient_funds. Send an Idempotency-Key so a retry can’t pay twice.
Response: the new balance.
To set exact values instead, use PUT on the same path with absolute, non-negative amounts.

Give an item

POST /guilds/{guild_id}/users/{user_id}/inventory needs items:write. The item is free and stock isn’t reduced. quantity defaults to 1 and can be up to 10,000. Find item_id with GET /guilds/{guild_id}/items.
Response: how many the member now owns.
If the member would go over the item’s per-member limit, you get 409 item_limit_reached.

Handle a rate limit

See Rate limits and Errors.