| Field | Required | Description |
|---|---|---|
| api-token | Yes | Authentication token provided by VasyERP |
| Content-Type | Yes | Must be application/json |
| Field | Required | Description |
|---|---|---|
| salesId | Yes | Unique ID of the sales voucher whose payment status needs to be updated |
| Field | Required | Description |
|---|---|---|
| branch_id | Yes | Branch ID in which the sales voucher exists |
| Field | Required | Description | Validation |
|---|---|---|---|
| paymentStatus | Yes | Current payment status of the sales voucher | Accepted values: paid |
| paidAmount | Yes | Amount received against the sales voucher | Must be a positive numeric value |
| paymentMode | Yes | Mode of payment | Example: Cash, Online |
| transactionId | Based on condition | Transaction reference or payment reference ID if Online then compulsory and in form of cash not | Can be null if not applicable |
| transactionDateTime | Yes | Date and time when the payment transaction was completed | Must be in ISO 8601 format (e.g., 2027-08-30T15:30:00Z) |
api-token is required to authenticate the request.paymentStatus, paidAmount, paymentMode, and transactionDateTime are mandatory fields.transactionDateTime must be provided in ISO 8601 format.paidAmount should be a valid positive numeric value.transactionId is optional and may be null if no transaction reference is available.curl --location '/api/v1/sales/84698598/update-payment-status?branch_id=5999' \
--header 'api-token: af9ad6a5-593e-4bxq-a5c3-664129ebfger' \
--header 'Content-Type: application/json' \
--data '{
"paymentStatus": "Paid",
"paidAmount":"200",
"paymentMode": "Online",
"transactionId": null,
"transactionDateTime": "2027-08-30T15:30:00Z"
}'{"status":true,"message":"Payment status updated successfully","code":"200","response":null}