---
# System prepended metadata

title: Setu Line items <> Payer App

---

# Setu Line items <> Payer App



## API details to be consumed

Payer App needs to consume the line items and fees in the bill object to display the break up of the bill to the end customer.

These details are already sent as part of existing API integration, but Payer App is not consuming these details as of now.

When Setu sends a bill as part of the fetch Bills API, it contains the following along with other details

1. Additional fees
2. Line items in the bill


Let us look at a sample bill response


```json=
{
  "status": 200,
  "success": true,
  "data": {
    "bills": [
      {
        "aggregates": {
          "total": {
            "amount": {
              "value": 311446
            },
            "displayName": "Total amount to be paid"
          }
        },
        "amountExactness": "EXACT",
        "billType": "COLLECT",
        "billerActorID": "4253121318099926",
        "billerBillID": "1956947- 1956947",
        "billerCategory": "7322",
        "customer": {
          "name": "Nikhilesh  Pinnamaneni"
        },
        "customerAccount": {
          "id": "18GES1040181"
        },
        "discounts": [],
        "dueDate": "2019-04-15T00:00:00.000Z",
        "fees": [
          {
            "aggregates": {
              "total": {
                "value": 1446
              }
            },
            "displayName": "other fees"
          },
          {
            "aggregates": {
              "total": {
                "value": 100000
              }
            },
            "displayName": "Late payment fees"
          }
        ],
        "generatedOn": "2020-03-17T09:30:20.000Z",
        "items": [
          {
            "aggregates": {
              "total": {
                "value": 300000
              }
            },
            "displayName": "EMI"
          }
        ],
        "recurrence": "ONE_TIME",
        "taxes": [],
        "validationRules": {},
        "name": "Bill-1956949",
        "paymentAddresses": [],
        "platformBillID": "323209135397013202",
        "platformBillStatus": "BILL_CREATED"
      }
    ]
  }
}
```

Here, take a look at the fees and items section


```json=
{
....
"fees": [
  {
    "aggregates": {
      "total": {
        "value": 1446
      }
    },
    "displayName": "other fees"
  },
  {
    "aggregates": {
      "total": {
        "value": 100000
      }
    },
    "displayName": "Late payment fees"
  }
],
"generatedOn": "2020-03-17T09:30:20.000Z",
"items": [
  {
    "aggregates": {
      "total": {
        "value": 300000
      }
    },
    "displayName": "EMI"
  }
]
....
}
```



There are these fees and line items


<table>
<tbody>
<tr>
<td><strong>Item</strong></td>
<td><strong>Value</strong></td>
</tr>
<tr>
<td>EMI</td>
<td>3000.00</td>
</tr>
<tr>
<td>Late payment fees</td>
<td>100.00</td>
</tr>
<tr>
<td>Other fees</td>
<td>14.46</td>
</tr>
<tr>
<td><strong>Total</strong></td>
<td><strong>3114.46</strong></td>
</tr>
</tbody>
</table>

Both `items` and `fees` are `arrays` and each item in the `array` has the following structure

```json=
{
  "aggregates": {
    "total": {
      "value": <integer>
    }
  },
  "displayName": <String>
}
```

You need to loop through the array to get the all the fees and items in the bill.


# Test data

```
{
  "billerProductInstanceID": "2797663296409352340",
  "customerIdentifiers": [
    {
      "attributeName": "loanNumber",
      "attributeValue": "L1N3T3MS00"
    }
  ]
}
```

L1N3T3MS00 to L1N3T3MS39

that is for example

1. L1N3T3MS00
2. L1N3T3MS02
3. L1N3T3MS03
5. L1N3T3MS14


