When adding packages, there may be certain Variables associated with them. These can be filled by providing a variable_data
object.
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:
Packages that deliver Discord actions should include the user's discord_id:
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.
You can also provide custom data when adding packages which can be referenced by the seller as part of the transaction.
When adding a package to the basket, you can include certain parameters with the request that can trigger specific functionality.
You can allow players to gift packages to other players. Include target_username_id
when adding the package to the basket and the package will be delivered to that player rather than the buyer:
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
:
A list of your server_ids
can be found in your Tebex Control Panel 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.