Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.hyperx.dev/llms.txt

Use this file to discover all available pages before exploring further.

Economy and configuration features are published from Console and consumed by Unity clients.

Game Configs

Game configs are JSON settings such as balance values, feature flags, and season settings.
var balance = await HyperX.Core.GameConfigs.Get("balance");
int maxLevel = (int)balance.Data["max_level"];
You can pin a version.
var season = await HyperX.Core.GameConfigs.Get("season", "v2");

Probability Tables

Probability tables contain item keys, weights, and optional payloads. Console validates the table, and only published versions are available to the SDK.
var table = await HyperX.Core.Probability.Get("starter_box");

var draw = await HyperX.Core.Probability.Draw(
    tableKey: "starter_box",
    accessToken: session.AccessToken,
    seed: "tutorial-reward"
);

Debug.Log(draw.ItemKey);
With a seed, the same user, published version, and seed produce the same result. Deliver rewards according to your game policy.

In-App Purchase Validation

After a store purchase succeeds, send receipt information to HyperX. HyperX verifies it through the provider API using credentials registered in Console.
var purchase = await HyperX.Core.Purchases.ValidateJson(
    provider: "google_play",
    productId: "gold_pack_100",
    transactionId: "GPA.1234-5678-9012-34567",
    accessToken: session.AccessToken,
    receiptJson: "{\"purchase_token\":\"STORE_PURCHASE_TOKEN\",\"app_identifier\":\"com.example.game\"}",
    rewardJson: "{\"gold\":100}"
);
Production providers are google_play, app_store, and one_store.
ProviderReceipt Values
google_playpurchase_token or token, app_identifier
app_storeStoreKit transaction ID as transactionId, app_identifier
one_storepurchase_token or token, app_identifier
The same provider + transaction_id returns the existing purchase record when called again.

Purchase History and Refunds

var history = await HyperX.Core.Purchases.History(session.AccessToken, limit: 20);
Refund, cancel, and revoke events are applied through provider webhooks. Clients should sync against server purchase history instead of rolling back entitlements locally. See Provider Integrations for store credentials and webhook setup.