Skip to main content

AsyncAPI for wallet service 0.0.1 documentation

Published Messages (walletProcessing)

The service publishes one of these messages below.

walletDisabled

Message is sent when wallet is disabled. Contains fields from event and the following payload.

Example value
{
"payload": {
"walletStatusChange": {
"walletId": "string",
"userId": "string",
"status": "string",
"previousStatus": "string"
}
},
"id": "string",
"version": 0,
"name": "string",
"namespace": "string",
"parentNamespace": "string",
"timestamp": "2019-08-24T14:15:22Z",
"clientId": "string",
"userId": "string",
"traceId": "string",
"sessionId": "string"
}

payload

NameTypeDescription
walletStatusChangewalletStatusChange-

walletEnabled

Message is sent when wallet is enabled. Contains fields from event and the following payload.

Example value
{
"payload": {
"walletStatusChange": {
"walletId": "string",
"userId": "string",
"status": "string",
"previousStatus": "string"
}
},
"id": "string",
"version": 0,
"name": "string",
"namespace": "string",
"parentNamespace": "string",
"timestamp": "2019-08-24T14:15:22Z",
"clientId": "string",
"userId": "string",
"traceId": "string",
"sessionId": "string"
}

payload

NameTypeDescription
walletStatusChangewalletStatusChange-

walletCredited

Message is sent when credit wallet. Contains fields from event and the following payload.

Example value
{
"payload": {
"walletBalanceChange": {
"walletId": "string",
"namespace": "string",
"userId": "string",
"currencyCode": "string",
"balance": 0,
"amount": 0,
"source": "PURCHASE",
"reason": "string",
"origin": "Playstation",
"details": [
{
"origin": "Playstation",
"balance": 0,
"amount": 0
}
],
"metadata": {}
}
},
"id": "string",
"version": 0,
"name": "string",
"namespace": "string",
"parentNamespace": "string",
"timestamp": "2019-08-24T14:15:22Z",
"clientId": "string",
"userId": "string",
"traceId": "string",
"sessionId": "string"
}

payload

NameTypeDescription
walletBalanceChangewalletBalanceChange-

walletDebited

Message is sent when debit wallet. Contains fields from event and the following payload.

Example value
{
"payload": {
"walletBalanceChange": {
"walletId": "string",
"namespace": "string",
"userId": "string",
"currencyCode": "string",
"balance": 0,
"amount": 0,
"source": "PURCHASE",
"reason": "string",
"origin": "Playstation",
"details": [
{
"origin": "Playstation",
"balance": 0,
"amount": 0
}
],
"metadata": {}
}
},
"id": "string",
"version": 0,
"name": "string",
"namespace": "string",
"parentNamespace": "string",
"timestamp": "2019-08-24T14:15:22Z",
"clientId": "string",
"userId": "string",
"traceId": "string",
"sessionId": "string"
}

payload

NameTypeDescription
walletBalanceChangewalletBalanceChange-

walledPaid

Message is sent when pay with wallet, this event has been deprecated, please use walletPaid event instead of it. Contains fields from event and the following payload.

Example value
{
"payload": {
"walletBalanceChange": {
"walletId": "string",
"namespace": "string",
"userId": "string",
"currencyCode": "string",
"balance": 0,
"amount": 0,
"source": "PURCHASE",
"reason": "string",
"origin": "Playstation",
"details": [
{
"origin": "Playstation",
"balance": 0,
"amount": 0
}
],
"metadata": {}
}
},
"id": "string",
"version": 0,
"name": "string",
"namespace": "string",
"parentNamespace": "string",
"timestamp": "2019-08-24T14:15:22Z",
"clientId": "string",
"userId": "string",
"traceId": "string",
"sessionId": "string"
}

payload

NameTypeDescription
walletBalanceChangewalletBalanceChange-

walledExpired

Message is sent when wallet balance is expired, this event has been deprecated, please use walletExpired event instead of it. Contains fields from event and the following payload.

Example value
{
"payload": {
"walletBalanceChange": {
"walletId": "string",
"namespace": "string",
"userId": "string",
"currencyCode": "string",
"balance": 0,
"amount": 0,
"source": "PURCHASE",
"reason": "string",
"origin": "Playstation",
"details": [
{
"origin": "Playstation",
"balance": 0,
"amount": 0
}
],
"metadata": {}
}
},
"id": "string",
"version": 0,
"name": "string",
"namespace": "string",
"parentNamespace": "string",
"timestamp": "2019-08-24T14:15:22Z",
"clientId": "string",
"userId": "string",
"traceId": "string",
"sessionId": "string"
}

payload

NameTypeDescription
walletBalanceChangewalletBalanceChange-

walletTransactionCancelled

Message is sent when cancelling wallet transaction. Contains fields from event and the following payload.

Example value
{
"payload": {
"walletBalanceChange": {
"walletId": "string",
"namespace": "string",
"userId": "string",
"currencyCode": "string",
"balance": 0,
"amount": 0,
"source": "PURCHASE",
"reason": "string",
"origin": "Playstation",
"details": [
{
"origin": "Playstation",
"balance": 0,
"amount": 0
}
],
"metadata": {}
}
},
"id": "string",
"version": 0,
"name": "string",
"namespace": "string",
"parentNamespace": "string",
"timestamp": "2019-08-24T14:15:22Z",
"clientId": "string",
"userId": "string",
"traceId": "string",
"sessionId": "string"
}

payload

NameTypeDescription
walletBalanceChangewalletBalanceChange-

walletPaid

Message is sent when pay with wallet, only available in AGS version 3.79+. Contains fields from event and the following payload.

Example value
{
"payload": {
"walletBalanceChange": {
"walletId": "string",
"namespace": "string",
"userId": "string",
"currencyCode": "string",
"balance": 0,
"amount": 0,
"source": "PURCHASE",
"reason": "string",
"origin": "Playstation",
"details": [
{
"origin": "Playstation",
"balance": 0,
"amount": 0
}
],
"metadata": {}
}
},
"id": "string",
"version": 0,
"name": "string",
"namespace": "string",
"parentNamespace": "string",
"timestamp": "2019-08-24T14:15:22Z",
"clientId": "string",
"userId": "string",
"traceId": "string",
"sessionId": "string"
}

payload

NameTypeDescription
walletBalanceChangewalletBalanceChange-

walletExpired

Message is sent when wallet balance is expired, only available in AGS version 3.79+. Contains fields from event and the following payload.

Example value
{
"payload": {
"walletBalanceChange": {
"walletId": "string",
"namespace": "string",
"userId": "string",
"currencyCode": "string",
"balance": 0,
"amount": 0,
"source": "PURCHASE",
"reason": "string",
"origin": "Playstation",
"details": [
{
"origin": "Playstation",
"balance": 0,
"amount": 0
}
],
"metadata": {}
}
},
"id": "string",
"version": 0,
"name": "string",
"namespace": "string",
"parentNamespace": "string",
"timestamp": "2019-08-24T14:15:22Z",
"clientId": "string",
"userId": "string",
"traceId": "string",
"sessionId": "string"
}

payload

NameTypeDescription
walletBalanceChangewalletBalanceChange-

Schemas

walletStatusChange

NameTypeDescription
walletIdstringwallet id
userIdstringuser id
statusstringwallet status
previousStatusstringwallet status before change

walletBalanceChange

NameTypeDescription
walletIdstringwallet id, this field has been deprecated.
namespacestringnamespace
userIdstringuser id
currencyCodestringcurrency code
balanceinteger (int64)the balance after change. this field has been deprecated.
amountinteger (int64)change amount, positive for both credit & debit
sourcestringThe credit source only has value if the event is walletCredited.
reasonstringreason
originstringThe credit origin only has value if the event is walletCredited.
detailsarray<object>Details of specific wallet balance changes
metadataobjectwallet balance change metadata, it's from wallet operation request body. only available in AGS version 3.79+

details[number]

NameTypeDescription
originstringwallet origin
balanceinteger (int64)the balance after change.
amountinteger (int64)change amount, positive for both credit & debit

metadata

This is a free-form object.

event

NameTypeDescription
idstringevent id
versioninteger-
namestringevent name
namespacestringevent namespace
parentNamespacestring-
timestampstring (date-time)-
clientIdstringclient id
userIdstringthe operator id
traceIdstringtrace id
sessionIdstringsession id