Using it

Cart

The cart lets players add packages with a quantity and pay for everything with one Tebex link. It uses Tebex's Headless API, which needs your store's public token, a different value from the secret key.

  1. Get the public token at creator.tebex.io, Integrations, API Keys.
  2. Set it in config.yml and turn the cart on:
cart:
  enabled: true
  webstore_token: "your-public-token"
  1. Run /ht reload.

Once the cart is on, clicking a package opens an add-to-cart screen with -10, -1, +1 and +10 buttons. Add to cart adds the chosen quantity, and Buy now checks out just that package. In the cart, left-click adds one, right-click removes one, and shift-click removes the whole line. Checkout gives one link for everything.

cart:
  enabled: false
  webstore_token: ""
  # Highest quantity a player can choose for one package (store_data.yml can override per package).
  max_quantity: 64
  # Empty the cart after a checkout link has been created.
  clear_after_checkout: true
  # After "Add to cart", go back to the package list (false = stay on the add-to-cart screen).
  return_after_add: true
  # Where Tebex sends players after paying / cancelling. Blank = your store's website.
  complete_url: ""
  cancel_url: ""
  headless_api_url: "https://headless.tebex.io"

Quantity rules#

  • Subscriptions and packages with "disable quantity" ticked in Tebex are limited to 1.
  • You can force this per package with allow_quantity and max_quantity in store_data.yml.
  • Carts are saved in cache/carts.json and survive restarts.

Players open their cart with /cart (alias /basket), /store cart, or the cart item in the menus. /cart is only registered while the cart is enabled.