> For the complete documentation index, see [llms.txt](https://docs.lenderlink.ph/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lenderlink.ph/product-guides/api-integration-guides/standalone-payment-transaction-data-api.md).

# Standalone Payment Transaction Data API

{% hint style="success" %}

#### For fast and easy development please use our specially designed GitHub repository for coding LLMs <https://github.com/lenderlink/lenderlink-docs>

{% endhint %}

This API returns payment transaction data for one or more standalone Payment Transaction products in a single request. Each product is requested, returned and processed independently.

| Product                | Product code | Response location | Guide                                                                                                        |
| ---------------------- | ------------ | ----------------- | ------------------------------------------------------------------------------------------------------------ |
| Payment Transactions 1 | `PT1`        | `data.PT1`        | [PT1 and PT2](/product-guides/api-integration-guides/standalone-payment-transaction-data-api/pt1-and-pt2.md) |
| Payment Transactions 2 | `PT2`        | `data.PT2`        | [PT1 and PT2](/product-guides/api-integration-guides/standalone-payment-transaction-data-api/pt1-and-pt2.md) |
| Payment Transactions 3 | `PT3`        | `data.PT3`        | [PT3](/product-guides/api-integration-guides/standalone-payment-transaction-data-api/pt3.md)                 |
| Payment Transactions 4 | `PT4`        | `data.PT4`        | [PT4](/product-guides/api-integration-guides/standalone-payment-transaction-data-api/pt4.md)                 |

{% hint style="info" %}
You can only request products that are enabled for your LenderLink account. Contact LenderLink to enable a product.
{% endhint %}

## Authentication

Obtain a token via the [Authentication](/product-guides/api-integration-guides/authentication.md) procedure. Your client credentials must have access to the Payment Transactions API.

## Request Data

### Endpoint

```
https://sandbox-app.lenderlink.ph/api/v1/person/payment-transactions/by-products
```

Web Method: **POST**

Send the request as a raw JSON body with `Content-Type: application/json`, and include the token as a Bearer access token in the `Authorization` header.

### Request Parameters

| Parameter       | Type            | Mandatory | Description                                                                                                       |
| --------------- | --------------- | --------- | ----------------------------------------------------------------------------------------------------------------- |
| requestId       | String          | Yes       | Unique identification code generated by the client                                                                |
| cellphoneNumber | String          | Yes       | Borrower's phone number, the format is 63XXXXXXXXXX. Other formats are rejected.                                  |
| email           | String          | No        | Borrower's email address                                                                                          |
| productIds      | Array of String | Yes       | Product codes to request, for example `["PT3", "PT4"]`. Each code can appear only once. Codes are case-sensitive. |

#### Request body (JSON)

```json
{
  "requestId": "8f14e45f-ceea-467a-9c1e-0a1b2c3d4e5f",
  "cellphoneNumber": "639000000001",
  "email": "borrower@example.com",
  "productIds": [
    "PT3",
    "PT4"
  ]
}
```

## Response Parameters

The system responds with HTTP status 200 and a JSON object in its body:

| Parameter  | Data Type       | Description                                                                                                                   |
| ---------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| productIds | Array of String | The product codes that returned a Hit, in the order they were requested                                                       |
| matchFlag  | String          | `Hit` if at least one product returned a Hit; otherwise `No Hit`                                                              |
| data       | Object          | One entry per product that returned a Hit, keyed by product code. Each product has its own structure; see the product guides. |

* Products that do not return a Hit are omitted from both `productIds` and `data`.
* An omitted product means no Hit was returned; it does not confirm that the borrower has no transactions. A product is also omitted when its data source cannot be reached or returns an unusable response.
* This response does not include `requestId`. Keep your own reference to match responses to requests.
* Property names are returned in camelCase. Values and nesting are returned as provided by the data source.
* PT1/PT2, PT3 and PT4 have different structures. Process each product independently.

### 1. Match

Both requested products returned a Hit (payloads shortened):

```json
{
  "productIds": [
    "PT3",
    "PT4"
  ],
  "matchFlag": "Hit",
  "data": {
    "PT3": {
      "statusCode": 200,
      "message": "Request Successful",
      "trackingId": "55555555-5555-4555-8555-555555555555",
      "data": [
        {
          "transactionCategory": "Topups",
          "mobileNumber": "639000000001",
          "amount": 500,
          "dateIn": "2026-08-14T09:35:40",
          "status": 2
        }
      ]
    },
    "PT4": {
      "withResults": true,
      "results": [
        {
          "txnId": "TXN_EXAMPLE_0001",
          "amount": "250.00",
          "sector": "EMI",
          "storeId": "STR_EXAMPLE_01",
          "merchantName": "Example Wallet",
          "transactionDate": "2026-08-14"
        }
      ]
    }
  }
}
```

### 2. Partial match

`PT3` and `PT4` were requested; only `PT4` returned a Hit:

```json
{
  "productIds": [
    "PT4"
  ],
  "matchFlag": "Hit",
  "data": {
    "PT4": {
      "withResults": true,
      "results": [
        {
          "txnId": "TXN_EXAMPLE_0001",
          "amount": "250.00",
          "sector": "EMI",
          "storeId": "STR_EXAMPLE_01",
          "merchantName": "Example Wallet",
          "transactionDate": "2026-08-14"
        }
      ]
    }
  }
}
```

### 3. No match

No product returned a Hit. This response is also returned when none of the requested data sources could provide a usable response.

```json
{
  "productIds": [],
  "matchFlag": "No Hit",
  "data": {}
}
```

## Errors

| HTTP Status | Message                                                                      | Description                                                                                                                                                            |
| ----------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 400         | Validation message, for example `"productIds" must contain at least 1 items` | The request body is invalid: a required field is missing, the phone format is wrong, or `productIds` is empty or contains duplicates. `details` describes the problem. |
| 400         | `PT_PRODUCT_UNSUPPORTED`                                                     | A product code is not recognised. Codes are case-sensitive.                                                                                                            |
| 401         | Unauthorized                                                                 | The token is missing, invalid or expired. Obtain a new token.                                                                                                          |
| 403         | Insufficient scope                                                           | Your credentials do not have access to this API.                                                                                                                       |
| 403         | `PT_PRODUCT_NOT_ENTITLED`                                                    | One or more requested products are not enabled for your account. `details` lists them. No products are returned.                                                       |
| 500         | An internal server error occurred                                            | Unexpected error. Retry later or contact LenderLink.                                                                                                                   |

```json
{
  "statusCode": 403,
  "error": "Forbidden",
  "message": "PT_PRODUCT_NOT_ENTITLED",
  "details": [
    {
      "productId": "PT2"
    }
  ]
}
```

## Using the Mega API

PT1, PT2, PT3 and PT4 can also be requested through the [Mega API](/product-guides/api-integration-guides/mega-api.md) together with other products. The product payloads are the same; the request and response wrappers differ:

|                       | This API                            | Mega API                                         |
| --------------------- | ----------------------------------- | ------------------------------------------------ |
| productIds in request | Array: `["PT3", "PT4"]`             | Comma-separated string: `"PT3,PT4"`              |
| Person fields         | `cellphoneNumber`, optional `email` | Full person details (name, date of birth, phone) |
| Product location      | `data.<productCode>`                | `response.<productCode>`                         |
| requestId returned    | No                                  | Yes                                              |
| matchFlag             | Yes                                 | No                                               |
