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
  • Deliverable Types and Variable Data
  • Gift Card
  • Discord Action
  • Game Server Commands
  • Custom Data
  • Specifying the Package's Game Server

Was this helpful?

Export as PDF
  1. Headless API

Adding Packages

When adding packages, there may be certain Variables associated with them. These can be filled by providing a variable_data object.

"variable_data": {
    "variable_identifier": "value"
}

Deliverable Types and Variable Data

Gift Card

Packages that deliver a gift card to the user should include giftcard_to mapped to the e-mail address that will receive the gift card:

{
    "package_id": "6276316",
    "quantity": 1,
    "variable_data": {
        "giftcard_to": "tebex-integrations@overwolf.com"
    }
}

Discord Action

Packages that deliver Discord actions should include the user's discord_id:

{
    "package_id": "6276316",
    "quantity": 1,
    "variable_data": {
        "discord_id": "000000000000000000"
    }
}

Game Server Commands

Packages that deliver game server commands should include the username_id of the user, dependent on your store type.

You can get the username_id after creating the basket if you provide the player's username at the time of creation. See Creating a Basket for specific details on Game Servers.

{
    "package_id": "6276316",
    "quantity": 1,
    "variable_data": {
        "username_id": "9e65a968ee4743d19a2a4c9969154491"
    }
}

Custom Data

You can also provide custom data when adding packages which can be referenced by the seller as part of the transaction.

{
    "package_id": "6276316",
    "quantity": 1,
    "variable_data": {
        "username_id": "9e65a968ee4743d19a2a4c9969154491"
    },
    "custom": {
        "key": "value"
    }
}

Specifying the Package's Game Server

If a package with a Game Server Command has the configuration option:

  • Allow customers to select the game server they want to receive this package on.

You can specify the target game server in the request by including server_id in your package's variable_data:

{
    "package_id": "6276316",
    "quantity": 1,
    "variable_data": {
        "server_id": "127444"
    }
}
PreviousCreating a BasketNextGifting Packages

Last updated 4 months ago

Was this helpful?

A list of your server_ids can be found in your by clicking Edit beside your relevant game server. The server ID is the number at the end of the URL when editing the game server.

Tebex Control Panel