Payment changlogs
Every Order and PgTransacts changes are stored in changelogs for auditable by admin. Changelogs entity is generic and have common structure and fields despite of entiy.
Changlogs entity
| Field | Type | Values | Description |
|---|---|---|---|
trackableId | String(192) | Trackable ID is an unique identifier associated with a particular sequence or chain of actions that allows admins to link and correlate multiple log entries that are part of the same transaction or process. | |
ownerId | Id | A unique identifier for the user who is the owner of entity. | |
actor | Id | USD, VND | A unique identifier for the user/object who/which is the owner of entity. |
action | String(64) | USD, VND | A description of the specific action performed (e.g., login, payment, transfer, create user). |
params | Record | Parameters of action | |
custom-data | Record | any user provide custom json data. | |
entityId | Id | The ID of the object or resource that was affected by the action. | |
context | Record | Additional contextual information that can aid in searching or filtering the log entries. | |
fromData | Record | Old values | |
toData | Record | New value values | |
createdAt | Timestamptz | The date and time when the action occurred. |
Example changelogs data
{
"order_changelogs": [
{
"id": 111941996194190510,
"trackable_id": null,
"owner_id": "1",
"actor": "__system",
"action": "create",
"params": {
"items": [
{
"name": "Game Item 1",
"slug": "game.item1",
"quantity": 1,
"pricePerItem": 10.99,
"options": { "variant": "large-pack" }
}
]
},
"entity_id": "111941860280033614",
"context": null,
"from_data": null,
"to_data": {
"userId": "1",
"note": "This is order",
"currencyCode": "USD",
"pgTransactDto": {
"providerName": "google-play.test",
"providerMethods": ["verify-receipt"]
},
"subTotal": 10.99,
"priority": 1,
"id": "111941860280033614",
"_guid": "order_3Dn8pGnew3dLvErwIHOL8kinic",
"createdBy": "__system"
},
"created_at": "2023-07-05T08:32:23.346Z"
},
{
"id": 111942743233010731,
"trackable_id": null,
"owner_id": "1",
"actor": "__system",
"action": "update",
"params": null,
"entity_id": "111941860280033614",
"context": null,
"from_data": { "status": "PLACED", "priority": 1 },
"to_data": {
"status": "PAYMENT_PENDING",
"priority": 0,
"updatedBy": "__system"
},
"created_at": "2023-07-05T08:32:24.187Z"
}
]
}