For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

Endpoints

All endpoints for Headless API: for specific implementation guides see Guides

Get the webstore's information

get

Gets the webstore associated with the provided token

Responses
200

Successful response returns the webstore's information.

application/json

Wrapped webstore information in a "data" object.

get/
GET /api/accounts/YOUR_PUBLIC_TOKEN/ HTTP/1.1
Host: headless.tebex.io
Accept: */*
200

Successful response returns the webstore's information.

{
  "data": {
    "id": 1,
    "description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris fermentum eget tellus et cursus. Pellentesque vel vehicula velit, sit amet tincidunt diam. Aliquam sit amet fermentum lorem.</p>",
    "name": "Minecraft Store",
    "webstore_url": "https://example.tebex.io",
    "currency": "USD",
    "lang": "en",
    "logo": "https://example.com",
    "platform_type": "Minecraft: Java Edition",
    "platform_type_id": "minecraft",
    "disabled": false,
    "created_at": "2023-05-25T09:49:37+00:00",
    "supports_usernames": true,
    "supports_gifting": false
  }
}

Get custom pages defined for the webstore.

get

Gets a list of custom pages associated with the webstore. These contain a content variable with the HTML content of the page.

Responses
200

Successful response returns the webstore's pages.

application/json
get/pages
GET /api/accounts/YOUR_PUBLIC_TOKEN/pages HTTP/1.1
Host: headless.tebex.io
Accept: */*
200

Successful response returns the webstore's pages.

{
  "data": []
}

Get a basket

get

Gets a basket associated with the provided identifier.

Path parameters
basketIdentstringRequired

The basket identifier.

Example: c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2c
Responses
200

Successful response returns the basket information.

application/json
get/baskets/{basketIdent}
GET /api/accounts/YOUR_PUBLIC_TOKEN/baskets/{basketIdent} HTTP/1.1
Host: headless.tebex.io
Accept: */*
200

Successful response returns the basket information.

{
  "data": {
    "id": 244127617,
    "ident": "1a-55fff4107740a1f40d844ff89607557f45bfafb3",
    "complete": false,
    "email": "support@tebex.io",
    "username": null,
    "coupons": [],
    "giftcards": [],
    "creator_code": "text",
    "cancel_url": "https://tebex.io",
    "complete_url": null,
    "complete_auto_redirect": false,
    "country": "US",
    "ip": "127.0.0.1",
    "username_id": 127244,
    "base_price": 1.27,
    "sales_tax": 0.11,
    "total_price": 1.38,
    "currency": "USD",
    "packages": [],
    "custom": {
      "foo": "bar",
      "ref": 1234
    },
    "links": {
      "payment": "https://checkout.tebex.io/api/payments/tbx-12345",
      "checkout": "https://checkout.tebex.io/checkout/1a-55fff4107740a1f40d844ff89607557f45bfafb3"
    }
  }
}

Create a new basket

post

Creates a new basket for use during checkout.

Body
complete_urlstringOptional

A URL the user can return to when checkout is completed.

Example: https://example.tebex.io/thank-you
cancel_urlstringOptional

A URL the user can return to when cancelling checkout.

Example: https://tebex.io/
customobjectOptional

Custom data you wish to associate with the basket. This data will be included with webhook responses and GET requests associated with the Basket.

Example: {"foo":"bar"}
complete_auto_redirectbooleanOptional

True if the user should automatically be redirected to the relevant complete/cancel URL

Example: true
Responses
200

Successful response returns the basket information.

application/json
post/baskets
POST /api/accounts/YOUR_PUBLIC_TOKEN/baskets HTTP/1.1
Host: headless.tebex.io
Content-Type: application/json
Accept: */*
Content-Length: 139

{
  "complete_url": "https://example.tebex.io/thank-you",
  "cancel_url": "https://tebex.io/",
  "custom": {
    "foo": "bar"
  },
  "complete_auto_redirect": true
}
{
  "data": {
    "id": 244127617,
    "ident": "1a-55fff4107740a1f40d844ff89607557f45bfafb3",
    "complete": false,
    "email": "support@tebex.io",
    "username": null,
    "coupons": [],
    "giftcards": [],
    "creator_code": "text",
    "cancel_url": "https://tebex.io",
    "complete_url": null,
    "complete_auto_redirect": false,
    "country": "US",
    "ip": "127.0.0.1",
    "username_id": 127244,
    "base_price": 1.27,
    "sales_tax": 0.11,
    "total_price": 1.38,
    "currency": "USD",
    "packages": [],
    "custom": {
      "foo": "bar",
      "ref": 1234
    },
    "links": {
      "payment": "https://checkout.tebex.io/api/payments/tbx-12345",
      "checkout": "https://checkout.tebex.io/checkout/1a-55fff4107740a1f40d844ff89607557f45bfafb3"
    }
  }
}

Get auth links for basket

get

Fetches a basket's auth URL. The player should be directed here in order for them to authorize their account. When complete, they will be returned to the provided returnUrl and the basket will be authorized from that moment onwards.

Path parameters
basketIdentstringRequired

The basket identifier.

Example: c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2c
returnUrlstringRequired

The URL you would like to redirect the user to after successful basket authentication.

Example: https://example.tebex.io/
Responses
200

Successful response returns the auth provider options and URLs of the sign-in link.

application/json
namestringOptionalExample: FiveM
urlstringOptionalExample: https://ident.tebex.io/
get/baskets/{basketIdent}/auth?returnUrl={returnUrl}
GET /api/accounts/YOUR_PUBLIC_TOKEN/baskets/{basketIdent}/auth?returnUrl={returnUrl} HTTP/1.1
Host: headless.tebex.io
Accept: */*
[]

Add packages to a dynamic category for a basket.

put

Populates a dynamic category with custom packages for the given basket. Dynamic categories are created in the creator panel with the type dynamic, and are typically populated in response to a basket.authenticated webhook.

Requires basic auth: the username is the webstore identifier and the password is the account's checkout API key.

Once created, the packages can be fetched using the category endpoints with both includePackages=1 and basketIdent provided.

Authorizations
AuthorizationstringRequired
Path parameters
basketIdentstringRequired

The basket identifier.

Example: c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2c
Body
basket_idstringRequired

The basket's ident. Use the same value as the basketIdent path parameter.

Example: dvcbln-d7f6355161726d63e6dbe235ca25d2641184295b
usernamestringRequired

The username of the authenticated customer the packages are being created for.

Example: TestUser
category_idintegerRequired

The ID of the dynamic category to populate. Must be a category of type dynamic.

Example: 1234
Responses
200

Successful response confirms the dynamic packages were created.

application/json
messagestringOptionalExample: Dynamic packages updated successfully.
put/baskets/{basketIdent}/dynamic-packages
PUT /api/accounts/YOUR_PUBLIC_TOKEN/baskets/{basketIdent}/dynamic-packages HTTP/1.1
Host: headless.tebex.io
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 118

{
  "basket_id": "dvcbln-d7f6355161726d63e6dbe235ca25d2641184295b",
  "username": "TestUser",
  "category_id": 1234,
  "packages": []
}
{
  "message": "Dynamic packages updated successfully."
}

Get all categories

get

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

Responses
200

Successful response returns a list of category information.

application/json
get/categories
GET /api/accounts/YOUR_PUBLIC_TOKEN/categories HTTP/1.1
Host: headless.tebex.io
Accept: */*
200

Successful response returns a list of category information.

{
  "data": [
    {
      "id": 2678660,
      "name": "Packages",
      "slug": "packages",
      "parent": null,
      "tiered": false,
      "active_tier": null,
      "description": "<p>Packages category.</p>",
      "order": 1,
      "display_type": "list",
      "image_url": null,
      "dynamic": false
    }
  ]
}

Gets all categories and packages

get

Gets all categories from a webstore including packages.

Responses
200

Successful response returns a list of category information.

application/json
get/categories?includePackages=1
GET /api/accounts/YOUR_PUBLIC_TOKEN/categories?includePackages=1 HTTP/1.1
Host: headless.tebex.io
Accept: */*
200

Successful response returns a list of category information.

{
  "data": [
    {
      "id": 2678660,
      "name": "Packages",
      "slug": "packages",
      "parent": null,
      "tiered": false,
      "active_tier": null,
      "description": "<p>Packages category.</p>",
      "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": null,
          "discount": 0,
          "disable_quantity": false,
          "disable_gifting": false,
          "expiration_date": null,
          "media": [
            {
              "type": "image",
              "name": "e875d1010b2edb7f8c376728ab9dedfffe5bd012.jpg",
              "url": "https://dunb17ur4ymx4.cloudfront.net/packages/images/e875d1010b2edb7f8c376728ab9dedfffe5bd012.jpg",
              "featured": false,
              "primary": true
            }
          ],
          "order": 0,
          "slug": "test-package-101",
          "user_limit": 0,
          "creator_meta_data": {},
          "options": [],
          "variables": [],
          "created_at": "2024-05-21T18:09:17+00:00",
          "updated_at": "2024-05-21T18:09:17+00:00",
          "ident": "pkg_2678660_6276316",
          "vip_status": null
        }
      ],
      "order": 1,
      "display_type": "list",
      "image_url": null,
      "dynamic": false
    }
  ]
}

Get user's tiered categories

get

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

Authorizations
AuthorizationstringRequired
Path parameters
usernameIdintegerRequiredExample: 76561198042467020
Responses
200

Successful response returns a list of category information.

application/json
get/categories?usernameId={usernameId}&includePackages=1
GET /api/accounts/YOUR_PUBLIC_TOKEN/categories?usernameId={usernameId}&includePackages=1 HTTP/1.1
Host: headless.tebex.io
Authorization: Basic username:password
Accept: */*
200

Successful response returns a list of category information.

{
  "data": [
    {
      "id": 2678661,
      "name": "Ranks",
      "slug": "ranks",
      "parent": null,
      "tiered": true,
      "active_tier": {
        "id": 40796,
        "created_at": "2025-05-14T13:48:56.000000Z",
        "username_id": "76561198042467022",
        "package": {
          "id": 6834821,
          "name": "Silver"
        },
        "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": null
      },
      "description": "<p>Ranks category.</p>",
      "packages": [
        {
          "id": 6834821,
          "name": "Silver",
          "description": "<p>Silver tier.</p>",
          "image": null,
          "type": "subscription",
          "category": {
            "id": 2678661,
            "name": "Ranks"
          },
          "base_price": 10,
          "sales_tax": 0,
          "total_price": 10,
          "currency": "USD",
          "prorate_price": null,
          "discount": 0,
          "disable_quantity": true,
          "disable_gifting": false,
          "expiration_date": null,
          "media": [],
          "order": 0,
          "slug": "silver",
          "user_limit": 0,
          "creator_meta_data": {},
          "options": [],
          "variables": [],
          "created_at": "2025-05-14T13:48:56+00:00",
          "updated_at": "2025-05-14T13:48:56+00:00",
          "ident": "pkg_2678661_6834821",
          "vip_status": null
        }
      ],
      "order": 1,
      "display_type": "list",
      "image_url": null,
      "dynamic": false
    }
  ]
}

Get Dynamic Categories

get

Gets all categories from a webstore including packages. When basketIdent is provided, dynamic categories are populated with the packages associated with that basket.

If a basket identifier is not provided, dynamic categories will be empty as the basket is required to relate packages to the category.

Path parameters
basketIdentstringRequired

The basket identifier.

Example: c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2c
Responses
200

Successful response returns a list of category information.

application/json
get/categories?includePackages=1&basketIdent={basketIdent}
GET /api/accounts/YOUR_PUBLIC_TOKEN/categories?includePackages=1&basketIdent={basketIdent} HTTP/1.1
Host: headless.tebex.io
Accept: */*
200

Successful response returns a list of category information.

{
  "data": [
    {
      "id": 2678660,
      "name": "Packages",
      "slug": "packages",
      "parent": null,
      "tiered": false,
      "active_tier": null,
      "description": "<p>Packages category.</p>",
      "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": null,
          "discount": 0,
          "disable_quantity": false,
          "disable_gifting": false,
          "expiration_date": null,
          "media": [
            {
              "type": "image",
              "name": "e875d1010b2edb7f8c376728ab9dedfffe5bd012.jpg",
              "url": "https://dunb17ur4ymx4.cloudfront.net/packages/images/e875d1010b2edb7f8c376728ab9dedfffe5bd012.jpg",
              "featured": false,
              "primary": true
            }
          ],
          "order": 0,
          "slug": "test-package-101",
          "user_limit": 0,
          "creator_meta_data": {},
          "options": [],
          "variables": [],
          "created_at": "2024-05-21T18:09:17+00:00",
          "updated_at": "2024-05-21T18:09:17+00:00",
          "ident": "pkg_2678660_6276316",
          "vip_status": null
        }
      ],
      "order": 1,
      "display_type": "list",
      "image_url": null,
      "dynamic": false
    },
    {
      "id": 2678662,
      "name": "Dynamic",
      "slug": "dynamic",
      "parent": null,
      "tiered": false,
      "active_tier": null,
      "description": "<p>Dynamic category.</p>",
      "packages": [
        {
          "id": 1,
          "name": "Package Name 1",
          "description": "This is the description",
          "image": "image.url/imageurl",
          "type": "single",
          "category": {
            "id": 2678662,
            "name": "Dynamic"
          },
          "base_price": 10,
          "sales_tax": 0,
          "total_price": 10,
          "currency": "USD",
          "prorate_price": null,
          "discount": 0,
          "disable_quantity": false,
          "disable_gifting": false,
          "expiration_date": null,
          "media": [],
          "order": 0,
          "slug": "package-name-1",
          "user_limit": 0,
          "creator_meta_data": {},
          "options": [],
          "variables": [],
          "created_at": "2024-05-21T18:09:17+00:00",
          "updated_at": "2024-05-21T18:09:17+00:00",
          "ident": "pkg_2678662_1",
          "vip_status": null
        }
      ],
      "order": 1,
      "display_type": "list",
      "image_url": null,
      "dynamic": true
    }
  ]
}

Get specific category

get

Gets information about a category and returns the packages in that category.

Path parameters
categoryIdstringRequired

The ID or slug of the category to fetch.

Example: 127244343
Responses
200

Successful response returns the category without package information.

application/json
get/categories/{categoryId}
GET /api/accounts/YOUR_PUBLIC_TOKEN/categories/{categoryId} HTTP/1.1
Host: headless.tebex.io
Accept: */*
200

Successful response returns the category without package information.

{
  "data": {
    "id": 2678660,
    "name": "Packages",
    "slug": "packages",
    "parent": null,
    "tiered": false,
    "active_tier": null,
    "description": "<p>Packages category.</p>",
    "order": 1,
    "display_type": "list",
    "image_url": null,
    "dynamic": false
  }
}

Get a category with all packages

get

Gets information about a category and returns the packages in that category.

Path parameters
categoryIdstringRequired

The ID or slug of the category to fetch.

Example: 127244343
Responses
200

Successful response returns the category with package information.

application/json
get/categories/{categoryId}?includePackages=1
GET /api/accounts/YOUR_PUBLIC_TOKEN/categories/{categoryId}?includePackages=1 HTTP/1.1
Host: headless.tebex.io
Accept: */*
200

Successful response returns the category with package information.

{
  "data": {
    "id": 2678660,
    "name": "Packages",
    "slug": "packages",
    "parent": null,
    "tiered": false,
    "active_tier": null,
    "description": "<p>Packages category.</p>",
    "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": null,
        "discount": 0,
        "disable_quantity": false,
        "disable_gifting": false,
        "expiration_date": null,
        "media": [
          {
            "type": "image",
            "name": "e875d1010b2edb7f8c376728ab9dedfffe5bd012.jpg",
            "url": "https://dunb17ur4ymx4.cloudfront.net/packages/images/e875d1010b2edb7f8c376728ab9dedfffe5bd012.jpg",
            "featured": false,
            "primary": true
          }
        ],
        "order": 0,
        "slug": "test-package-101",
        "user_limit": 0,
        "creator_meta_data": {},
        "options": [],
        "variables": [],
        "created_at": "2024-05-21T18:09:17+00:00",
        "updated_at": "2024-05-21T18:09:17+00:00",
        "ident": "pkg_2678660_6276316",
        "vip_status": null
      }
    ],
    "order": 1,
    "display_type": "list",
    "image_url": null,
    "dynamic": false
  }
}

Gets a specific category including packages, populating a dynamic category for the given basket.

get

Gets information about a category and returns the packages in that category. When the category is dynamic and basketIdent is provided, the category is populated with the packages associated with that basket.

If a basket identifier is not provided, a dynamic category will be empty as the basket is required to relate packages to the category.

Path parameters
categoryIdstringRequired

The ID or slug of the category to fetch.

Example: 1234
basketIdentstringRequired

The basket identifier.

Example: c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2c
Responses
200

Successful response returns the category with package information.

application/json
get/categories/{categoryId}?includePackages=1&basketIdent={basketIdent}
GET /api/accounts/YOUR_PUBLIC_TOKEN/categories/{categoryId}?includePackages=1&basketIdent={basketIdent} HTTP/1.1
Host: headless.tebex.io
Accept: */*
200

Successful response returns the category with package information.

{
  "data": {
    "id": 2678662,
    "name": "Dynamic",
    "slug": "dynamic",
    "parent": null,
    "tiered": false,
    "active_tier": null,
    "description": "<p>Dynamic category.</p>",
    "packages": [
      {
        "id": 1,
        "name": "Package Name 1",
        "description": "This is the description",
        "image": "image.url/imageurl",
        "type": "single",
        "category": {
          "id": 2678662,
          "name": "Dynamic"
        },
        "base_price": 10,
        "sales_tax": 0,
        "total_price": 10,
        "currency": "USD",
        "prorate_price": null,
        "discount": 0,
        "disable_quantity": false,
        "disable_gifting": false,
        "expiration_date": null,
        "media": [],
        "order": 0,
        "slug": "package-name-1",
        "user_limit": 0,
        "creator_meta_data": {},
        "options": [],
        "variables": [],
        "created_at": "2024-05-21T18:09:17+00:00",
        "updated_at": "2024-05-21T18:09:17+00:00",
        "ident": "pkg_2678662_1",
        "vip_status": null
      }
    ],
    "order": 1,
    "display_type": "list",
    "image_url": null,
    "dynamic": true
  }
}

Get package

get

Gets a package from a webstore by its ident or numeric ID.

  • Using ident is recommended, since it works for every package type. Send it back exactly as returned; don't build or parse it.

  • id stays numeric for standard packages. For external packages id is synthetic, so always use ident.

Note: this endpoint does not support packages belonging to dynamic categories. Use the category endpoints with includePackages=1 and basketIdent to fetch dynamic packages.

Path parameters
packageIdstringRequired

The package's ident (recommended, e.g. pkg_12_456) or numeric ID.

Example: 1272441812
Responses
200

Successful response returns the package information.

application/json
get/packages/{packageId}
GET /api/accounts/YOUR_PUBLIC_TOKEN/packages/{packageId} HTTP/1.1
Host: headless.tebex.io
Accept: */*
200

Successful response returns the package information.

{
  "data": {
    "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,
    "media": [],
    "order": 1,
    "slug": "text",
    "user_limit": 1,
    "creator_meta_data": {},
    "options": [
      "text"
    ],
    "variables": [
      "text"
    ],
    "created_at": "2024-05-21T18:09:17+00:00",
    "updated_at": "2024-05-21T18:09:17+00:00",
    "ident": "pkg_12_456",
    "vip_status": null
  }
}

Get all packages

get

Gets all packages from a webstore.

Note: this endpoint does not support packages belonging to dynamic categories. Use the category endpoints with includePackages=1 and basketIdent to fetch dynamic packages.

Responses
200

Successful response returns a list of package information.

application/json
get/packages
GET /api/accounts/YOUR_PUBLIC_TOKEN/packages HTTP/1.1
Host: headless.tebex.io
Accept: */*
200

Successful response returns a list of package information.

{
  "data": [
    {
      "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": null,
      "discount": 0,
      "disable_quantity": false,
      "disable_gifting": false,
      "expiration_date": null,
      "media": [
        {
          "type": "image",
          "name": "e875d1010b2edb7f8c376728ab9dedfffe5bd012.jpg",
          "url": "https://dunb17ur4ymx4.cloudfront.net/packages/images/e875d1010b2edb7f8c376728ab9dedfffe5bd012.jpg",
          "featured": false,
          "primary": true
        }
      ],
      "order": 0,
      "slug": "test-package-101",
      "user_limit": 0,
      "creator_meta_data": {},
      "options": [],
      "variables": [],
      "created_at": "2024-05-21T18:09:17+00:00",
      "updated_at": "2024-05-21T18:09:17+00:00",
      "ident": "pkg_2678660_6276316",
      "vip_status": null
    }
  ]
}

Get packages

get

Gets all packages from a webstore.

Authorizations
AuthorizationstringRequired
Path parameters
ipAddressstringRequired

An IP address can be provided with authenticated requests

Example: 127.0.0.1
Responses
200

Successful response returns a list of package information.

application/json
get/packages?ipAddress={ipAddress}
GET /api/accounts/YOUR_PUBLIC_TOKEN/packages?ipAddress={ipAddress} HTTP/1.1
Host: headless.tebex.io
Authorization: Basic username:password
Accept: */*
{
  "data": [
    {
      "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": null,
      "discount": 0,
      "disable_quantity": false,
      "disable_gifting": false,
      "expiration_date": null,
      "media": [
        {
          "type": "image",
          "name": "e875d1010b2edb7f8c376728ab9dedfffe5bd012.jpg",
          "url": "https://dunb17ur4ymx4.cloudfront.net/packages/images/e875d1010b2edb7f8c376728ab9dedfffe5bd012.jpg",
          "featured": false,
          "primary": true
        }
      ],
      "order": 0,
      "slug": "test-package-101",
      "user_limit": 0,
      "creator_meta_data": {},
      "options": [],
      "variables": [],
      "created_at": "2024-05-21T18:09:17+00:00",
      "updated_at": "2024-05-21T18:09:17+00:00",
      "ident": "pkg_2678660_6276316",
      "vip_status": null
    }
  ]
}

Get packages available for basket

get

Gets all packages available to the provided basket.

Path parameters
basketIdentstringRequired

The basket identifier.

Example: c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2c
Responses
200

Successful response returns a list of package information.

application/json
get/packages?basketIdent={basketIdent}
GET /api/accounts/YOUR_PUBLIC_TOKEN/packages?basketIdent={basketIdent} HTTP/1.1
Host: headless.tebex.io
Accept: */*
{
  "data": [
    {
      "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": null,
      "discount": 0,
      "disable_quantity": false,
      "disable_gifting": false,
      "expiration_date": null,
      "media": [
        {
          "type": "image",
          "name": "e875d1010b2edb7f8c376728ab9dedfffe5bd012.jpg",
          "url": "https://dunb17ur4ymx4.cloudfront.net/packages/images/e875d1010b2edb7f8c376728ab9dedfffe5bd012.jpg",
          "featured": false,
          "primary": true
        }
      ],
      "order": 0,
      "slug": "test-package-101",
      "user_limit": 0,
      "creator_meta_data": {},
      "options": [],
      "variables": [],
      "created_at": "2024-05-21T18:09:17+00:00",
      "updated_at": "2024-05-21T18:09:17+00:00",
      "ident": "pkg_2678660_6276316",
      "vip_status": null
    }
  ]
}

Get packages available for IP and basket

get

Gets all packages from a webstore.

Authorizations
AuthorizationstringRequired
Path parameters
basketIdentstringRequired

The basket identifier.

Example: c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2c
ipAddressstringRequired

An IP address can be provided with authenticated requests.

Example: 127.0.0.1
Responses
200

Successful response returns a list of package information.

application/json
get/packages?ipAddress={ipAddress}&basketIdent={basketIdent}
GET /api/accounts/YOUR_PUBLIC_TOKEN/packages?ipAddress={ipAddress}&basketIdent={basketIdent} HTTP/1.1
Host: headless.tebex.io
Authorization: Basic username:password
Accept: */*
{
  "data": [
    {
      "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": null,
      "discount": 0,
      "disable_quantity": false,
      "disable_gifting": false,
      "expiration_date": null,
      "media": [
        {
          "type": "image",
          "name": "e875d1010b2edb7f8c376728ab9dedfffe5bd012.jpg",
          "url": "https://dunb17ur4ymx4.cloudfront.net/packages/images/e875d1010b2edb7f8c376728ab9dedfffe5bd012.jpg",
          "featured": false,
          "primary": true
        }
      ],
      "order": 0,
      "slug": "test-package-101",
      "user_limit": 0,
      "creator_meta_data": {},
      "options": [],
      "variables": [],
      "created_at": "2024-05-21T18:09:17+00:00",
      "updated_at": "2024-05-21T18:09:17+00:00",
      "ident": "pkg_2678660_6276316",
      "vip_status": null
    }
  ]
}

Apply a creator code

post

Applies a creator code to a basket.

Path parameters
basketIdentstringRequired

The basket identifier.

Example: c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2c
Body
creator_codestringOptionalExample: Academy10
Responses
200

Successful response returns a success object

application/json
successbooleanOptionalExample: true
messagestringOptionalExample: Creator code applied successfully
post/baskets/{basketIdent}/creator-codes
POST /api/accounts/YOUR_PUBLIC_TOKEN/baskets/{basketIdent}/creator-codes HTTP/1.1
Host: headless.tebex.io
Content-Type: application/json
Accept: */*
Content-Length: 28

{
  "creator_code": "Academy10"
}
{
  "success": true,
  "message": "Creator code applied successfully"
}

Removes the creator code from the basket.

post

Removes the creator code from the basket.

Path parameters
basketIdentstringRequired

The basket identifier.

Example: c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2c
Responses
200

Creator code removed successfully.

No content

post/baskets/{basketIdent}/creator-codes/remove
POST /api/accounts/YOUR_PUBLIC_TOKEN/baskets/{basketIdent}/creator-codes/remove HTTP/1.1
Host: headless.tebex.io
Accept: */*

No content

Apply a gift card

post

Applies a gift card to the basket.

Path parameters
basketIdentstringRequired

The basket identifier.

Example: c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2c
Body
card_numberstringOptionalExample: 0127 0244 7210 1111
Responses
200

Successful response returns a success message.

application/json
successbooleanOptionalExample: true
messagestringOptionalExample: Gift card applied successfully
post/baskets/{basketIdent}/giftcards
POST /api/accounts/YOUR_PUBLIC_TOKEN/baskets/{basketIdent}/giftcards HTTP/1.1
Host: headless.tebex.io
Content-Type: application/json
Accept: */*
Content-Length: 37

{
  "card_number": "0127 0244 7210 1111"
}
200

Successful response returns a success message.

{
  "success": true,
  "message": "Gift card applied successfully"
}

Remove a gift card from the basket.

post

Removes a gift card from the basket.

Path parameters
basketIdentstringRequired

The basket identifier.

Example: c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2c
Body
card_numberstringOptionalExample: 0127 0244 7210 1111
Responses
200

Gift card removed successfully.

No content

post/baskets/{basketIdent}/giftcards/remove
POST /api/accounts/YOUR_PUBLIC_TOKEN/baskets/{basketIdent}/giftcards/remove HTTP/1.1
Host: headless.tebex.io
Content-Type: application/json
Accept: */*
Content-Length: 37

{
  "card_number": "0127 0244 7210 1111"
}

No content

Apply a coupon

post

Applies a coupon to a basket.

Path parameters
basketIdentstringRequired

The basket identifier.

Example: c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2c
Body
coupon_codestringOptionalExample: Academy10
Responses
200

Successful response returns a success message.

application/json
successbooleanOptionalExample: true
messagestringOptionalExample: Coupon applied successfully
post/baskets/{basketIdent}/coupons
POST /api/accounts/YOUR_PUBLIC_TOKEN/baskets/{basketIdent}/coupons HTTP/1.1
Host: headless.tebex.io
Content-Type: application/json
Accept: */*
Content-Length: 27

{
  "coupon_code": "Academy10"
}
200

Successful response returns a success message.

{
  "success": true,
  "message": "Coupon applied successfully"
}

Remove a coupon from the basket.

post

Removes a coupon code from a basket

Path parameters
basketIdentstringRequired

The basket identifier.

Example: c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2c
Body
coupon_codestringOptionalExample: Academy10
Responses
200

Successful response.

No content

post/baskets/{basketIdent}/coupons/remove
POST /api/accounts/YOUR_PUBLIC_TOKEN/baskets/{basketIdent}/coupons/remove HTTP/1.1
Host: headless.tebex.io
Content-Type: application/json
Accept: */*
Content-Length: 27

{
  "coupon_code": "Academy10"
}

No content

Add package to basket

post

Add a package to the basket by its ident or numeric ID.

  • Using ident is recommended, since it works for every package type. It is required for external packages.

  • Numeric IDs still work for standard packages.

To add a package belonging to a dynamic category, set dynamic to true. Without this property the API will treat the request as a normal package ID.

Path parameters
basketIdentstringRequired

The basket identifier.

Example: c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2c
Body
package_idstringRequired

The package's ident (recommended) or numeric ID. ident is required for external packages. Send the ident exactly as returned by the package endpoints.

Example: pkg_12_456
quantityintegerRequiredExample: 1
dynamicbooleanOptional

Set to true when adding a package that belongs to a dynamic category. When omitted, the API acts as if a normal package ID was provided.

Example: false
Responses
200

Successful response.

application/json
post/{basketIdent}/packages
POST /api/baskets/{basketIdent}/packages HTTP/1.1
Host: headless.tebex.io
Content-Type: application/json
Accept: */*
Content-Length: 56

{
  "package_id": "pkg_12_456",
  "quantity": 1,
  "dynamic": false
}
{
  "data": {
    "id": 244127617,
    "ident": "1a-55fff4107740a1f40d844ff89607557f45bfafb3",
    "complete": false,
    "email": "support@tebex.io",
    "username": null,
    "coupons": [],
    "giftcards": [],
    "creator_code": "text",
    "cancel_url": "https://tebex.io",
    "complete_url": null,
    "complete_auto_redirect": false,
    "country": "US",
    "ip": "127.0.0.1",
    "username_id": 127244,
    "base_price": 1.27,
    "sales_tax": 0.11,
    "total_price": 1.38,
    "currency": "USD",
    "packages": [],
    "custom": {
      "foo": "bar",
      "ref": 1234
    },
    "links": {
      "payment": "https://checkout.tebex.io/api/payments/tbx-12345",
      "checkout": "https://checkout.tebex.io/checkout/1a-55fff4107740a1f40d844ff89607557f45bfafb3"
    }
  }
}

Remove a package from a basket

post

Remove a package from the basket by its ident or numeric ID.

  • Using ident is recommended, since it works for every package type. Send it back exactly as returned; don't build or parse it.

  • Numeric IDs still work for standard packages.

Path parameters
basketIdentstringRequired

The basket identifier.

Example: c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2c
Body
package_idstringOptional

The package's ident (recommended) or numeric ID.

Example: pkg_12_456
Responses
200

Successful response returns the basket.

application/json
post/{basketIdent}/packages/remove
POST /api/baskets/{basketIdent}/packages/remove HTTP/1.1
Host: headless.tebex.io
Content-Type: application/json
Accept: */*
Content-Length: 27

{
  "package_id": "pkg_12_456"
}
{
  "data": {
    "id": 244127617,
    "ident": "1a-55fff4107740a1f40d844ff89607557f45bfafb3",
    "complete": false,
    "email": "support@tebex.io",
    "username": null,
    "coupons": [],
    "giftcards": [],
    "creator_code": "text",
    "cancel_url": "https://tebex.io",
    "complete_url": null,
    "complete_auto_redirect": false,
    "country": "US",
    "ip": "127.0.0.1",
    "username_id": 127244,
    "base_price": 1.27,
    "sales_tax": 0.11,
    "total_price": 1.38,
    "currency": "USD",
    "packages": [],
    "custom": {
      "foo": "bar",
      "ref": 1234
    },
    "links": {
      "payment": "https://checkout.tebex.io/api/payments/tbx-12345",
      "checkout": "https://checkout.tebex.io/checkout/1a-55fff4107740a1f40d844ff89607557f45bfafb3"
    }
  }
}

Update package quantity

put

Sets the quantity of the given item in the basket. The user must be logged in before the quantity can be changed.

  • {packageId} accepts the package's ident or numeric ID. Using ident is recommended, since it works for every package type.

  • Numeric IDs still work for standard packages.

Path parameters
basketIdentstringRequired

The basket identifier.

Example: c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2c
packageIdstringRequired

The package's ident (recommended) or numeric ID.

Example: pkg_12_456
Body
quantityintegerOptionalExample: 1
Responses
200

Successful response.

No content

put/{basketIdent}/packages/{packageId}
PUT /api/baskets/{basketIdent}/packages/{packageId} HTTP/1.1
Host: headless.tebex.io
Content-Type: application/json
Accept: */*
Content-Length: 14

{
  "quantity": 1
}

No content

Update user's tier to a new package

patch

Updates a tier to a new package. A recurring payment updated webhook is sent when an update is successful.

Authorizations
AuthorizationstringRequired
Path parameters
tierIdintegerRequired

The tier identifier

Example: 6276316
Body
package_idintegerOptionalExample: 6834822
Responses
200

Successful response.

application/json
successbooleanOptionalExample: true
messagestringOptionalExample: Tier successfully upgraded, please allow a few moments for your changes to take effect.
patch/tiers/{tierId}
PATCH /api/accounts/YOUR_PUBLIC_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."
}

Retrieves the available sidebar modules.

get

Retrieves the available sidebar modules configured for the store.

Path parameters
tokenstringRequired

The webstore identifier.

Example: some-uuid
Responses
200

Successful response.

application/json
get/sidebar
GET /api/accounts/YOUR_PUBLIC_TOKEN/sidebar HTTP/1.1
Host: headless.tebex.io
Accept: */*
200

Successful response.

{
  "data": [
    {
      "id": 1,
      "type": null,
      "start_time": "2026-01-01T00:00:00.000Z",
      "end_time": "2026-01-01T00:00:00.000Z",
      "data": {
        "header": "Top Customer",
        "username": "Test",
        "username_id": "d8d5a9237b2043d8883b1150148d6955",
        "total": 1
      }
    }
  ]
}

Last updated