1. Sales
VasyOpenAPI
  • Branch
    • Branch List
      GET
  • Department
    • department
      GET
  • Category
    • category
      GET
    • subCategory
      GET
  • Brand
    • Brand
      GET
    • SubBrand
      GET
  • Contact
    • Transporter Contact List
      GET
    • Get Customer List W Branch Id
      GET
    • Get Contact By Id
      GET
    • Get Contact By Mobile No
      GET
    • contactSave
      POST
    • Supplier(Party)
      GET
  • GST
    • Verify GST
      POST
  • Master
    • Get Country List
    • Get State List
    • Get City List
    • Get Tax List
    • Get Additional Charge List
  • Product
    • Get Product List
    • Get Product By ID
    • products with inventory
    • product details with Inventory By Product ID
    • Product Variant List ID & Name
    • Variant Details By Variant ID
  • Recipe
    • Get All Recipe
  • User
    • Created By
  • Report
    • Get Sales Item Register Data
    • Purchase Item Register Report
    • Stock Summary Report
    • Stock Transfer Item Register Report
    • Consumption Production Report
  • Sales
    • Update Shipping Detail
      POST
    • Update Payment Status
      POST
    • Update Order Status
      POST
    • Get All Sales Data
      POST
    • Get Sales Data By Id
      GET
    • Order Create
      POST
    • Order Status
      GET
    • Shipping Details
      GET
    • Update Due Date
      POST
    • Update Order Status
      POST
  1. Sales

Update Payment Status

POST
/api/v1/sales/{salesId}/update-payment-status

Update Payment Status#

Purpose#

Update the payment status and payment details of an existing sales voucher in the specified branch.

Why would you use this?#

Use this API when payment for a sales voucher is received or its payment status changes after the voucher has been created. This allows external applications to synchronize payment information such as payment status, paid amount, payment mode, transaction ID, and transaction date with VasyERP.

Information Required#

Headers#

FieldRequiredDescription
api-tokenYesAuthentication token provided by VasyERP
Content-TypeYesMust be application/json

Path Parameters#

FieldRequiredDescription
salesIdYesUnique ID of the sales voucher whose payment status needs to be updated

Query Parameters#

FieldRequiredDescription
branch_idYesBranch ID in which the sales voucher exists

Request Body#

FieldRequiredDescriptionValidation
paymentStatusYesCurrent payment status of the sales voucherAccepted values: paid
paidAmountYesAmount received against the sales voucherMust be a positive numeric value
paymentModeYesMode of paymentExample: Cash, Online
transactionIdBased on conditionTransaction reference or payment reference ID if Online then compulsory and in form of cash notCan be null if not applicable
transactionDateTimeYesDate and time when the payment transaction was completedMust be in ISO 8601 format (e.g., 2027-08-30T15:30:00Z)

Example Use Case#

A payment gateway, accounting software, or third-party ERP receives confirmation that a customer has completed payment for a sales invoice. The application calls this API to update the payment status, paid amount, payment mode, transaction reference, and transaction date in VasyERP, ensuring that payment information remains synchronized across systems.

Important Notes#

The specified sales voucher must exist in the provided branch.
A valid 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.
This API updates only the payment-related details of the sales voucher. All other voucher information remains unchanged.
Invalid input values or missing required fields will result in a validation error response.

Request

Path Params

Query Params

Header Params

Body Params application/jsonRequired

Examples

Responses

🟢200Success
application/json
Bodyapplication/json

🟠403
🟠429
Request Request Example
Shell
JavaScript
Java
Swift
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"
}'
Response Response Example
200 - Success
{"status":true,"message":"Payment status updated successfully","code":"200","response":null}
Previous
Update Shipping Detail
Next
Update Order Status
Built with