Purchase Reward

The Purchase Rewards API is mainly responsible for rewarding your player rank and wallet points through Purchase Reward Program based on the actual paid amount.

Gameball gives allows you to reward your players with score, points, or both based on a predefined equation. To learn more on puchase rewards, check our Help Center.

The following APIs use Hashing Function SHA1, Check how Hashing is done below.

Reward Points

POST /integrations/transaction/reward

The API call is used to reward the player with score and points based on the configured equation on the purchase reward program on Gameball.

Headers

Request Body

{
“response”: {
“transactionOnGameballSystemId”: “string”,
},
“Success”: true,
“ErrorMsg”: “”,
“ErrorCode”: 0
}

Examples

A system sends Gameball points to rewards player of aplayerUniqueId equivalent to amount of 99.89.

{ 
   "playerUniqueId":"your_player_unique_id",
   "amount":99.98,
   "transactionOnClientSystemId":"123456789",
   "transactionTime":"2019-09-19T16:14:09.895Z",
   "bodyHashed":"f3437e2919ab9f853c7ccde92f4f2b9a6def42db"
}

You can also send Gameball data to rewards a player of aplayerUniqueId with points equivalent toamountof "100". In addition to reward information, playerAttributes object is sent to Gameball to create or update player details.

{
   "playerUniqueId":"your_player_unique_id",
   "amount":100,
   "transactionOnClientSystemId":"99999991",
   "playerAttributes":{ // Optional
      "displayName":"Ahmed ElAssy",
      "email":"example@example.com",
      "gender":"Male",
      "mobileNumber":"+209900000000",
      "dateOfBirth":"1990-01-19T16:14:04.895Z",
      "joinDate":"2015-09-19T16:14:04.895Z"
   },
   "transactionTime":"2019-09-19T16:14:09.895Z",
   "bodyHashed":"f3437e2919ab9f853c7ccde92f4f2b9a6def42db"
}

You can also send Gameball data to rewards a player of aplayerUniqueId with points equivalent toamountof "100". In addition to reward information, playerAttributes object is sent to Gameball to create or update player details.

{
   "playerUniqueId":"your_player_unique_id",
   "amount":100,
   "transactionOnClientSystemId":"99999987",
   "playerAttributes":{ // Optional
      "displayName":"Ahmed ElAssy",
      "email":"example@example.com",
      "gender":"M",
      "mobileNumber":"+201000000000",
      "dateOfBirth":"1990-01-19T16:14:04.895Z",
      "joinDate":"2015-09-19T16:14:04.895Z"
   },
   "transactionTime":"2019-09-19T16:14:09.895Z",
   "bodyHashed":"f3437e2919ab9f853c7ccde92f4f2b9a6def42db"
}

You can send Gameball data to rewards a player of aplayerUniqueId with points equivalent toamountof "2500". In addition to reward information, playerAttributes object is sent to Gameball to create or update player details in our system with any custom attributes so you can see them from Gameball dashboard.

{
   "playerUniqueId":"your_player_unique_id",
   "amount":2500,
   "transactionOnClientSystemId":"99999988",
   "playerAttributes":{ // Optional
      "displayName":"Ahmed ElAssy",
      "email":"example@example.com",
      "gender":"M",
      "mobileNumber":"+201000000000",
      "dateOfBirth":"1990-01-19T16:14:04.895Z",
      "joinDate":"2015-09-19T16:14:04.895Z",
      "custom": {
          "customAttribute1": "string",
          "customAttribute2": 0,
          "customAttribute3": "2019-09-19T21:06:29.158Z",
          "customAttribute4": true //boolean values (true or false)
        }
   },
   "transactionTime":"2019-09-19T16:14:09.895Z",
   "bodyHashed":"19ab9f853c7ccde92f4f2b9a6def42dbf3437e29"
}

Last updated