Customer Refund
Refunds money back to a customer.
Path Parameter:
:DOCKEY (integer) — the internal document ID used in the URL pathEndpoints
GET
/customerrefundList documents with pagination and filters
GET
/customerrefund/:DOCKEYGet a single document by its internal ID
POST
/customerrefundCreate a new customer refund
PUT
/customerrefund/:DOCKEYUpdate an existing document
DELETE
/customerrefund/:DOCKEYDelete a document by its internal ID
Fields
| Field | Type | Required | Notes |
|---|---|---|---|
| docno | string | No | Leave blank to auto-generate the document number. Default: "" |
| docdate | string | Yes | Document date in YYYY-MM-DD. Proven: "2026-09-30". |
| code | string | Yes | code is the customer code. |
| paymentmethod | string | Yes | Bank or cash account code from GET /pmmethod → data[].code. Proven: "310-000". |
| docamt | string | No | Total document amount as a string decimal. Proven: "1000.00". |
| sdsdocdetail | array | Yes | Allocation lines — one entry per document being settled. |
| sdsdocdetail[].dtlkey | integer | No | Send 0 for a new allocation line. Default: 0 |
| sdsdocdetail[].fromdoctype | string | No | Document type being settled. Proven: "SI". |
| sdsdocdetail[].fromdocno | string | No | Document number being settled. Proven: "SI-00001". |
| sdsdocdetail[].amount | string | No | Amount applied against that document. Proven: "1000.00". |
Examples
POST — Create Customer Refund
POST /customerrefund
{
"docno": "",
"docdate": "2026-09-30",
"code": "CUS-01",
"paymentmethod": "310-000",
"docamt": "1000.00",
"sdsdocdetail": [
{
"dtlkey": 0,
"fromdoctype": "SI",
"fromdocno": "SI-00001",
"amount": "1000.00"
}
]
}GET — List Documents
GET /customerrefund?offset=0GET — Payment Methods
GET /pmmethod?offset=0DELETE
DELETE /customerrefund/1
Response: "OK" (plain text)Notes
- code is the customer code.
- Every payment and receipt requires an existing payment method — read the codes from GET /pmmethod.
