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

<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",
      "data": [
          {
              "id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
              "createdAt": 1768375011056,
              "type": "CHILD",
              "amount": 150000,
              "status": "created",
              "urlParamTrackingData": null,
              "paymentLinkId": "6f8c19ff-5b97-4792-aa89-d2a12797b356",
              "customerId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
              "customeField": null,
              "customer": {
                  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                  "email": "budi.santoso@example.com",
                  "name": "Budi Santoso",
                  "mobile": "081234567890"
              },
              "paymentLink": {
                  "id": "6f8c19ff-5b97-4792-aa89-d2a12797b356",
                  "type": "generic_link",
                  "category": null,
                  "createdAt": 1768375011056,
                  "description": "<p>Jasa pembuatan website company profile.</p>\n",
                  "link": "jasa-pembuatan-website",
                  "name": "Jasa Pembuatan Website",
                  "redirectUrl": null,
                  "userId": "348e083d-315a-4e5c-96b1-5a2a98c48413",
                  "coverImageId": "2529541f-dc98-4ca0-93bb-3c1d35a8dd07",
                  "multipleImageId": null,
                  "coverImage": null,
                  "multipleImage": null
              },
              "productName": "Jasa Pembuatan Website",
              "productType": "generic_link",
              "productLink": "jasa-pembuatan-website"
          }
      ],
      "hasMore": false,
      "nextStartingAfter": "1768375011056"
  }
  ```
</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.club/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="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="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">
  Unique identifier of the transaction.
</ResponseField>

<ResponseField name="createdAt" type="number">
  Timestamp in milliseconds indicating when the transaction was created.
</ResponseField>

<ResponseField name="type" type="string">
  Transaction type.
</ResponseField>

<ResponseField name="amount" type="integer">
  Transaction amount.
</ResponseField>

<ResponseField name="status" type="string">
  Current transaction status (e.g., `created`, `paid`, `expired`).
</ResponseField>

<ResponseField name="urlParamTrackingData" type="object | null">
  URL parameter tracking data attached to the transaction, if any.
</ResponseField>

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

<ResponseField name="customerId" type="string | null">
  Identifier of the customer who made the transaction.
</ResponseField>

<ResponseField name="customeField" type="object | null">
  Custom field data captured at checkout, if any.
</ResponseField>

<ResponseField name="customer" type="object | null">
  Customer details associated with the transaction.
</ResponseField>

<ResponseField name="paymentLink" type="object | null">
  Product (payment link) details associated with the transaction.
</ResponseField>

<ResponseField name="productName" type="string">
  Name of the product the transaction belongs to.
</ResponseField>

<ResponseField name="productType" type="string">
  Type of the product the transaction belongs to.
</ResponseField>

<ResponseField name="productLink" type="string">
  Slug of the product the transaction belongs to.
</ResponseField>
