
Create promo codes for your own game
Set up promo codes in your dashboard to give players items, currency, or other in-game rewards.
Flexible Reward Payloads
Gift data is free-form JSON, so you can grant any combination of currencies, items, or flags your game understands.
Server player values
Up to eight configured values are credited by the server when redeemed. giftData remains a separate game payload. Display the returned balance; do not add the reward again locally.
Revocation Control
Revoke a code instantly from the dashboard if it leaks or is abused, with no app update needed.
Quick Integration
Redeem Code
Enter Gift Code
Enter your promotional code below
// Develop Unity SDK: signed-in player, durable original redemption intent.
using PM.horizOn.Cloud.Manager;
using UnityEngine;
// Run from one explicit player action; serialize this handler until it completes.
string userId = UserManager.Instance.CurrentUser.UserId;
string project = HorizonApp.Network.GetApiKey();
string scope = PM.horizOn.Cloud.Objects.Network.Responses.GiftCodeIntent.ProjectFingerprint(project);
string pendingKey = "horizOn_gift_v2_" + scope + "_" + userId;
// Preserve an old V1 demo record for reconciliation. Never reinterpret its UUID as a count.
if (PlayerPrefs.HasKey("horizOn_gift_pending_" + userId)) return;
PM.horizOn.Cloud.Objects.Network.Responses.GiftCodeIntent pending;
if (PlayerPrefs.HasKey(pendingKey)) {
pending = JsonUtility.FromJson<PM.horizOn.Cloud.Objects.Network.Responses.GiftCodeIntent>(PlayerPrefs.GetString(pendingKey));
if (pending == null || !pending.IsValidFor(project, userId)) return;
} else {
pending = await GiftCodeManager.Instance.PrepareRedemption("WELCOME");
if (pending == null || !pending.IsValidFor(project, userId) || PlayerPrefs.HasKey(pendingKey)) return;
PlayerPrefs.SetString(pendingKey, JsonUtility.ToJson(pending));
PlayerPrefs.Save(); // All seven fields before the first mutating request.
}
string original = JsonUtility.ToJson(pending);
if (PlayerPrefs.GetString(pendingKey) != original) return;
var result = await GiftCodeManager.Instance.RedeemPrepared(pending);
if (result == null || !result.success) return; // Keep the exact tuple after any uncertain result.
if (PlayerPrefs.GetString(pendingKey) == original) {
PlayerPrefs.DeleteKey(pendingKey);
PlayerPrefs.Save();
}
if (result.playerValues != null) {
foreach (var value in result.playerValues.values) Debug.Log(value.key + "=" + value.balance);
}
// alreadyApplied/replayed means the sequence slot was consumed, with no copied historical rewards.
// Replace balances with playerValues. Never add grantedValues locally.These examples use the Unity SDK (C#) and the REST API. Godot and Unreal have the same calls in their own SDKs: see the quickstart
Frequently Asked Questions
Ready to Integrate?
Start building with horizOn today. Free tier included.
