> ## 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 Product Transactions

> Endpoint where you can get the transactions of a product

<Note>
  This endpoint returns the product's **balance history** rows — the same source
  as `GET /hl/v2/transactions` — not checkout attempts. `id` is the balance
  history row id, the nominal is `credit` (with an `amount` alias), and
  successful payments have `status: "settled"`.
</Note>

<Note>
  `total` is the number of successful transactions for the product: all-time, or
  scoped to the `startAt`/`endAt` range when those are provided.
</Note>

<RequestExample>
  ```bash Request Example theme={null}
  curl --request GET 'https://api.mayar.id/hl/v2/products/6f8c19ff-5b97-4792-aa89-d2a12797b356/transactions?limit=10' \
  --header 'Authorization: Bearer Paste-Your-API-Key-Here'
  ```
</RequestExample>

<ResponseExample>
  ```json Response Example 200 theme={null}
  {
      "statusCode": 200,
      "messages": "success",
      "total": 1,
      "data": [
          {
              "id": "a1b2c3d4-e5f6-4789-a012-3456789abcde",
              "transactionId": "b2c3d4e5-f6a7-4890-b123-456789abcdef",
              "credit": 150000,
              "amount": 150000,
              "status": "settled",
              "balanceHistoryType": "membership",
              "paymentMethod": "QRIS",
              "customerId": "c3d4e5f6-a7b8-4901-c234-56789abcdef0",
              "createdAt": 1768375011056,
              "paymentLinkTransactionId": "b2c3d4e5-f6a7-4890-b123-456789abcdef",
              "fee": [
                  {
                      "id": "d4e5f6a7-b8c9-4012-d345-6789abcdef01",
                      "balanceHistoryType": "xendit_fee",
                      "debit": 6
                  },
                  {
                      "id": "e5f6a7b8-c9d0-4123-e456-789abcdef012",
                      "balanceHistoryType": "mayar_fee",
                      "debit": 53
                  }
              ],
              "paymentLinkId": "6f8c19ff-5b97-4792-aa89-d2a12797b356",
              "subscriptionId": null,
              "xenditTransactionId": null,
              "subscription": null,
              "paymentLinkTransaction": {
                  "id": "b2c3d4e5-f6a7-4890-b123-456789abcdef",
                  "urlParamTrackingData": null,
                  "isAdminFeeBorneByCustomer": true,
                  "isChannelFeeBorneByCustomer": true
              },
              "customeField": null,
              "customer": {
                  "id": "c3d4e5f6-a7b8-4901-c234-56789abcdef0",
                  "name": "Budi Santoso",
                  "email": "budi.santoso@example.com",
                  "mobile": "081234567890"
              },
              "paymentLink": {
                  "id": "6f8c19ff-5b97-4792-aa89-d2a12797b356",
                  "name": "Membership Premium 2026"
              },
              "xenditTransaction": null
          }
      ],
      "hasMore": false,
      "nextStartingAfter": null
  }
  ```
</ResponseExample>

Endpoint:

<CodeGroup>
  ```Production Production theme={null}
  https://api.mayar.id/hl/v2/products/{id}/transactions?limit=10
  ```

  ```Sandbox Sandbox theme={null}
  https://api.mayar.io/hl/v2/products/{id}/transactions?limit=10
  ```
</CodeGroup>

## Authorization

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

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

## Path Parameters

<ParamField path="id" type="string <uuid>" required>
  Unique product ID whose transactions you want to list.
</ParamField>

## Query Parameters

<ParamField query="status" path="status" type="string">
  Filter transactions by status.
</ParamField>

<ParamField query="customerId" path="customerId" type="string">
  Filter transactions belonging to a specific customer.
</ParamField>

<ParamField query="startAt" path="startAt" type="string">
  Start of the date range to filter by. Accepts a Unix timestamp in milliseconds
  or an ISO 8601 date/datetime (e.g. `1755993600000`, `2026-08-24`, or
  `2026-08-24T00:00:00.000Z`).
</ParamField>

<ParamField query="endAt" path="endAt" type="string">
  End of the date range to filter by. Accepts a Unix timestamp in milliseconds or
  an ISO 8601 date/datetime.
</ParamField>

<ParamField query="fields" path="fields" type="string">
  Comma-separated list of fields to include in each transaction object. Use it to
  trim the payload to only the fields you need.
</ParamField>

<ParamField query="limit" path="limit" default="10" type="integer">
  Number of items to return per page. Defaults to `10`, with a maximum of `50`.
</ParamField>

<ParamField query="startingAfter" path="startingAfter" type="string">
  Cursor for forward pagination. Pass the `nextStartingAfter` value from the
  previous response (a Unix timestamp in milliseconds, as a string) to fetch the
  next page.
</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="integer">
  Number of successful transactions for the product. All-time, or scoped to the
  `startAt`/`endAt` range when provided (it does not follow other filters).
</ResponseField>

<ResponseField name="data" type="array of object">
  List of transactions for the product.
</ResponseField>

<ResponseField name="hasMore" type="boolean">
  Information on whether there is additional data to be retrieved (true/false).
</ResponseField>

<ResponseField name="nextStartingAfter" type="string | null">
  Cursor to pass as `startingAfter` to fetch the next page. `null` when there is
  no further data.
</ResponseField>

### data Structure (Array Of Object)

<ResponseField name="id" type="string<uuid>">
  Unique ID of the balance history row.
</ResponseField>

<ResponseField name="transactionId" type="string<uuid>">
  Alias of `paymentLinkTransactionId` — the ID of the underlying payment link
  transaction.
</ResponseField>

<ResponseField name="credit" type="integer">
  The amount of credit received from the transaction.
</ResponseField>

<ResponseField name="amount" type="integer">
  Alias of `credit` — the transaction nominal.
</ResponseField>

<ResponseField name="status" type="string">
  Balance history status (`settled` = completed/successful).
</ResponseField>

<ResponseField name="balanceHistoryType" type="string">
  The transaction type (e.g. `generic_link`, `membership`, `digital_product`).
</ResponseField>

<ResponseField name="paymentMethod" type="string">
  The payment method used.
</ResponseField>

<ResponseField name="customerId" type="string<uuid>">
  The unique ID of the customer who made the transaction.
</ResponseField>

<ResponseField name="createdAt" type="number (timestamp)">
  The transaction creation time in epoch format (ms).
</ResponseField>

<ResponseField name="paymentLinkTransactionId" type="string<uuid>">
  The ID of the underlying payment link transaction.
</ResponseField>

<ResponseField name="fee" type="array of object">
  Additional fees applied to the transaction (empty if none).
</ResponseField>

<ResponseField name="paymentLinkId" type="string<uuid>">
  The ID of the product (payment link) the transaction belongs to.
</ResponseField>

<ResponseField name="subscriptionId" type="string | null">
  The subscription ID (if the transaction is a subscription).
</ResponseField>

<ResponseField name="xenditTransactionId" type="string | null">
  The Xendit transaction ID (if using the Xendit gateway).
</ResponseField>

<ResponseField name="subscription" type="object | null">
  Subscription details (if any).
</ResponseField>

<ResponseField name="xenditTransaction" type="object | null">
  Xendit transaction details (if any).
</ResponseField>

<ResponseField name="paymentLinkTransaction" type="object">
  Object that stores transaction details related to the payment link.
</ResponseField>

<ResponseField name="customeField" type="object | null">
  Additional custom fields filled by the customer (if any).
</ResponseField>

<ResponseField name="customer" type="object">
  Customer data that made the transaction.
</ResponseField>

<ResponseField name="paymentLink" type="object">
  Payment link (product) information used for the transaction.
</ResponseField>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.