---
title: Read
slug: netsuite/0p5R-read
description: This document guides users on effectively understanding and retrieving customer payments by utilizing various search parameters like dateCreated, internalId, lastModifiedDate, subsidiary, additonalFilter, tranDate, and customer. It includes example code i
docTags: 
createdAt: 2021-12-14T12:51:16.000Z
---

To read Customer Payments, please use the below parameters.

### Supported “*where*” Filters

| **Field Name**   | **Data Type** | **Description**                                                                                                                                                                                |
| ---------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| dateCreated      | Long          | This will filter on an exact match (equal). Use the “additionalFilter” option for a range of dates.                                                                                            |
| internalId       | String        | Internal ID of the Customer Payment. Multiple values can be passed in a comma-separated string.                                                                                                |
| lastModifiedDate | Long          | This will filter on an exact match (equal). Use the “additionalFilter” option for a range of dates.                                                                                            |
| subsidiary       | String        | Internal ID of Subsidiary (Primary). Do Not Use this in additonalFilter. Multiple IDs can be passed in a comma-separated string Ex: 1,2                                                        |
| additonalFilter  | String        | construct the additional filter with a combination of the above fields using ‘+and+’ separator and pass it as a single string. Make sure to wrap the whole string using EncodingUtil.urlEncode |
| tranDate         | Long          | Transaction date of the record. Use the “additionalFilter” option for a range of dates.                                                                                                        |
| customer         | String        | To filter the records based on the Customer. Multiple IDs can be passed in a comma-separated string Ex: 6,7                                                                                    |

### Supported “where” Filters

### Example

:::CodeblockTabs
Request

```apex
Map<String, Object> filters = new Map<String, Object>();
filters.put('subsidiary', '1,2');
filters.put('additionalFilter', EncodingUtil.urlEncode('lastModifiedDate>1628091060+and+lastModifiedDate<1629127860', 'UTF-8')); 
// Encode additionalFilter after constructing it with +and+ for multi-filters

// field filters and additionalFilter for where param
Map<String, Object> filterMap = new Map<String, Object>();
filterMap.put('where', new Map<String, Object>{'keyValueMap'=>filters}); 

Map<String, Object> requestJSONMap = new Map<String, Object>();
requestJSONMap.put('customParameters', filterMap);

String reqJSON = JSON.serialize(requestJSONMap);

Map<String, Object> reqObj = new Map<String, Object>();
reqObj.put('version', '1.0');
reqObj.put('action', 'readCustomerPayment');
reqObj.put('requestJSON', reqJSON);

//  Place a request to Breadwinner Global API
Map<String, Object> resp = breadwinner_ns.BreadwinnerNetSuiteAPI.call(reqObj);
System.debug(resp);
```

Response

```json
{
  action=readCustomerPayment,
  timestamp=1657008542320,
  validRequest=true,
  version=1.0,
  responseJSON={
    "currentPageRecords": null,
    "totalRecords": 2,
    "totalPages": 1,
    "searchId": "WEBSERVICES_5333445_SB1_070520228488435641642000880_d6b06635",
    "pageIndex": 1,
    "errors": [
      
    ],
    "customParamters": {
      "where": {
        "value": null,
        "keyValueMap": {
          "internalId": "96508,96608"
        }
      }
    },
    "status": "200""customerPayments": [
      {
        "undepFunds": null,
        "unapplied": 400.0,
        "tranId": "110",
        "tranDate": 1599375600,
        "subsidiary": {
          "type": null,
          "name": "Parent Company",
          "internalId": "1",
          "externalId": null
        },
        "status": "Not Deposited",
        "salesforceID": null,
        "payment": 400.0,
        "memo": "Payment# 12",
        "location": null,
        "lastModifiedDate": 1644230574,
        "internalId": "96508",
        "externalId": null,
        "exchangeRate": 1.0,
        "department": null,
        "customForm": null,
        "customFieldList": {
          "customField": [
            {
              "valueLookup": null,
              "value": "false",
              "scriptId": "custbody_checkbox",
              "internalId": "272",
              "fieldType": null
            },
            {
              "valueLookup": null,
              "value": "false",
              "scriptId": "custbody_edoc_gen_trans_pdf",
              "internalId": "925",
              "fieldType": null
            },
            {
              "valueLookup": null,
              "value": "false",
              "scriptId": "custbody_ei_ds_txn_identifier",
              "internalId": "932",
              "fieldType": null
            }
          ]
        },
        "customer": {
          "type": null,
          "name": "CUST1058AT Stella pa 1",
          "internalId": "75389",
          "externalId": null
        },
        "currencyName": "US Dollars",
        "createdDate": 1644230574,
        "classification": null,
        "applyList": null,
        "applied": 0.0
      },
      {
        "undepFunds": null,
        "unapplied": 400.0,
        "tranId": "111",
        "tranDate": 1599375600,
        "subsidiary": {
          "type": null,
          "name": "Parent Company",
          "internalId": "1",
          "externalId": null
        },
        "status": "Not Deposited",
        "salesforceID": null,
        "payment": 400.0,
        "memo": "Payment# 12",
        "location": null,
        "lastModifiedDate": 1644230738,
        "internalId": "96608",
        "externalId": null,
        "exchangeRate": 1.0,
        "department": null,
        "customForm": null,
        "customFieldList": {
          "customField": [
            {
              "valueLookup": null,
              "value": "false",
              "scriptId": "custbody_checkbox",
              "internalId": "272",
              "fieldType": null
            },
            {
              "valueLookup": null,
              "value": "false",
              "scriptId": "custbody_edoc_gen_trans_pdf",
              "internalId": "925",
              "fieldType": null
            },
            {
              "valueLookup": null,
              "value": "false",
              "scriptId": "custbody_ei_ds_txn_identifier",
              "internalId": "932",
              "fieldType": null
            }
          ]
        },
        "customer": {
          "type": null,
          "name": "CUST1058AT Stella pa 1",
          "internalId": "75389",
          "externalId": null
        },
        "currencyName": "US Dollars",
        "createdDate": 1644230738,
        "classification": null,
        "applyList": null,
        "applied": 0.0
      }
    ],
  }, 
}
```
:::

