> ## Documentation Index
> Fetch the complete documentation index at: https://docs.commercepay.asia/llms.txt
> Use this file to discover all available pages before exploring further.

# Inquiry Wallet Histories

> Retrieve wallet transaction history.

An API endpoint used to retrieve wallet transaction history.

## Request

### Headers

<ParamField header="Abp-TenantId" type="string" required>
  Your unique Merchant ID assigned by CommercePay.
</ParamField>

<ParamField header="Authorization" type="string" required>
  Your API credentials used for authentication (typically a Bearer token).
</ParamField>

<ParamField header="cap-signature" type="string" required>
  A unique security hash used to verify the integrity of the request body. See [Generate Signature](/docs/generate-signature) for how to generate this.
</ParamField>

### Body

<ParamField body="nextRecord" type="integer">
  For retrieving the next set of records. Not required to fetch the first 100 records; to fetch subsequent records this field is mandatory, and its value can be obtained from the previous response's `nextRecords`.
</ParamField>

<ParamField body="dateTimeFrom" type="string" required>
  The start date and time for the search (UTC).
</ParamField>

<ParamField body="dateTimeTo" type="string" required>
  The end date and time for the search (UTC).
</ParamField>

<ParamField body="walletId" type="integer" required>
  A unique wallet ID. You can obtain this from the [Inquiry Wallets endpoint](/api-reference/payout-api-querywallets).
</ParamField>

### Request Payload Sample

```json Payload theme={null}
{
  "nextRecord": 0,
  "dateTimeFrom": "2026-04-26T10:57:32.089Z",
  "dateTimeTo": "2026-04-26T10:57:32.089Z",
  "walletId": 0
}
```

## Response

### Body

<ResponseField name="walletId" type="int64">
  A unique wallet ID.
</ResponseField>

<ResponseField name="walletBalance" type="decimal">
  Available wallet balance.
</ResponseField>

<ResponseField name="walletHistories" type="object[]">
  <Expandable title="properties">
    <ResponseField name="walletHistories.id" type="int64">
      Transaction history ID.
    </ResponseField>

    <ResponseField name="walletHistories.createdDate" type="string">
      Transaction date and time (UTC).
    </ResponseField>

    <ResponseField name="walletHistories.transactionNumber" type="string">
      Transaction number.
    </ResponseField>

    <ResponseField name="walletHistories.refenceCode" type="string">
      Transaction reference.
    </ResponseField>

    <ResponseField name="walletHistories.amount" type="decimal">
      Transaction payment amount.
    </ResponseField>

    <ResponseField name="walletHistories.currencyCode" type="string">
      Transaction payment currency code.
    </ResponseField>

    <ResponseField name="walletHistories.type" type="integer">
      Payment type. Topup = 1, Payout = 2, Reverse = 3, Refund = 4, Rebate = 5, Unknown = 6.
    </ResponseField>

    <ResponseField name="walletHistories.description" type="string">
      Transaction payment description.
    </ResponseField>

    <ResponseField name="walletHistories.postTransactionWalletBalance" type="decimal">
      Wallet balance after the transaction.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="nextRecords" type="integer">
  Next record indicator.
</ResponseField>

### Response Payload Sample

```json Response_2XX theme={null}
{
  "result": {
    "walletId": 4,
    "walletBalance": 5253.6,
    "walletHistories": [
      {
        "id": 2030,
        "createdDate": "2026-03-29T03:59:04.338023Z",
        "transactionNumber": "101A5E976151454E9B0260329",
        "refenceCode": "200BC14478FA9200C3F260329",
        "amount": 100,
        "currencyCode": "MYR",
        "type": 2,
        "description": "UOBATD001",
        "postTransactionWalletBalance": 5353.6
      }
    ],
    "nextRecords": 1
  }
}
```

## Error Responses

| Code | Message                   |
| ---- | ------------------------- |
| 1005 | `Tenant Wallet Not Found` |
| 1    | `Invalid Signature.`      |

```json Response_400 theme={null}
{
  "result": null,
  "error": {
    "code": 1005,
    "message": "Tenant Wallet Not Found"
  }
}
```

```json Response_400 theme={null}
{
  "result": {
    "code": 1,
    "message": "Invalid Signature."
  },
  "error": null
}
```
