Overview
Personal Bonus lets you grant a bonus that a player activates by clicking a unique link. The link carries encrypted parameters; your product decrypts them and immediately shows the player a bonus modal, then grants the bonus.
Step 1 — Configure in InTarget (required)
Create a Personal Bonus config (define external bonus ID, amounts/percent, wager, expiration, spins, etc.).
Copy the generated template variable, for example:
{{ personalBonusUrl(1) }}
Step 2 — Put the variable into a URL in your message
Use the variable in any message channel (email/SMS/push). Example for email:
https://intarget.space{{ personalBonusUrl(1) }}When sent, the player receives a resolved link like:
https://intarget.space/bonus/?data=BASE64(AES-256-GCM payload)
Step 3 — Your landing endpoint: decrypt & validate
On your /bonus endpoint:
Read data from the query.
Decrypt using AES-256-GCM and your secret key.
Validate payload (schema, TTL/expiration, user match, idempotency).
PHP example (AES-256-GCM)
function decryptUrlParams($encrypted, $secretKey) {
$data = base64_decode($encrypted, true);
if (!$data || strlen($data) < 28) return null;
$iv = substr($data, 0, 12);
$tag = substr($data, 12, 16);
$ciphertext = substr($data, 28);
$decrypted = openssl_decrypt(
$ciphertext,
'aes-256-gcm',
$secretKey,
OPENSSL_RAW_DATA,
$iv,
$tag
);
return $decrypted ? json_decode($decrypted, true) : null;
}
Secret key: request from [email protected].
Step 4 — Immediate UX: show the bonus modal
On successful decryption + validation, immediately display a modal with the player’s bonus details (amount/percent and cap, wager, spins data, expiration). The user should not have to navigate further.
Minimal UX contract
If eligible: show modal instantly (page load), include “Activate”/“Claim” CTA.
If requires deposit: show modal with requirement (e.g., “Deposit ≥ 100”); guide to cashier.
If already claimed / re-click: show modal in an idempotent state (e.g., “Already activated on 2025-10-14”).
If invalid/expired: show a friendly error modal and support contact.
Payload (after decryption)
This will be a PHP array with the following structure.:
{
"user_id": "2023022401202",
"external_bonus_id": "1",
"expiration_timing": "1",
"expiration_timing_unit": "day",
"min_deposit": "100",
"money_sum": null,
"money_percent": "100",
"money_max": "1000",
"money_wager": "10",
"money_type": "real", // real | bonus
"bonus_type": "money", // money | free_spins | money_and_free_spins
"gift_spins_game": null,
"gift_spins_count": null,
"gift_spins_bets_in_money": null,
"gift_spins_wager": null,
"gift_spins_days": null
}
Granting logic (server side)
Map external_bonus_id → your internal bonus definition and specify the minimum deposit amount that the user must make to receive the bonus.
Compute money bonus:
Fixed: money_sum, or
Percentage: min( deposit_amount * money_percent/100, money_max )
Apply money_wager and wallet_type.
Issue free spins (if present): game ID, spins count, spins value, wager on winnings, validity.
Idempotency:
Store a hash of raw data (e.g., SHA-256). If seen, don’t grant twice.
Show “Already activated” modal state on repeats.
