Installation
From NPM
Tebex.js is available as an NPM package, which you can install using your preferred JS package manager:
npm install @tebexio/tebex.jsThe Tebex object can then be imported into your code like so:
import Tebex from "@tebexio/tebex.js";From Our CDN
Alternatively, we also provide Tebex.js via our own CDN, which you can add as a script within the <head> tag of your website:
<script defer src="https://js.tebex.io/v/1.js"></script>When installing Tebex.js this way, the Tebex object will become available globally on the window object.
We recommend using defer on the script to prevent it from blocking your website's initial page render, but when doing do, it's important to wait for the page load event before you begin configuring the checkout or payment portal:
<script>
addEventListener("load", function() {
// Configure Tebex.js here
});
</script>Next Steps
The Tebex object provides the following APIs:
Tebex.checkout- for allowing customers to make purchases without leaving your website.Tebex.portal- for allowing existing customers to review their purchase history and subscriptions without leaving your website.
Last updated
Was this helpful?

