TANITARDevelopers
WebhooksEvent catalogRewards

reward.wallet.balance-changed

Version 1 of the reward.wallet.balance-changed webhook event.

The reward.wallet.balance-changed event.

Event typereward.wallet.balance-changed
Schema version1
Routing keyevent.reward.wallet.balance-changed.v1
Produced byReward Management
Schemaurn:defendr:contract:reward:wallet-balance-changed:1

data fields

FieldTypeRequiredDescription
transferIdstringyes
operationKeystringyes
playerIdstringyes
walletScope"platform", "game"yes
gameSlugstring or nullyes
balancesarray of objectyes
balances[].currencyKeystringyes
balances[].amountintegeryes
deltasarray of objectno
deltas[].currencyKeystringyes
deltas[].amountintegeryes
revisionintegeryes
source"api-command", "broker-event", "currency-exchange", "migration", "operator-recovery"yes
provenance"gamification-mission", "gamification-battle-pass", "gamification-chest", "gamification-leaderboard", "tournament-award", "player-action", "operator-grant", "shop-purchase", "membership-grant", "reward-key", "unknown", "gamification-quiz"no
reasonstringyes

Some fields are required only in particular states. The JSON Schema below is authoritative.

Example delivery

Signed with the example secret whsec_placeholder_example_webhooks_signing_secret, so you can check your verifier against it. See Verifying signatures.

POST /your/webhook/endpoint HTTP/1.1
content-type: application/json
webhook-id: whd_00000000-0000-4000-8000-000000000026
webhook-timestamp: 1800000000
webhook-signature: v1,enrvW7FxNch1pCwackHhhVkRVEJvB1aqsCekZYiOfWs=
tanitar-event-type: reward.wallet.balance-changed
tanitar-schema-version: 1
tanitar-delivery-attempt: 1

{"messageId":"evt_00000000-0000-4000-8000-000000000026","kind":"event","type":"reward.wallet.balance-changed","schemaVersion":1,"occurredAt":"2027-01-15T10:00:00.000Z","producer":"reward-management-service","accountId":"acc_11111111-1111-4111-8111-111111111111","correlationId":"corr_00000000-0000-4000-8000-000000000026","data":{"transferId":"tr_demo","operationKey":"credit-demo","playerId":"player_demo","walletScope":"platform","gameSlug":null,"balances":[{"currencyKey":"red","amount":30}],"deltas":[{"currencyKey":"red","amount":25}],"revision":1,"source":"api-command","provenance":"gamification-mission","reason":"acceptance credit"}}

The same body, formatted:

{
  "messageId": "evt_00000000-0000-4000-8000-000000000026",
  "kind": "event",
  "type": "reward.wallet.balance-changed",
  "schemaVersion": 1,
  "occurredAt": "2027-01-15T10:00:00.000Z",
  "producer": "reward-management-service",
  "accountId": "acc_11111111-1111-4111-8111-111111111111",
  "correlationId": "corr_00000000-0000-4000-8000-000000000026",
  "data": {
    "transferId": "tr_demo",
    "operationKey": "credit-demo",
    "playerId": "player_demo",
    "walletScope": "platform",
    "gameSlug": null,
    "balances": [
      {
        "currencyKey": "red",
        "amount": 30
      }
    ],
    "deltas": [
      {
        "currencyKey": "red",
        "amount": 25
      }
    ],
    "revision": 1,
    "source": "api-command",
    "provenance": "gamification-mission",
    "reason": "acceptance credit"
  }
}

JSON Schema

urn:defendr:contract:reward:wallet-balance-changed:1
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:defendr:contract:reward:wallet-balance-changed:1",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "transferId",
    "operationKey",
    "playerId",
    "walletScope",
    "gameSlug",
    "balances",
    "revision",
    "source",
    "reason"
  ],
  "properties": {
    "transferId": {
      "type": "string",
      "minLength": 1
    },
    "operationKey": {
      "type": "string",
      "minLength": 1
    },
    "playerId": {
      "type": "string",
      "minLength": 1
    },
    "walletScope": {
      "enum": [
        "platform",
        "game"
      ]
    },
    "gameSlug": {
      "type": [
        "string",
        "null"
      ]
    },
    "balances": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "currencyKey",
          "amount"
        ],
        "properties": {
          "currencyKey": {
            "type": "string",
            "minLength": 1
          },
          "amount": {
            "type": "integer",
            "minimum": 0
          }
        }
      }
    },
    "deltas": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "currencyKey",
          "amount"
        ],
        "properties": {
          "currencyKey": {
            "type": "string",
            "minLength": 1
          },
          "amount": {
            "type": "integer"
          }
        }
      }
    },
    "revision": {
      "type": "integer",
      "minimum": 1
    },
    "source": {
      "$ref": "urn:defendr:contract:common:value-source:1"
    },
    "provenance": {
      "$ref": "urn:defendr:contract:common:source-provenance:1"
    },
    "reason": {
      "type": "string",
      "minLength": 1
    }
  }
}

On this page