Endpoints
All endpoints for Headless API: for specific implementation guides see Guides
Gets the webstore associated with the provided token
Successful response returns the webstore's information.
Wrapped webstore information in a "data" object.
GET /api/accounts/YOUR_PUBLIC_TOKEN/ HTTP/1.1
Host: headless.tebex.io
Accept: */*
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
}
}Gets a list of custom pages associated with the webstore. These contain a content variable with the HTML content of the page.
Successful response returns the webstore's pages.
GET /api/accounts/YOUR_PUBLIC_TOKEN/pages HTTP/1.1
Host: headless.tebex.io
Accept: */*
Successful response returns the webstore's pages.
{
"data": []
}Gets a basket associated with the provided identifier.
The basket identifier.
c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2cSuccessful response returns the basket information.
GET /api/accounts/YOUR_PUBLIC_TOKEN/baskets/{basketIdent} HTTP/1.1
Host: headless.tebex.io
Accept: */*
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"
}
}
}Creates a new basket for use during checkout.
A URL the user can return to when checkout is completed.
https://example.tebex.io/thank-youA URL the user can return to when cancelling checkout.
https://tebex.io/Custom data you wish to associate with the basket. This data will be included with webhook responses and GET requests associated with the Basket.
{"foo":"bar"}True if the user should automatically be redirected to the relevant complete/cancel URL
trueSuccessful response returns the basket information.
The provided webstore ID is invalid.
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"
}
}
}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.
The basket identifier.
c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2cThe URL you would like to redirect the user to after successful basket authentication.
https://example.tebex.io/Successful response returns the auth provider options and URLs of the sign-in link.
FiveMhttps://ident.tebex.io/The provided webstore ID or basket ID is invalid.
GET /api/accounts/YOUR_PUBLIC_TOKEN/baskets/{basketIdent}/auth?returnUrl={returnUrl} HTTP/1.1
Host: headless.tebex.io
Accept: */*
[]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.
The basket identifier.
c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2cThe basket's ident. Use the same value as the basketIdent path parameter.
dvcbln-d7f6355161726d63e6dbe235ca25d2641184295bThe username of the authenticated customer the packages are being created for.
TestUserThe ID of the dynamic category to populate. Must be a category of type dynamic.
1234Successful response confirms the dynamic packages were created.
Dynamic packages updated successfully.The request is invalid. The error response will include detail as to which parameter failed validation. This is also returned when basic auth credentials are missing ("Basic auth credentials are required") or when category_id is not a dynamic category ("The specified category is not a dynamic category.").
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."
}Gets all categories from a webstore. This does not include package information. To include package information, add ?includePackages=1 to the URL.
Successful response returns a list of category information.
GET /api/accounts/YOUR_PUBLIC_TOKEN/categories HTTP/1.1
Host: headless.tebex.io
Accept: */*
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 from a webstore including packages.
Successful response returns a list of category information.
GET /api/accounts/YOUR_PUBLIC_TOKEN/categories?includePackages=1 HTTP/1.1
Host: headless.tebex.io
Accept: */*
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
}
]
}Gets all categories from the webstore, returning active tier information for the given player.
76561198042467020Successful response returns a list of category information.
GET /api/accounts/YOUR_PUBLIC_TOKEN/categories?usernameId={usernameId}&includePackages=1 HTTP/1.1
Host: headless.tebex.io
Authorization: Basic username:password
Accept: */*
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
}
]
}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.
The basket identifier.
c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2cSuccessful response returns a list of category information.
GET /api/accounts/YOUR_PUBLIC_TOKEN/categories?includePackages=1&basketIdent={basketIdent} HTTP/1.1
Host: headless.tebex.io
Accept: */*
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
}
]
}Gets information about a category and returns the packages in that category.
The ID or slug of the category to fetch.
127244343Successful response returns the category without package information.
GET /api/accounts/YOUR_PUBLIC_TOKEN/categories/{categoryId} HTTP/1.1
Host: headless.tebex.io
Accept: */*
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
}
}Gets information about a category and returns the packages in that category.
The ID or slug of the category to fetch.
127244343Successful response returns the category with package information.
GET /api/accounts/YOUR_PUBLIC_TOKEN/categories/{categoryId}?includePackages=1 HTTP/1.1
Host: headless.tebex.io
Accept: */*
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 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.
The ID or slug of the category to fetch.
1234The basket identifier.
c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2cSuccessful response returns the category with package information.
GET /api/accounts/YOUR_PUBLIC_TOKEN/categories/{categoryId}?includePackages=1&basketIdent={basketIdent} HTTP/1.1
Host: headless.tebex.io
Accept: */*
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
}
}Gets a package from a webstore by its ident or numeric ID.
Using
identis recommended, since it works for every package type. Send it back exactly as returned; don't build or parse it.idstays numeric for standard packages. For external packagesidis synthetic, so always useident.
Note: this endpoint does not support packages belonging to dynamic categories. Use the category endpoints with includePackages=1 and basketIdent to fetch dynamic packages.
The package's ident (recommended, e.g. pkg_12_456) or numeric ID.
1272441812Successful response returns the package information.
GET /api/accounts/YOUR_PUBLIC_TOKEN/packages/{packageId} HTTP/1.1
Host: headless.tebex.io
Accept: */*
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
}
}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.
Successful response returns a list of package information.
GET /api/accounts/YOUR_PUBLIC_TOKEN/packages HTTP/1.1
Host: headless.tebex.io
Accept: */*
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
}
]
}Gets all packages from a webstore.
An IP address can be provided with authenticated requests
127.0.0.1Successful response returns a list of package information.
The provided request is invalid.
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
}
]
}Gets all packages available to the provided basket.
The basket identifier.
c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2cSuccessful response returns a list of package information.
The provided request is invalid.
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
}
]
}Gets all packages from a webstore.
The basket identifier.
c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2cAn IP address can be provided with authenticated requests.
127.0.0.1Successful response returns a list of package information.
The provided request is invalid.
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
}
]
}Applies a creator code to a basket.
The basket identifier.
c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2cAcademy10Successful response returns a success object
trueCreator code applied successfullyThe provided request is invalid. The error response will include detail as to which parameter failed validation.
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.
The basket identifier.
c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2cCreator code removed successfully.
No content
The provided request is invalid. The error response will include detail as to which parameter failed validation.
POST /api/accounts/YOUR_PUBLIC_TOKEN/baskets/{basketIdent}/creator-codes/remove HTTP/1.1
Host: headless.tebex.io
Accept: */*
No content
Applies a gift card to the basket.
The basket identifier.
c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2c0127 0244 7210 1111Successful response returns a success message.
trueGift card applied successfullyPOST /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"
}Successful response returns a success message.
{
"success": true,
"message": "Gift card applied successfully"
}Removes a gift card from the basket.
The basket identifier.
c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2c0127 0244 7210 1111Gift card removed successfully.
No content
The provided request is invalid. The error response will include detail as to which parameter failed validation.
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
Applies a coupon to a basket.
The basket identifier.
c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2cAcademy10Successful response returns a success message.
trueCoupon applied successfullyPOST /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"
}Successful response returns a success message.
{
"success": true,
"message": "Coupon applied successfully"
}Removes a coupon code from a basket
The basket identifier.
c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2cAcademy10Successful response.
No content
The provided request is invalid. The error response will include detail as to which parameter failed validation.
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 a package to the basket by its ident or numeric ID.
Using
identis 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.
The basket identifier.
c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2cThe package's ident (recommended) or numeric ID. ident is required for external packages. Send the ident exactly as returned by the package endpoints.
pkg_12_4561Set 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.
falseSuccessful response.
The ident is unknown or does not match a package in this store ("The selected id is invalid.").
The provided request is invalid. The error response will include detail as to which parameter failed validation. A malformed package_id fails with "package_id must be a package ID or ident."
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 the basket by its ident or numeric ID.
Using
identis 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.
The basket identifier.
c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2cThe package's ident (recommended) or numeric ID.
pkg_12_456Successful response returns the basket.
The provided request is invalid. The error response will include detail as to which parameter failed validation.
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"
}
}
}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'sidentor numeric ID. Usingidentis recommended, since it works for every package type.Numeric IDs still work for standard packages.
The basket identifier.
c00244-d2ac2e77418a55b25292a6bc7a719ad9c529ba2cThe package's ident (recommended) or numeric ID.
pkg_12_4561Successful response.
No content
The provided request is invalid. The error response will include detail as to which parameter failed validation.
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
Updates a tier to a new package. A recurring payment updated webhook is sent when an update is successful.
The tier identifier
62763166834822Successful response.
trueTier successfully upgraded, please allow a few moments for your changes to take effect.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
}Successful response.
{
"success": true,
"message": "Tier successfully upgraded, please allow a few moments for your changes to take effect."
}Retrieves the available sidebar modules configured for the store.
The webstore identifier.
some-uuidSuccessful response.
GET /api/accounts/YOUR_PUBLIC_TOKEN/sidebar HTTP/1.1
Host: headless.tebex.io
Accept: */*
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

