# API create list of virtual accounts

* This is the API used to create a list of virtual accounts in the collection service.

### Sequence Diagram:

<figure><img src="https://1419689564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFdTKNedABvGBtqJRHWA0%2Fuploads%2F1DlyGU6JJ29pNbNIxWMl%2FPicture1.png?alt=media&#x26;token=95f2181f-88e7-4d51-b87c-6ce55fa1ba7a" alt=""><figcaption></figcaption></figure>

* API:
  * Path: *v2/col/requests*
  * Method: *POST*
  * Request: Content-Type: *application/json*

### **Request Parameter**

<table><thead><tr><th width="180">Parameter</th><th width="127">Data Type</th><th width="136">Required</th><th>Description</th></tr></thead><tbody><tr><td>requestId</td><td>String</td><td>Y</td><td><p>The ID of the request.</p><p>(UUID is generated by merchant)</p></td></tr><tr><td>virtualAccounts</td><td>Array</td><td>Y</td><td><p>The array contains the list of virtual accounts.</p><p>Refer to <a href="#virtualaccounts">VirtualAccounts</a></p></td></tr></tbody></table>

#### VirtualAccounts

<table><thead><tr><th>Parameter</th><th width="119">Data Type</th><th width="103">Required</th><th>Description</th></tr></thead><tbody><tr><td>accountName</td><td>String</td><td>Y</td><td>Bank account name<br>Validate [A-Z0-9]{5,200}</td></tr><tr><td>virtualAccountRequestId</td><td>String</td><td>Y</td><td>The ID of seller/business is provided by merchant.<br>This value is unique.</td></tr><tr><td>accountAddress</td><td>String</td><td>Y</td><td><p>The address of account.</p><p>(includes the district, province)</p></td></tr><tr><td>frontIdCard</td><td>String</td><td>N</td><td>The file name of photo of the front of the ID card</td></tr><tr><td>backIdCard</td><td>String</td><td>N</td><td>The file name of photo of the back of the ID card</td></tr><tr><td>profileImg</td><td>String</td><td>N</td><td>The file name of portrait</td></tr><tr><td>businessRegistration</td><td>String</td><td>N</td><td>The file name of the business license.</td></tr><tr><td>serviceInformation</td><td>Object</td><td>N</td><td>Extra data about VA for classification purpose. Refer: <a href="#serviceinformation">ServiceInformation</a></td></tr><tr><td>profileData</td><td>Object</td><td>N</td><td>Virtual account profile data. Refer: <a href="#profiledata">ProfileData</a></td></tr></tbody></table>

#### ServiceInformation

<table><thead><tr><th width="143">Parameter</th><th width="192">Data Type</th><th width="108">Required</th><th>Description</th></tr></thead><tbody><tr><td>code</td><td>String(20)<br>(alphanumeric)</td><td>N</td><td>Service code which is defined by the merchants. This code will be used to filter the VAs and grouped Reconciliations on Merchant Portal</td></tr><tr><td>groupId</td><td>String(20)<br>(alphanumeric)</td><td>N</td><td>Id of VA group which is defined by the merchants. This id will be used to filter the VAs on Merchant Portal</td></tr><tr><td>desc</td><td>String(255)</td><td>N</td><td>Description of VA</td></tr></tbody></table>

#### ProfileData

| Parameter             | Data Type                  | Required | Description                                                                                                                       |
| --------------------- | -------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------- |
| merchantId            | String                     | N        | Is the ID that has been retrieved by the PSP's system, allocated to the particular merchant                                       |
| merchantName          | String                     | N        | Merchant Name is the registered name, has been retrieved from PSP's system                                                        |
| merchantAddress       | String                     | N        | Is the address that Merchant has registered with the PSP platform                                                                 |
| tcAcceptantDate       | Datetime String (ISO 8601) | N        | Is the time when the merchant has accepted the Terms and Conditions to use the service provided by PSP                            |
| legalRepresentative   | String                     | N        | Full name of the legal representative of the merchant                                                                             |
| dob                   | Datetime String (ISO 8601) | N        | Day of birth of legal representative/contact person                                                                               |
| nationalIdNumber      | String                     | N        | National ID/Passport of the legal representative of the merchant                                                                  |
| nationality           | String                     | N        | Nationality of the legal representative of the merchant                                                                           |
| industrySegment       | String                     | N        | Based on the existing PSP system industry classification, the merchant needs to be classified into a particular industry segment. |
| businessType          | String                     | N        | Company/Individual                                                                                                                |
| businessLicenseNumber | String                     | N        | The license number presented in the business license has been submitted to the PSP while on board the merchant                    |
| ecomSite              | String                     | N        | Ecommerce Site (eg: "SHOPEE", "AMAZON", etc)                                                                                      |
| shopName              | String                     | N        | Shop name on ecommerce site                                                                                                       |
| shopUrl               | String                     | N        | Shop URL                                                                                                                          |

### **Response Data**

<table><thead><tr><th width="187.33333333333331">Parameter</th><th width="127">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>data</td><td>Object</td><td>Ref to <a href="#data-object">data</a> object.</td></tr><tr><td>message</td><td>String</td><td>Error description.</td></tr></tbody></table>

#### data object

<table><thead><tr><th width="187.33333333333331">Parameter</th><th width="127">Data Type</th><th>Description</th></tr></thead><tbody><tr><td>requestId</td><td>String</td><td>The requestId in the request body.</td></tr><tr><td>merchantId</td><td>String</td><td>The ID of the merchant</td></tr><tr><td>status</td><td>String</td><td>The status of virtual account creation request.<br><em>PASSED: Waiting for approval</em><br><em>FAILED: Failed request</em></td></tr><tr><td>message</td><td>String</td><td>Error message detail.</td></tr></tbody></table>
