Event Types

Trueplay events are notifications that the operator receives when users make changes to their loyalty balance. For example, when the holding period expires, Trueplay notifies the operator and the user’s loyalty page.

To notify users about their rewards and other activities with notification emails, you need to set up automatic mailing customized for specific events.

Event Types

  • Play to Earn: A user receives a Play to Earn reward. You can set it as the first event involving rewards for a user. Send them an invitation to visit the Loyalty page and get more rewards.

  • Hold to Earn: A user receives a Hold to Earn reward. Notify them and encourage them to freeze more tokens and increase their bonus.

  • Balance change: The user’s balance has changed, excluding the Play to Earn and Hold to Earn events.

  • Successful deposit: Loyalty tokens are successfully deposited from the user’s wallet.

  • Successful withdrawal: Loyalty tokens are successfully withdrawn to the user’s wallet.

Events data for developers

This functionality sends an event with the necessary data to the operator.

Request body structure:

METHODPOST

URL

https://{operatorbaseurl}/player-event

BODY

{

"requestId":"uuid",

"operatorUserId":"john12345",

"createdAt":"2022-08-18 06:42:45",

"type":"EVENT_TYPE",

"data": {

"eventParam":"eventValue"

}

}

HEADERS

X-REQUEST-SIGNATURE:SIccPXmsq6XdaCd9t82ghl1bny54yVnwpjXNo0t0vLkPgtkUIQtt+1OoXp8FQfak0JyjK6FhayLHrO6RPAIIDg== Content-Type: application/json

DETAILS

X-REQUEST-SIGNATURE - Request signature, Base64(HmacSHA512(SecretKey, MD5(request body))) Event "data" is individual for each request

Supported Events:

Event typeDescriptionEvent data

PLAY_TO_EARN

Once a user receives a Play To Earn Reward

{

"type": "PLAY_TO_EARN",

"data": {

"amount": 10 //p2e reward

"balance": 10

}

}

HOLD_TO_EARN

When a user receives a Hold to Earn reward

{

"type": "HOLD_TO_EARN",

"data": {

"amount": 10, //h2e reward

"reward": 10, //h2e reward

"balance": 10

}

}

BALANCE_CHANGE

Once the user balance has been changed. Except P2E and H2E events

{

"type": "BALANCE_CHANGE",

"data": { "balance": 10

}

}

CRYPTO_DEPOSIT_SUCCESS

When tokens are successfully deposited from user crypto wallet

{

"type":"CRYPTO_DEPOSIT_SUCCESS",

"data": {

"amount": 10.023

}

}

CRYPTO_WITHDRAWAL_SUCCESS

When tokens are successfully withdrawn to user crypto wallet

{

"type":"CRYPTO_WITHDRAWAL_SUCCESS",

"data": {

"amount": 10.023

}

}

PROMO_REWARD

When a user receives reward for registration/kyc or for a custom marketing campaigns.

{

"type": "PROMO_REWARD",

"data": {

"amount": 10,

"p2eMultiplier": 10.023,

"stakingLimitCoefficient": 10.2,

"balance": 10

}

}

DAILY_CASHBACK

When a user receives token reward in the form of daily cashback

{

"type": "DAILY_CASHBACK",

"data": {

"amount": 10 //daily_cashback

"balance": 10

}

}

WEEKLY_CASHBACK

When a user receives token reward in the form of weekly cashback

{

"type": "WEEKLY_CASHBACK",

"data": {

"amount": 10 //weekly_cashback

"balance": 10

}

}

DEPOSIT_VOLUME

When user receives reward with tokens for replenishing your deposit at the casino.

{

"type": "DEPOSIT_VOLUME",

"data": {

"amount": 10 //deposit_volume

"balance": 10

}

}

Last updated