# API update Virtual Account transaction data from merchant

* API:
  * Path: *v2/col/virtual-accounts/:vaNumber/trans-data*
  * Method: *PUT*
  * Request: Content-Type: *application/json*

### **Request Parameter**

<table><thead><tr><th width="184">Parameter</th><th width="124">Data Type</th><th width="101">Required</th><th>Description</th></tr></thead><tbody><tr><td>transData</td><td>Array</td><td>Y</td><td><p>The array contains the list of transaction data from the merchant.</p><p>Refer to TransactionData</p></td></tr><tr><td>batchId</td><td>String</td><td>Y</td><td>The Id of merchant batch process for this Virtual Account</td></tr><tr><td>batchTime</td><td>Date</td><td>Y</td><td>The ISODate of merchant batch process for this Virtual Account</td></tr><tr><td>batchAmount</td><td>Number</td><td>Y</td><td>The amount of merchant batch process for this Virtual Account</td></tr><tr><td>neoTransInfo</td><td>Array</td><td>N</td><td><p>The array contains the list of Neo Collection transactions related to this merchant batch process.</p><p>Refer to NeoTransactionInfo.</p></td></tr><tr><td>note</td><td>String</td><td>N</td><td>The note for this merchant batch process</td></tr></tbody></table>

### **TransactionData**

<table><thead><tr><th width="182">Parameter</th><th width="131">Data Type</th><th width="111">Required</th><th>Description</th></tr></thead><tbody><tr><td>id</td><td>String</td><td>Y</td><td>The ID of transaction/Order</td></tr><tr><td>amount</td><td>Number</td><td>Y</td><td>The transaction/order amount</td></tr><tr><td>desc</td><td>String</td><td>N</td><td>The description of transaction</td></tr><tr><td>extraInfo</td><td>Object</td><td>N</td><td>The extra info for transaction.<br>Refer to <a href="#transactionextrainfo"><strong>TransactionExtraInfo</strong></a></td></tr></tbody></table>

### **TransactionExtraInfo**

<table><thead><tr><th width="202">Parameter</th><th width="111">Data Type</th><th width="97">Required</th><th>Description</th></tr></thead><tbody><tr><td>depot</td><td>String</td><td>N</td><td>Extra info from merchant for transaction.</td></tr><tr><td>invoicingCompany</td><td>String</td><td>N</td><td>Invoicing Company</td></tr><tr><td>vendor</td><td>String</td><td>N</td><td>vendor</td></tr><tr><td>dmId</td><td>String</td><td>N</td><td>Delivery man ID</td></tr><tr><td>dmName</td><td>String</td><td>N</td><td>Delivery man name</td></tr><tr><td>invoiceDate</td><td>String</td><td>N</td><td>Invoice Date</td></tr></tbody></table>

### **NeoTransactionInfo**

<table><thead><tr><th width="204">Parameter</th><th width="109">Data Type</th><th width="101">Required</th><th>Description</th></tr></thead><tbody><tr><td>transId</td><td>String</td><td>Y</td><td>The Transaction Id of collection transaction from NeoX.</td></tr><tr><td>amount</td><td>Number</td><td>N</td><td>The actual process amount from merchant for this collection transaction.</td></tr></tbody></table>

## **Response Data**

<table><thead><tr><th width="203">Parameter</th><th width="143.33333333333331">Data Type</th><th>Description</th></tr></thead><tbody><tr><td>code</td><td>Number</td><td>Error code, refer to <a href="https://github.com/neopayvn/neox-gitbook-documents-v1/blob/main/collections/integration/virtual-accounts/error-codes.md">table of error codes</a>.</td></tr><tr><td>message</td><td>String</td><td>Error description.</td></tr><tr><td>data</td><td>Object</td><td>Refer to <a href="#updatevirtualaccounttransactionsresponse">UpdateVirtualAccountTransactionsResponse</a></td></tr><tr><td>neoResponseId</td><td>String</td><td>The ID of NeoX response</td></tr></tbody></table>

### UpdateVirtualAccountTransactionsResponse

<table><thead><tr><th width="240">Parameter</th><th width="115">Data Type</th><th>Description</th></tr></thead><tbody><tr><td>batchId</td><td>String</td><td>The Id of merchant batch process for this Virtual Account</td></tr><tr><td>virtualAccountBalance</td><td>Number</td><td>Current Virtual Account balance</td></tr><tr><td>transData</td><td>Array</td><td><p>The array contains the list of transaction data from the merchant.</p><p>Refer to <a href="#transactiondataresult">TransactionDataResult</a></p></td></tr></tbody></table>

### TransactionDataResult

<table><thead><tr><th width="164">Parameter</th><th width="133">Data Type</th><th>Description</th></tr></thead><tbody><tr><td>id</td><td>String</td><td>The ID of transaction/Order</td></tr><tr><td>amount</td><td>Number</td><td>The transaction/order amount</td></tr><tr><td>desc</td><td>String</td><td>The description of transaction</td></tr><tr><td>settleStatus</td><td>String</td><td>Settlement status of transaction.<br>"UNSETTLED": Transaction has not been settled yet<br>"SETTLED": The transaction has been settled</td></tr><tr><td>extraInfo</td><td>Object</td><td>The extra info for transaction.<br>Refer to <strong>TransactionExtraInfo</strong></td></tr></tbody></table>
