---
title: Read
slug: quickbooks/LYV9-read
description: Learn how to read a QuickBooks payment with the provided Payment Id using this informative document. Gain insights into creating a Map to store payment data and making requests to the Breadwinner Global API. Discover valuable information in the response J
docTags: 
createdAt: 2021-10-29T05:37:09.000Z
---

The following is an example of read Payment. The QuickBooks Payment Id (Id) is required to read the payment.

:::CodeblockTabs
Request

```apex
//  Create a Map to store all the data of a Payment
Map<String, Object> paymentMap = new Map<String, Object>();
paymentMap.put('Id','379');

//  Initializing the Request Data to be passed.
    Map<String, Object> reqObj = new Map<String, Object>();
    reqObj.put('version', '1.0');
    reqObj.put('action', 'readPayment');
    reqObj.put('options',paymentMap);
    //Required, if QuickBooks Multi-Org is enabled in Breadwinner. 
    reqObj.put('qbOrgId', '4620816365285051610');

//  Placing a request to Breadwinner Global API
Map<String, Object> respMap = breadwinner_qbo.BreadwinnerQBAPI.call(reqObj);
System.debug(respMap);
```

Response

```json
{
   action=readPayment,
   responseJSON={
      "statusCode":200,
      "status":"OK",
      "payments":[
         {
            "UnappliedAmt":0,
            "TxnDate":"2022-08-16",
            "TotalAmt":75.00,
            "SyncToken":"0",
            "sparse":false,
            "MetaData":{
               "LastUpdatedTime":"2022-08-16T00:01:25-07:00",
               "CreateTime":"2022-08-16T00:01:25-07:00"
            },
            "Line":[
               {
                  "LinkedTxn":[
                     {
                        "TxnType":"Invoice",
                        "TxnId":"378"
                     }
                  ],
                  "Amount":75.00
               }
            ],
            "Id":"379",
            "DepositToAccountRef":{
               "value":"4"
            },
            "CustomerRef":{
               "value":"103",
               "name":"Payment Sync Test Two"
            },
            "CurrencyRef":{
               "value":"USD",
               "name":"United States Dollar"
            }
         }
      ]
   },
   timestamp=1661170693445,
   validRequest=true,
   version=1.0
}
```
:::

