Headers and Authentication

As a creator using Checkout API, you must authenticate directly with the API as opposed to individual customers authenticating.

Authorization

We use HTTP BASIC for authorization, and all requests are made over HTTPS so that your credentials are protected.

Username (Project ID)

Password (Private Key)

Your store's Private Key should never be shared publicly. If your key is ever compromised, it can be reset in your Webstore panel.

Content Type

All requests use application/json as the Content-Type. Ensure this is set with all requests to our Checkout API.

Example

const url = "https://checkout.tebex.io/api/checkout";

const headers = new Headers();
headers.append('Authorization', 'Basic ' + btoa(username + ':' + password));
headers.append('Content-Type', 'application/json');

const options = {
        method: 'POST', // Use 'GET', 'POST', 'PUT', etc. as needed
        headers: headers
};

const response = await fetch(url, options);
// etc

Last updated