---
title: Create Virtual Account
description: A Virtual Account is a digital payment method through an account that is created virtually for each customer.
---

# VIRTUAL ACCOUNT - Create Virtual Account

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, buyer_phone and buyer_email then it returns assigned virtual account number along with other bank details.

## POST

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

## Header

| Field | Type | Description |
| --- | --- | --- |
| Content-Type | String | application/x-www-form-urlencoded |

## Parameter
| Field       | Type                 | Required | Description                                                                                        |
| ----------- | -------------------- | -------- | -------------------------------------------------------------------------------------------------- |
| action      | String               | Yes      | Action to perform - `create`                                                                       |
| private_key | Alphanumeric         | Yes      | Private Key (length 10-200)<br>`private_key = hash('sha256', secret.'@'.username.':\|:'.password)` |
| merchant_id | Numeric              | Yes      | Merchant ID                                                                                        |
| buyer_phone | Numeric|Space|Hyphen | Yes      | Mobile number of user                                                                              |
| buyer_email | Email                | Yes      | Email ID of user                                                                                   |
| UID         | Alphanumeric         | Yes      | Unique user identifier from the merchant                                                           |
| checksum    | Alphanumeric         | Yes      | Hash generated by : `sha1(buyer_email.buyer_phone.UID.action.merchant_id.private_key)`             |
| mer_dom     | Alphanumeric         | No       | Merchant Domain in BASE_64 (length 1-50)                                                           |


## 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 200

| Field | Type | Description |
| --- | --- | --- |
| STATUS | Number | Status Code Success - 200<br>Failed - 400 |
| MESSAGE | 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 |
| VIRTUALACCNO | String | Virtual Account No |
| BENEFICIARYNAME | String | Beneficiary Name |
| IFSC | String | IFSC Code |
| BANK | String | Bank Name |
| BRANCH | String | Branch Name |
| BANKADDRESS | String | Bank Address |
## Success-Response:

```
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"
     }
}
```
## Failed-Response:
```
HTTP/1.1 200 OK
{
     {
         "STATUS": "400",
         "MESSAGE": "Failed"
     }
}
```