AsyncAPI for wallet service 0.0.1 documentation
- Protobuf File Spec: ecommerce.proto
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
| Name | Type | Description |
|---|---|---|
| walletStatusChange | walletStatusChange | - |
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
| Name | Type | Description |
|---|---|---|
| walletStatusChange | walletStatusChange | - |
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
| Name | Type | Description |
|---|---|---|
| walletBalanceChange | walletBalanceChange | - |
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
| Name | Type | Description |
|---|---|---|
| walletBalanceChange | walletBalanceChange | - |
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
| Name | Type | Description |
|---|---|---|
| walletBalanceChange | walletBalanceChange | - |
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
| Name | Type | Description |
|---|---|---|
| walletBalanceChange | walletBalanceChange | - |
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
| Name | Type | Description |
|---|---|---|
| walletBalanceChange | walletBalanceChange | - |
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
| Name | Type | Description |
|---|---|---|
| walletBalanceChange | walletBalanceChange | - |
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
| Name | Type | Description |
|---|---|---|
| walletBalanceChange | walletBalanceChange | - |
Schemas
walletStatusChange
| Name | Type | Description |
|---|---|---|
| walletId | string | wallet id |
| userId | string | user id |
| status | string | wallet status |
| previousStatus | string | wallet status before change |
walletBalanceChange
| Name | Type | Description |
|---|---|---|
| walletId | string | wallet id, this field has been deprecated. |
| namespace | string | namespace |
| userId | string | user id |
| currencyCode | string | currency code |
| balance | integer (int64) | the balance after change. this field has been deprecated. |
| amount | integer (int64) | change amount, positive for both credit & debit |
| source | string | The credit source only has value if the event is walletCredited. |
| reason | string | reason |
| origin | string | The credit origin only has value if the event is walletCredited. |
| details | array<object> | Details of specific wallet balance changes |
| metadata | object | wallet balance change metadata, it's from wallet operation request body. only available in AGS version 3.79+ |
details[number]
| Name | Type | Description |
|---|---|---|
| origin | string | wallet origin |
| balance | integer (int64) | the balance after change. |
| amount | integer (int64) | change amount, positive for both credit & debit |
metadata
This is a free-form object.
event
| Name | Type | Description |
|---|---|---|
| id | string | event id |
| version | integer | - |
| name | string | event name |
| namespace | string | event namespace |
| parentNamespace | string | - |
| timestamp | string (date-time) | - |
| clientId | string | client id |
| userId | string | the operator id |
| traceId | string | trace id |
| sessionId | string | session id |