Skip to main content

Create Payment

Request

POST:/{accountBookId}/payment

Request Body

object: Cash Book Entry Input Model

Example Request Body
{
"master": {
"docNo": "PV-000001",
"docNo2": "",
"docNoFormatName": null,
"docType": "PV",
"docDate": "2023-03-13",
"taxDate": "2023-03-13",
"currencyCode": "MYR",
"currencyRate": 1,
"journalType": "GENERAL",
"dealWith": "Apparel Supplier",
"description": "Pants payment",
"note": ""
},
"details": [
{
"accNo": "400-0001",
"toAccountRate": 1,
"description": "Payment for PI-000001",
"furtherDescription": "",
"amount": 472.5,
"taxCode": "",
"taxAdjustment": 0,
"localTaxAdjustment": 0,
"tariffCode": "",
"taxExportCountry": "",
"taxPermitNo": "",
"taxBRNo": "",
"taxBName": "",
"taxRefNo": "",
"taxRegisterNo": "",
"taxBillDate": null,
"salesAgent": "",
"inclusiveTax": true,
"deptNo": ""
}
],
"paymentDetails": [
{
"paymentMethod": "CASH",
"paymentBy": "",
"chequeNo": "",
"floatDay": 0,
"bankCharge": 0,
"toBankRate": 1,
"paymentAmt": 472.5,
"bankChargeTaxCode": "",
"bankChargeTaxRate": 0,
"bankChargeTax": 0,
"bankChargeTaxRefNo": ""
}
],
"autoFillOption": {
"taxCode": false,
"tariffCode": false
}
}

Example Request URL:

Parameters:
accountBookId = 1

URL:
POST: https://accounting-api.autocountcloud.com/1/payment

Response

Success Response

Code: 201

Response Headers

location: The link to the created record, similar to request url in Get Payment API method.

Example Success Response Headers
content-length: 0 
date: Mon,13 Mar 2023 09:26:56 GMT
location: https://accounting-api.autocountcloud.com/1/payment?docNo=PV-000001
server: Microsoft-IIS/10.0
x-powered-by: ASP.NET
x-rate-limit-limit: 1m
x-rate-limit-remaining: 99
x-rate-limit-reset: 2023-03-13T09:27:43.1012005Z

Error Response

Response Body

object: Error Response Model

Example Error Response Body
{
"statusCode": 401,
"message": "401 Unauthorized."
}