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
  • Headless API
    • Overview
    • Getting Your Listings
    • Creating a Basket
    • Adding Packages
    • Gifting Packages
    • Applying Discounts / Creator Codes
    • Directing to Checkout
    • 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
  • Authorization
  • Content Type
  • Example

Was this helpful?

Export as PDF
  1. Checkout API

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
PreviousOverviewNextStart the Checkout Process

Last updated 11 months ago

Was this helpful?

Your Project ID (you can get this from )

Your Private Key (you can get this from )

https://creator.tebex.io/developers/api-keys
https://creator.tebex.io/developers/api-keys