---
title: Create Single page
description: Create a payment form and subdomain for collecting customer payments.
---

Single page is used to create the payment form and subdomain (Domain name of the Merchant) which is collecting the details of the customers before payment and displays the details of the merchant. We must pass merchant name, sub domain, airpay merchant id, username, password, and secret key, then we will get success response and subdomain allocated to this merchant.

#### POST

```
https://kraken.airpay.co.in/airpay/ms/singlepager/api/create
```

## Request Body

| Parameter | Type Value | Description | Value Like |
| --- | --- | --- | --- |
| merchant_name  required | String  <br>(1-80) | Name of the Merchant | `ABC` |
| subdomain  required | Alphanumeric  <br>(1-80) | Domain name of the Merchant eg. abc.nwpay.co.in | `https://abc.nwpay.co.in` |
| airpay_merchant_id  required | Numeric  <br>(1-11) | Merchant Id | `1088` |
| airpay_username  required | Alphanumeric  <br>(1-50) | Merchant Username | `userabc` |
| airpay_password  required | Alphanumeric  <br>(1-50) | Merchant Password | `passabc` |
| airpay_secret_key  required | Alphanumeric  <br>(1-100) | Merchant Secret Key | `hk72f56432ec` |
| template  optional | Numeric | Template (length 1)<br>Expected Values 1,2,3,4,5, Default Value 1. |
| checksum  required | Alphanumeric  <br>(1-100) | Checksum<br>hash_hmac('sha256',merchant_name + subdomain + airpay_merchant_id + airpay_username + airpay_username + airpay_secret_key); | `91f5evhk72f56432ec678s` |

## Success 200

| Parameter | Type Value | Description | Value Like |
| --- | --- | --- | --- |
| Result  required | String | Result message<br>Success - 200 (The transaction is success)<br>Transaction in Process - 211 (The transaction is processing)<br>Failed - 400 (The transaction is 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 are no records found) | `200` |
| SinglePager  required | String | It will display url of the subdomain | `{"Subdomain":"https://abc.nwpay.co.in"}` |

## Request Example

```json
{
     "merchant_name": "ABC",
     "subdomain": "https://abc.nwpay.co.in",
     "airpay_merchant_id": "1088",
     "airpay_username": "userabc",
     "airpay_password": "passabc",
     "airpay_secret_key": "hk72f56432ec",
     "template": "1",
     "checksum": "91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps"
}
```

### Success Response

```json
HTTP/1.1 200 OK
{
         "Result": "Success",
         "SinglePager": {"Subdomain":"https://abc.nwpay.co.in"}
}
```

### Error Response

```json
 {
     "SinglePager": {
                         "Errors": {
                                     "00": "Header Aunthentication Failed, Invalid Content-Type",
                                     "01": "Header Aunthentication Failed, airpay-Key Can Not Be Empty",
                                     "02": "Header Aunthentication Failed, Invalid airpay-Key",
                                     "03": "Merchant Name Can Not Be Empty",
                                     "04": "Subdomain Can Not Be Empty",
                                     "05": "airpay Merchant Id Can Not Be Empty",
                                     "06": "airpay Username Can Not Be Empty",
                                     "07": "airpay Password Can Not Be Empty",
                                     "08": "airpay Secret Key Can Not Be Empty",
                                     "09": "Domain Already Exist",
                                     "10": "Invalid Request",
                                     "11": "Checksum Can Not Be Empty",
                                     "12": "Wrong Checksum",
                                   }
                 },
     "Result": "Fail"
}
```