---
title: Create VA
description: Create or assign a virtual account for a user.
---

A Virtual Account is a digital payment method through an account that is created virtually for each customer. To make payments, customers will be referred to their own Virtual Accounts. This API will create/assign virtual account for user provided if we pass merchant id and buyer phone then it returns assigned virtual account number along with other bank details.

#### POST

```
https://kraken.airpay.co.in/airpay/va/api/
```

## Header

| Parameter | Type Value | Description | Value Like |
| --- | --- | --- | --- |
| Content-Type  required | String | application/x-www-form-urlencoded |

## Request Body

| Parameter | Type Value | Description | Value Like |
| --- | --- | --- | --- |
| action  required | String | Action to perform - create | `create` |
| private_key  required | Alphanumeric | Private Key (length 10-200)<br>privatekey = hash('sha256', secret.'@'.username.':|:'.password) | `71a4efaf21c79864ec154babfc494f45fd1f65a570805084965d5b29486f1dfe` |
| merchant_id  required | Numeric | Merchant Id | `1` |
| buyer_phone  required | Numeric|Space|Hyphen | Mobile number of user | `7208246368` |
| buyer_email  required | Email | Email Id of user | `consultant.prathamesh@airpay.co.in` |
| UID  required | Alphanumeric | Unique user identifier from the merchant | `1235` |
| checksum  required | Alphanumeric | Hash generated by : sha1(buyer_email.buyer_phone.UID.action.merchant_id.private_key) (required) | `a1d4d016a23a4c7bff1fe0c965bc1f987de37ac2` |
| mer_dom  optional | Alphanumeric  <br>(1-50) | Merchant Domain in BASE_64 | `aHR0cCUzQSUdyRiUyRmtovY2FsaG9zdA==` |

## Success 200

| Parameter | Type Value | Description | Value Like |
| --- | --- | --- | --- |
| STATUS  required | Number | Status Code Success - 200<br>Failed - 400 | `200,400` |
| MESSAGE  required | String | Status Message<br>Success - 200 Transaction is success<br>Transaction in Process - 211 Transaction in processing<br>Failed - 400 Transaction in failed<br>Dropped - 401 The transaction will not register properly<br>Cancel - 402 payment that has not yet been processed<br>Incomplete - 403 Not recieved any call back from bank<br>Bounced - 405 The transaction has bounced<br>No Records - 503 There is no records found | `success,fail` |
| VIRTUALACCNO  required | String | Virtual Account No |
| BENEFICIARYNAME  required | String | Beneficiary Name |
| IFSC  required | String | IFSC Code |
| BANK  required | String | Bank Name |
| BRANCH  required | String | Branch Name |
| BANKADDRESS  required | String | Bank Address |

## Request Example

```
curl --location --request POST 'https://kraken.airpay.co.in/airpay/va/api/' \
--form 'action=create' \
--form 'private_key=71a4efaf21c79864ec154babfc494f45fd1f65a570805084965d5b29486f1dfe' \
--form 'merchant_id=1' \
--form 'buyer_phone=7208246368' \
--form 'buyer_email=consultant.prathamesh@airpay.co.in' \
--form 'checksum=a1d4d016a23a4c7bff1fe0c965bc1f987de37ac2' \
--form 'UID=1235' \
--form 'mer_dom =aHR0cCUzQSUdyRiUyRmtovY2FsaG9zdA=='
```

### Success Response

```json
HTTP/1.1 200 OK
{
     {
         "STATUS": "200",
         "MESSAGE": "Success",
         "VIRTUALACCNO": "22936640000000010242"
         "BENEFICIARYNAME": "AIRPAY PAYMENT SERVICES PRIVATE LIMITED"
         "IFSC": "ICIC0000103"
         "BANK": "ICICI BANK"
         "BRANCH": "MUMBAI"
         "BANKADDRESS": "ICICI Bank Ltd, 163, H.T. Parekh Marg, Backbay Reclamation, Churchgate,Mumbai 400 028"
     }
}
```

### Error Response

```json
HTTP/1.1 200 OK
{
     {
         "STATUS": "400",
         "MESSAGE": "Failed"
     }
}
```