Skip to main content
In the examples below, replace https://your-site.com with your site and YOUR_API_KEY with the key from Settings → API.
These examples must run on a server (game server, bot host, your own backend). Never put the API key anywhere a browser or a player can reach.

Client setup

Users and balance

The GET /users response contains the account without the password, plus a linkedAccounts object (e.g. { "discord": "1234…" }).

Credit operations

Use /credits/add for vote rewards, event prizes or a Discord level system, for example. Add and remove are written to the player’s credit history; /credits/set is not.

Buying products with credits

Products are sent as a form array:
A purchase follows the same rules as the website: discounts, subscription upgrades, required products, required linked accounts, tax, stock and cashback apply; commands and roles are delivered. Possible errors: INSUFFICIENT_BALANCE, OUT_OF_STOCK, REQUIRED_PRODUCT, REQUIRED_LINKED_ACCOUNT, DOWNGRADE_NOT_ALLOWED, INVALID_VARIABLE. For an in-game store menu, GET /store/listing?username=Steve returns the category tree for that player with final prices and upgrade info.

Roles

Support tickets

Opening a ticket sends a Discord webhook notification (if configured).

Discord bot

Get a user and their roles by Discord ID, then sync roles on your server using the discordRoleID mapping.

Donor board (scoreboard, hologram)

type: top-alltime, top-annual, top-monthly, top-daily, latest. limit: 1–10.

Error handling

Error messages are in English and may change. Build the text you show players from the error code, in your own language.

Tips

  • Caching: cache data that rarely changes, such as /store/listing, /store/products and /vote-links, for a few minutes in your plugin.
  • Async calls: do not call the API on the game server’s main thread; the server may freeze.
  • Usernames: on Minecraft sites username parameters match the player’s real name (realname); on other games, the account username.
  • Time zone: dates are in the site’s time zone (except role expiry dates in the Discord user endpoint, which are UTC).