Browse docs
Tebex VIP Tiers
Use the subscription commands below to grant VIP benefits and protect coin rewards from upgrades.
The first purchase and each paid renewal grant the configured monthlyCoins bonus once.
Upgrades grant VIP benefits without coins.
Tebex runs purchase deliverables again when a customer upgrades, even though the upgrade payment only covers the remaining billing period. Tiered categories also execute deliverables for lower tiers. These are documented Tebex tier behaviors. Coinsystem identifies a first purchase by the inherited purchase command for the lowest paid tier. Upgrades only deliver newly added tiers, so they do not qualify for a coin reward.
Prepare the server
- Install the updated
sky_coinsystemresource and its current Sky Base dependency. Keep your existing configuration and database. Restart Coinsystem so its automatic database migration runs. - Use oxmysql as Sky Base's SQL provider. Subscription claims and removal use database transactions; mysql-async is not supported for these commands.
- Enable
Config.VIP.enabled. Define the exact tier IDs andmonthlyCoinsinconfig/config.lua. List tiers from lowest to highest. The label and displayedpriceare not payment verification. - Connect the intended game server using the Tebex setup guide.
Create the tiered category
In Tebex, open Packages → Add New → Category and enable Tiers. Add your Bronze, Silver and
Gold packages in ascending order. Use the same billing cycle for every tier and limit subscription
quantity to one. Match that order to Config.VIP.tiers.

Configure every tier package
Open the package's Game Server Commands, select your intended server, and add the following
commands. Replace gold with that package's configured tier ID. Keep {transaction} as written.
| Tebex execution event | Command | Result |
|---|---|---|
| When the package is purchased | savevipsubscriptioncode {transaction} gold 30 | Records a first purchase with coins, or an upgrade without coins. |
| When the subscription renews | saveviprenewalcode {transaction} gold 30 | Records a paid renewal with the tier's coin bonus. |
| When the package is removed / expires | removevipredeemcode {transaction} | Blocks that payment's code and removes the membership activated by it. |
| Refund | removevipredeemcode {transaction} | Revokes that payment's pending or active VIP delivery. |
| Chargeback | removevipredeemcode {transaction} | Revokes that payment's pending or active VIP delivery. |
Allow all these commands to execute while the player is offline, with no artificial delay. They run in the server console; players cannot execute the delivery or removal commands in-game. See Tebex command types and variables.
The purchase command must be configured on every tier, including the lowest paid tier. Its inherited delivery is required to identify a first purchase, including a direct Gold purchase.

The optional final number is the membership period in days, from 1 to 366; it defaults to 30. Use the same period on every tier and on both delivery events. A day count is a fixed duration, not a calendar-month calculation. Tebex's package-removal command is needed to end benefits at the actual subscription expiry, including cancellation after an upgrade.
savevipredeemcode purchase and renewal commands on every tier. Remove any
saveredeemcode or givecoins commands that award coins on VIP purchases or upgrades, including
global commands. The protected subscription commands handle both first-purchase and renewal bonuses.
The original savevipredeemcode and manual genvipcode behavior remains available for existing
manual-code workflows; those commands do not apply this subscription policy.What players receive
Players enter the payment ID in the shop's existing code field after a purchase or renewal.
The field must be enabled with Config.Menu.showRedeemCode = true.
- First purchase: VIP benefits until the recorded payment period ends and the highest delivered
tier's configured
monthlyCoinsbonus, once. - Upgrade: the higher tier's benefits; zero coins. An active membership keeps its existing expiry instead of starting another full period.
- Paid renewal: a fresh payment period and the configured
monthlyCoinsbonus, once per payment. - Cancellation without another renewal: no new coin reward. Configure removal at the end of the paid period; cancelling automatic renewal does not mean refunding the already paid period.
The period starts when the server records the Tebex delivery, rather than when the player claims the code. Expired or removed payments cannot be claimed later to restart their membership. Claim payments in billing order: an older payment cannot replace a newer active membership. Wait for Tebex's tier commands to finish before claiming. An upgrade requires an active membership: claim the original purchase first. Waiting for the old membership to expire does not turn an upgrade into a first purchase.
Cumulative tier commands select the highest delivered tier for a payment. They do not add Bronze, Silver and Gold bonuses together. If another tier command arrives after the code was claimed, only the same character/account can claim the remaining tier change; a first purchase or renewal pays only any missing bonus difference. An upgrade never pays a bonus difference. Repeated delivery commands do not recreate an already claimed reward, including after a resource restart.
Removal applies to the supplied payment ID. It also works after the player has claimed that code, including while offline, and updates an open shop when the player is connected. An older payment's removal does not remove VIP activated by a newer payment. Already awarded coins are not deducted.
Update an existing store
Replace the commands before resuming sales. Existing manual VIP codes and memberships remain available; the new command policy applies to payments recorded with the new commands. A membership claimed through an old command has no payment-removal link and cannot be retrospectively matched to its transaction. Audit any previously excessive rewards separately.
Keep the coinsystem_vip_deliveries table when updating or restoring the resource: it retains
claim and removal history. Deleting it loses replay protection. Do not resend old purchases with
the new commands to migrate them; that would create a new delivery record.
Receipts recorded before first-purchase bonuses were added do not retain the information needed to distinguish a full first purchase from an upgrade. Review and compensate any missing first-purchase coins separately; the update does not automatically credit already claimed payments.
Test before accepting purchases
Use Tebex's Payments → Create Payment manual test feature, without spending real money.
- Create a first-purchase test payment, including a direct Gold purchase. After its tier commands finish, claim it: the expected tier appears and only that tier's configured bonus is added once.
- Upgrade with only a few days remaining. Claim the upgrade: the tier changes, coins stay unchanged, and the existing expiry stays the same.
- Test a renewal event. Claim its payment ID: the highest tier's configured bonus is added once.
- Resend the same commands and restart Coinsystem. Reclaiming the payment must not award coins again.
- Test package removal before claiming, then after claiming and while the player is offline. The old code must stay blocked and the matching membership must end.
- Activate a newer paid membership, then remove an older payment. The newer membership must remain.
Tebex manual payments may not simulate every subscription lifecycle event. Verify the intended purchase, renewal and removal event in the command history before interpreting each result.