State updated

The wallet-statement.state-updated event is triggered whenever there's a change in the state of a wallet statement; its data object aligns with the structure defined and obtained through the GET wallet-statements/{id} endpoint.

This event is dispatched when a statement transitions to either the READY or FAILED state.

{
  "id": "wbh-xxx",
  "type": "wallet-statement.state-updated",
   "data": {
      "id": "stm-xxx",
      "wallet_id": "wlt-xxx",
      "state": {
        "code": "READY"
      },
      "period": {
        "from": "2025-01-01T00:00:00Z",
        "to": "2025-01-31T23:00:00Z"
      },
      "starting_balance": {
        "value": "5000.00",
        "currency": "KES"
      },
      "closing_balance": {
        "value": "7500.00",
        "currency": "KES"
      },
      "created_at": "2025-01-15T10:30:00Z"
   },
  "created_at": "2025-01-15T12:00:00Z"
}

Statement States That Trigger This Event

StateDescription
READYThe statement has been successfully generated and is ready to retrieve lines
FAILEDThe statement generation failed