LogoLogo
  • Welcome
  • Getting Started
  • Integration Methods
  • SDKs
  • Tebex for Unreal Engine 5
  • Tebex for Unity Engine
  • Webstore Builder
    • Overview
    • Getting Started
    • Twig
      • Tags
      • Filters
      • Functions
    • Global Variables
      • basket
      • store
      • page
    • Pages
      • index.html
      • checkout.html
      • username.html
      • options.html
      • package.html
      • cms/page.html
      • category.html
      • layout.html
    • Sidebar Modules
      • module.communitygoal.html
      • module.featuredpackage.html
      • module.giftcardbalance.html
      • module.goal.html
      • module.payments.html
      • module.serverstatus.html
      • module.textbox.html
      • module.topdonator.html
    • Assets
    • Schema
    • Developer Plan
    • Footer
    • Guides
      • Package Slugs
      • Supporting Tiers on Custom Store Templates
  • Headless API
    • Overview
    • Getting Your Listings
    • Creating a Basket
    • Adding Packages
    • Gifting Packages
    • Applying Discounts / Creator Codes
    • Directing to Checkout
    • Tiers
    • Endpoints
    • Postman Config
    • Example Integration
  • Checkout API
    • Overview
    • Headers and Authentication
    • Start the Checkout Process
    • Checkout Webhooks
    • Endpoints
    • Errors
    • Postman Config
  • Tebex.js
    • Overview
    • Integration
    • Events
    • Web Components
    • Custom Render Location
    • NPM
    • GitHub
  • Webhooks
    • Overview
    • Login Webhooks
  • Game Server API
    • Overview
    • Authentication
    • Error Handling
    • Endpoints
  • Affiliate API
    • Overview
    • Referrals
    • Game Types
    • Webhooks
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Headless API

Tiers

Tiers are for upgrading between different levels of subscription packages and automatically applying their deliverables.

This guide will detail the expected flows and endpoints for implementing tiers using Headless API.

See our Creator docs for Tiered Packages to learn how to set up tiers.

If you are using an older or custom store template, you may need to modify your template to support tiers. A tiered category view is different from a non-tiered category.

See Supporting Tiers on Custom Store Templates to learn how to set up the necessary pages.

Checkout Flow

Tiers require an authenticated user. After you create the basket, you must log the user in using the relevant basket auth links.

See Creating A Basket for further information.

The expected flow for checking out with a Tier is identical to any other package:

  1. Create the basket

  2. Authenticate the user via the basket's auth links

  3. Add the tiered package to the basket

  4. Direct the user to checkout

On successful checkout, the user will now have an active_tier when retrieving their tiered categories against their usernameId.

If the active_tier property is not present, the user does not have an active package in that tier.

API Endpoints

Tiered categories use our existing /categories endpoint.

Unlike other Headless API endpoints, you must use HTTP Basic authentication with the Username set to your project ID and Password as your secret key.

Provide a usernameId as a query parameter to check for an active_tier

All tiered categories will have the property tiered: true

PreviousDirecting to CheckoutNextEndpoints

Last updated 1 day ago

Was this helpful?

Gets all categories available in the webstore.

get

Gets all categories from a webstore. This does not include package information. To include package information, add ?includePackages=1 to the URL.

Path parameters
tokenstringRequired

The webstore identifier.

Example: t66x-7cd928b1e9312709e6810edac6dc1fd1eefc57cb
Responses
200
Successful response returns a list of category information.
application/json
get
GET /api/accounts/{token}/categories HTTP/1.1
Host: headless.tebex.io
Accept: */*
200

Successful response returns a list of category information.

{
  "data": [
    {
      "id": 2678660,
      "name": "Test",
      "slug": "text",
      "parent": {},
      "tiered": false,
      "active_tier": {
        "id": 40796,
        "created_at": "2025-05-14T13:48:56.000000Z",
        "username_id": "text",
        "package": {
          "id": 6276316,
          "name": "test package 101",
          "description": "<p>this is just a test. only a test. nothing more.</p>",
          "image": null,
          "type": "single",
          "category": {
            "id": 2678660,
            "name": "Packages"
          },
          "base_price": 5,
          "sales_tax": 0,
          "total_price": 5,
          "currency": "USD",
          "prorate_price": 1,
          "discount": 0,
          "disable_quantity": false,
          "disable_gifting": false,
          "expiration_date": null,
          "created_at": "2024-05-21T18:09:17+00:00",
          "updated_at": "2024-05-21T18:09:17+00:00"
        },
        "active": true,
        "recurring_payment_reference": "tbx-r-757925142",
        "next_payment_date": "2025-06-14T13:48:56+00:00",
        "status": {
          "id": 2,
          "description": "Active"
        },
        "pending_downgrade_package": {
          "id": 6834820,
          "name": "Bronze"
        }
      },
      "description": "text",
      "packages": [
        {
          "id": 6276316,
          "name": "test package 101",
          "description": "<p>this is just a test. only a test. nothing more.</p>",
          "image": null,
          "type": "single",
          "category": {
            "id": 2678660,
            "name": "Packages"
          },
          "base_price": 5,
          "sales_tax": 0,
          "total_price": 5,
          "currency": "USD",
          "prorate_price": 1,
          "discount": 0,
          "disable_quantity": false,
          "disable_gifting": false,
          "expiration_date": null,
          "created_at": "2024-05-21T18:09:17+00:00",
          "updated_at": "2024-05-21T18:09:17+00:00"
        }
      ],
      "order": 1,
      "display_type": "list"
    }
  ]
}

Gets a store's categories including all package information with them.

get

Gets all categories from the webstore, returning active tier information for the given player.

Authorizations
Path parameters
tokenstringRequired

The webstore identifier.

Example: t66x-7cd928b1e9312709e6810edac6dc1fd1eefc57cb
usernameIdintegerRequiredExample: 76561198042467020
Responses
200
Successful response returns a list of category information.
application/json
get
GET /api/accounts/{token}/categories HTTP/1.1
Host: headless.tebex.io
Authorization: Basic username:password
Accept: */*
200

Successful response returns a list of category information.

{
  "data": [
    {
      "id": 2678660,
      "name": "Test",
      "slug": "text",
      "parent": {},
      "tiered": false,
      "active_tier": {
        "id": 40796,
        "created_at": "2025-05-14T13:48:56.000000Z",
        "username_id": "text",
        "package": {
          "id": 6276316,
          "name": "test package 101",
          "description": "<p>this is just a test. only a test. nothing more.</p>",
          "image": null,
          "type": "single",
          "category": {
            "id": 2678660,
            "name": "Packages"
          },
          "base_price": 5,
          "sales_tax": 0,
          "total_price": 5,
          "currency": "USD",
          "prorate_price": 1,
          "discount": 0,
          "disable_quantity": false,
          "disable_gifting": false,
          "expiration_date": null,
          "created_at": "2024-05-21T18:09:17+00:00",
          "updated_at": "2024-05-21T18:09:17+00:00"
        },
        "active": true,
        "recurring_payment_reference": "tbx-r-757925142",
        "next_payment_date": "2025-06-14T13:48:56+00:00",
        "status": {
          "id": 2,
          "description": "Active"
        },
        "pending_downgrade_package": {
          "id": 6834820,
          "name": "Bronze"
        }
      },
      "description": "text",
      "packages": [
        {
          "id": 6276316,
          "name": "test package 101",
          "description": "<p>this is just a test. only a test. nothing more.</p>",
          "image": null,
          "type": "single",
          "category": {
            "id": 2678660,
            "name": "Packages"
          },
          "base_price": 5,
          "sales_tax": 0,
          "total_price": 5,
          "currency": "USD",
          "prorate_price": 1,
          "discount": 0,
          "disable_quantity": false,
          "disable_gifting": false,
          "expiration_date": null,
          "created_at": "2024-05-21T18:09:17+00:00",
          "updated_at": "2024-05-21T18:09:17+00:00"
        }
      ],
      "order": 1,
      "display_type": "list"
    }
  ]
}
  • Checkout Flow
  • API Endpoints
  • GETGets all categories available in the webstore.
  • PATCHUpdates the given tier to the provided package.
  • GETGets a store's categories including all package information with them.

Updates the given tier to the provided package.

patch

Updates a tier to a new package.

Authorizations
Path parameters
tokenstringRequired

The webstore identifier.

Example: some-uuid
tierIdintegerRequired

The tier identifier

Example: 6276316
Body
package_idintegerOptionalExample: 6834822
Responses
200
Successful response.
application/json
patch
PATCH /api/accounts/{token}/tiers/{tierId} HTTP/1.1
Host: headless.tebex.io
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 22

{
  "package_id": 6834822
}
200

Successful response.

{
  "success": true,
  "message": "Tier successfully upgraded, please allow a few moments for your changes to take effect."
}