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

# Get Paginate Customer Credit History

> this is endpoint is used to get a customer credit transaction history in a pagination form of credit membership product.

<RequestExample>
  ```bash Request Example theme={null}
  curl --request GET 'https://api.mayar.id/credit/v1/credit/customer/paginate-credit-history/PQVS4KGY?productId=40f26fbe-f4d8-4693-975f-e6d105d291e6&membershipTierId=261acae0-d6ae-4d8c-adf5-6fb8c2361514&page=1&limit=5' \
  --header 'Authorization: Bearer Paste-Your-API-Key-Here' \
  --data ''
  ```
</RequestExample>

<ResponseExample>
  ```json Response Example 200 theme={null}
  {
      "statusCode": 200,
      "message": "success",
      "total": 3,
      "page": 1,
      "limit": 10,
      "totalPages": 1,
      "data": [
          {
              "id": "6970b4bcdfcfcfbbd8d7b617",
              "createdAt": "2026-01-21T11:13:00.044Z",
              "credit": 0,
              "debit": 50,
              "productId": "10291a3d-c53f-426f-9987-f879b4b87c64",
              "status": "ACTIVE",
              "customerId": "210e5193-7d66-4345-a5c7-07fe7552f2f7",
              "merchantId": "8afa8430-9ccd-4d33-9c1b-e0999a319994",
              "expiredAt": null,
              "walletType": "ADD_ON",
              "type": "CREDIT_USAGE"
          },
          {
              "id": "6970b49fdfcfcfbbd8d7b616",
              "createdAt": "2026-01-21T11:12:31.325Z",
              "credit": 200,
              "debit": 0,
              "productId": "10291a3d-c53f-426f-9987-f879b4b87c64",
              "status": "ACTIVE",
              "customerId": "210e5193-7d66-4345-a5c7-07fe7552f2f7",
              "merchantId": "8afa8430-9ccd-4d33-9c1b-e0999a319994",
              "expiredAt": null,
              "walletType": "ADD_ON",
              "type": "MERCHANT_TOPUP"
          },
          {
              "id": "6970b416dfcfcfbbd8d7b612",
              "createdAt": "2026-01-21T11:10:14.827Z",
              "credit": 3000,
              "debit": 0,
              "productId": "10291a3d-c53f-426f-9987-f879b4b87c64",
              "status": "ACTIVE",
              "customerId": "210e5193-7d66-4345-a5c7-07fe7552f2f7",
              "merchantId": "8afa8430-9ccd-4d33-9c1b-e0999a319994",
              "expiredAt": null,
              "walletType": "ADD_ON",
              "type": "TRIAL_TOPUP"
          }
      ]
  }
  ```
</ResponseExample>

Endpoint:

<CodeGroup>
  ```Production Production theme={null}
  https://api.mayar.id/credit/v1/credit/customer/paginate-credit-history/?productId={productId}
  ```

  ```Sandbox Sandbox theme={null}
  https://api.mayar.club/credit/v1/credit/customer/paginate-credit-history/?productId={productId}
  ```
</CodeGroup>

## Authorization

<ResponseField name="Authorization" type="string" required>
  Example:

  `Authorization | Bearer Paste-Your-API-Key-Here`
</ResponseField>

## Path Parameters

<ParamField query="customerId" path="customerId" type="string">
  The unique identifier of the customer whose credit balance is being queried balance.
</ParamField>

## Query Parameters

<ParamField query="page" path="page" default="1" type="integer">
  The page number for pagination.
</ParamField>

<ParamField query="limit" path="limit" default="10" type="integer">
  The unique identifier of the membership tier associated with the credit balance.
</ParamField>

<ParamField query="sortField" path="sortField" default="datetime" type="string">
  The field name used to sort results.
</ParamField>

<ParamField query="sortOrder" path="sortOrder" default="desc" type="string">
  The order of sorting. Accepts `"asc"` or `"desc"`.
</ParamField>

<ParamField query="startDate" path="startDate" type="string">
  The start date filter for the query range.
</ParamField>

<ParamField query="endDate" path="endDate" type="string">
  The end date filter for the query range.
</ParamField>

<ParamField query="walletType" path="walletType" type="string">
  The type of wallet to filter credit history (e.g., `"MEMBERSHIP"`, `"ADD_ON"`).
</ParamField>

<ParamField query="type" path="type" type="string">
  The transaction type filter (e.g., `"TOPUP"`, `"MERCHANT_TOPUP"` , `"TRIAL_TOPUP"`, `"EXPIRE_VOID"` , `"CREDIT_USAGE"`).
</ParamField>

## Response

Successful Response

### Main Structure (Root)

<ResponseField name="statusCode" type="integer">
  Status code form API.
</ResponseField>

<ResponseField name="messages" type="string">
  Status message that describes the status code.
</ResponseField>

<ResponseField name="total" type="string">
  Indicates the total data.
</ResponseField>

<ResponseField name="page" type="string">
  Indicates the current page.
</ResponseField>

<ResponseField name="limit" type="string">
  Indicates the current limit (page size).
</ResponseField>

<ResponseField name="totalPages" type="string">
  Indicates the total page.
</ResponseField>

<ResponseField name="data" type="array of object">
  Result list of requested data.
</ResponseField>
