
柔軟な報酬ペイロード
報酬データはフリーフォーマットの JSON。ゲームが認識する通貨・アイテム・フラグの任意の組み合わせを付与できます。
きめ細かな制限設定
コードごとに、グローバル引き換え上限・ユーザーごとの上限・有効期限をそれぞれ独立して設定可能。
即時無効化
コードが流出や不正利用された場合、Dashboard から即座に無効化できます。アプリのアップデートは不要です。
クイック統合
コード引き換え
ギフトコードを入力
プロモーションコードを下に入力してください
WINTER2024
// Unity C#: Gift Codes (needs a signed in player)
using PM.horizOn.Cloud.Manager;
using UnityEngine;
// Validate without redeeming (true, false, or null when the request failed)
bool? valid = await GiftCodeManager.Instance.Validate("SUMMER2025");
// Redeem: giftData is the JSON payload you set in the dashboard
var result = await GiftCodeManager.Instance.Redeem("SUMMER2025");
if (result != null && result.success)
{
Debug.Log($"Rewards: {result.giftData}");
}# REST API: Gift Codes
# Validate a gift code (does not redeem)
curl -X POST https://horizon.pm/api/v1/app/gift-codes/validate \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"userId":"USER_ID","code":"SUMMER2025"}'
# Redeem a gift code (needs the player's session token)
curl -X POST https://horizon.pm/api/v1/app/gift-codes/redeem \
-H "X-API-Key: YOUR_API_KEY" \
-H "Authorization: Bearer SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{"userId":"USER_ID","code":"SUMMER2025"}'これらの例では、Unity SDK(C#)とREST APIを使っています。GodotとUnrealでも、それぞれのSDKで同じ呼び出しができます: クイックスタートを参照
