WebhooksEvent catalogRewards
reward.wallet.balance-changed
Version 1 of the reward.wallet.balance-changed webhook event.
The reward.wallet.balance-changed event.
| Event type | reward.wallet.balance-changed |
| Schema version | 1 |
| Routing key | event.reward.wallet.balance-changed.v1 |
| Produced by | Reward Management |
| Schema | urn:defendr:contract:reward:wallet-balance-changed:1 |
data fields
| Field | Type | Required | Description |
|---|---|---|---|
transferId | string | yes | |
operationKey | string | yes | |
playerId | string | yes | |
walletScope | "platform", "game" | yes | |
gameSlug | string or null | yes | |
balances | array of object | yes | |
balances[].currencyKey | string | yes | |
balances[].amount | integer | yes | |
deltas | array of object | no | |
deltas[].currencyKey | string | yes | |
deltas[].amount | integer | yes | |
revision | integer | yes | |
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 | |
reason | string | yes |
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
}
}
}