Read receipts against a customer or sales order, page through the receipt register with filters, and pull aggregated dashboard figures for a branch and financial year.
3 endpoints in this module. Every request needs a JWT bearer token — see Authentication.
A receipt records money taken from a customer — an advance against an order, a balance settlement on delivery, or a payment against an invoice. The dashboard endpoint aggregates that activity into the figures a store owner checks each morning.
Reading receipts lives here. Creating a receipt is part of the counter-billing
flow — see
Quick Sale
for /api/quickSale/SaveReceipt. To find out how much
is outstanding before taking a payment, use
/api/Orders/{salesOrderId}/advance-receipt-data.
Returns the receipts recorded against a customer and sales order — the payment
history for one order. Despite the path ending in id,
both identifiers are passed as query parameters and the response is an array.
| Name | Type | Required | Description |
|---|---|---|---|
| customerId | int64 | Required | Numeric customer ID — not the encrypted string. |
| salesOrderId | int64 | Required | Numeric sales order ID. |
| Field | Type | Description |
|---|---|---|
| receiptId | string | Encrypted receipt ID. |
| receiptNo | string | Receipt number as printed. |
| name | string | Customer name. |
| salesOrderNo | string | Order the payment applies to. |
| invoiceNO | string | Invoice number, if the receipt is against an invoice. |
| date | date-time | Receipt date. |
| amount | double | Amount taken on this receipt. |
| receiptTotalAmount | double | Total received against the order so far. |
| soTotalAmount | double | Order total. |
| balance | double | Balance still outstanding. |
| statusName | string | Receipt status label. |
curl "https://api.opto-soft.com/api/Receipts/id?customerId=30188&salesOrderId=104822" \
-H "Authorization: Bearer YOUR_TOKEN"
| Status | Cause |
|---|---|
| 404 | No receipts found for that customer and order. |
| 500 | Server error. |
The full receipt register with filters and paging — the collections view. Use
it for a daily-cash report, or to reconcile takings against a payment gateway.
Paging uses the pageNumber /
pageSize style.
| Field | Type | Required | Description |
|---|---|---|---|
| companyID | string | Required | Encrypted company ID — a string here, unlike the invoice search. |
| branchID | string | Required | Encrypted branch ID. |
| yearID | string | Required | Encrypted financial-year ID. |
| pageNumber | int32 | Required | 1-based page index. |
| pageSize | int32 | Required | Rows per page. |
| customerID | string | Optional | Encrypted customer ID. |
| customerName | string | Optional | Partial match on customer name. |
| customerMobile | string | Optional | Customer mobile number. |
| receiptNo | string | Optional | Receipt number. |
| receiptType | string | Optional | Payment type. Values from GET /api/quickSale/Fetch-Receipt-Type. |
| salesOrderNo | string | Optional | Filter to one order. |
| invoiceNO | string | Optional | Filter to one invoice. |
| date | string | Optional | Single receipt date. |
| fromDate | string | Optional | Start of a date range. |
| toDate | string | Optional | End of a date range. |
| amount | string | Optional | Exact amount filter. |
| status | string | Optional | Receipt status filter. |
| orderBy | string | Optional | Sort column, optionally with DESC. |
curl -X POST https://api.opto-soft.com/api/Receipts/list-paged \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"companyID": "ENCRYPTED_COMPANY_ID",
"branchID": "ENCRYPTED_BRANCH_ID",
"yearID": "ENCRYPTED_YEAR_ID",
"fromDate": "2026-07-26",
"toDate": "2026-07-26",
"pageNumber": 1,
"pageSize": 50,
"orderBy": "ReceiptDate DESC"
}'
| Field | Type | Description |
|---|---|---|
| totalRows | int32 | Total matching receipts, before paging. |
| data[].receiptId | string | Encrypted receipt ID. |
| data[].receiptNo | string | Receipt number. |
| data[].receiptType | string | Payment method. |
| data[].receiptDate | date-time | Date taken. |
| data[].customerName | string | Customer name. |
| data[].customerMobileNo | string | Customer mobile number. |
| data[].salesOrderNo | string | Order the payment applies to. |
| data[].invoiceNO | string | Invoice number, where applicable. |
| data[].amount | double | Amount on this receipt. |
| data[].salesOrderAmount | double | Order total. |
| data[].totalReceipt | double | Total received against the order. |
| data[].itemCount | int32 | Line items on the order. |
| data[].status | string | Status label. |
| data[].statusID | int32 | Numeric status. |
{
"totalRows": 41,
"data": [
{
"receiptId": "ENCRYPTED_RECEIPT_ID",
"receiptNo": "RCP/2026/002210",
"receiptType": "UPI",
"receiptDate": "2026-07-26T10:12:00",
"customerName": "Anita Shah",
"customerMobileNo": "9876543210",
"salesOrderNo": "SO/2026/001842",
"amount": 3000.00,
"salesOrderAmount": 8450.00,
"totalReceipt": 3000.00,
"status": "Cleared",
"statusID": 1
}
]
}
Returns the aggregated figures shown on the OptoSoft dashboard for a branch and financial year — sales totals, order counts by status, collections and outstanding balances. This is the endpoint to feed a BI tool or an owner’s summary screen.
| Field | Type | Required | Description |
|---|---|---|---|
| branchID | string | Required | Encrypted branch ID to report on. |
| yearID | string | Required | Encrypted financial-year ID. |
| statusId | int32 | Optional | Restrict the aggregation to one order status. |
| date | date-time | Optional | Reporting date. Omit for the current date. |
curl -X POST https://api.opto-soft.com/api/Dashboard/dashboardData \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"branchID": "ENCRYPTED_BRANCH_ID",
"yearID": "ENCRYPTED_YEAR_ID",
"date": "2026-07-26T00:00:00"
}'
The response shape is not declared in the OpenAPI specification. Parse it defensively, and cache the result rather than calling it on every page view — it is an aggregate query.