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 | number | Amount taken on this receipt. |
| StatusName | string | Receipt status label. |
| Balance | number | Balance still outstanding. |
| ReceiptTotalAmount | number | Total received against the order so far. |
| SOTotalAmount | number | Order total. |
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. |
[
{
"ReceiptId": "Q2ZQdGhSZVhBaVlXTnpaWFF3TWk0d01B",
"ReceiptNo": "REC-2024-0321",
"Name": "Advance",
"SalesOrderNo": "SO-2024-0568",
"InvoiceNO": "INV-2024-1042",
"Date": "2024-01-16T00:00:00",
"Amount": 3000.00,
"StatusName": "Active",
"Balance": 5500.00,
"ReceiptTotalAmount": 3000.00,
"SOTotalAmount": 8500.00
}
]
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 |
|---|---|---|
| Items[].ReceiptId | string | Encrypted receipt ID. |
| Items[].ReceiptNo | string | Receipt number. |
| Items[].ReceiptType | string | Payment method. |
| Items[].SalesOrderNo | string | Order the payment applies to. |
| Items[].InvoiceNO | string | Invoice number, where applicable. |
| Items[].CustomerName | string | Customer name. |
| Items[].CustomerMobileNo | string | Customer mobile number. |
| Items[].ReceiptDate | date-time | Date taken. |
| Items[].Amount | number | Amount on this receipt. |
| Items[].SalesOrderAmount | number | Order total. |
| Items[].Status | string | Status label. |
| Items[].StatusID | integer | Numeric status. |
| Items[].ItemCount | integer | Line items on the order. |
| Items[].TotalReceipt | number | Total received against the order. |
| Total | integer | |
| PageNumber | integer | |
| PageSize | integer |
{
"Items": [
{
"ReceiptId": "Q2ZQdGhSZVhBaVlXTnpaWFF3TWk0d01B",
"ReceiptNo": "REC-2024-0321",
"ReceiptType": "Advance",
"SalesOrderNo": "SO-2024-0568",
"InvoiceNO": "INV-2024-1042",
"CustomerName": "Rajesh Sharma",
"CustomerMobileNo": "9876543210",
"ReceiptDate": "2024-01-16T00:00:00",
"Amount": 3000.00,
"SalesOrderAmount": 8500.00,
"Status": "Active",
"StatusID": 1,
"ItemCount": 1,
"TotalReceipt": 3000.00
}
],
"Total": 38,
"PageNumber": 1,
"PageSize": 20
}
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"
}'
This is an aggregate query. Parse it defensively, and cache the result rather than calling it on every page view — it is an aggregate query.
{
"TodaySalesOrder": 12500.50,
"MonthlySalesOrder": 385000.00,
"TotalSalesOrder": 4250000.00,
"TodayReceipt": 9500.00,
"MonthlyReceipt": 310000.00,
"TotalReceipt": 3800000.00,
"TodayCustomers": 8,
"MonthlyCustomers": 215,
"TotalCustomers": 3420
}