---
title: Dash Checkout
description: Redirect customers to AirPay checkout with order and product details in a single request.
---

In Dash Checkout, the customer is redirected to AirPay’s payment page to complete the transaction. After payment, the customer returns to the success URL configured in your AirPay merchant settings.

#### POST

```
https://payments.airpay.co.in/v4/checkout/index.php?token=<access_token>
```

## Request Body

| Parameter | Type Value | Description | Value Like |
| --- | --- | --- | --- |
| `merchant_id` required | Alphanumeric | AirPay merchant ID | `18999` |
| `buyer_email` required | Email | Customer email address | `customer@example.com` |
| `buyer_phone` required | Numeric | Customer phone number | `99999999` |
| `buyer_firstname` required | Alphanumeric | Customer first name | `John` |
| `buyer_lastname` required | Alphanumeric | Customer last name | `Doe` |
| `amount` required | Numeric | Total transaction amount with two decimals | `10.00` |
| `orderid` required | Alphanumeric | Merchant order ID | `ORD123456` |
| `currency_code` required | Numeric | Numeric currency code | `356` |
| `iso_currency` required | String | ISO currency code | `INR` |
| `product_data` required | Base64 encoded JSON | Encoded order and product details | JSON below |
| `token` optional | Alphanumeric | Token if tokenization is enabled | `4efaf21c79864ec154babfc494f45fd1f65a570805084965` |
| `checksum` required | Alphanumeric | Request checksum | `...` |
| `privatekey` required | Alphanumeric | Hash of secret credentials | `...` |
| `encdata` required | Alphanumeric | Encrypted payload | `...` |

### Product Data JSON

`product_data` contains order and shipment details and must be base64 encoded before sending.

| Field | Type | Description | Example |
| --- | --- | --- | --- |
| `ship_date` | Date | Tentative shipment date | `10-05-2024` |
| `insurance` | String | Insurance flag (`Y` or `N`) | `Y` |
| `package_name` | String | Package name | `ATS` |
| `no_of_packages` | Number | Number of packages | `2` |
| `package_weight` | Number | Package weight in grams | `400` |
| `package_length` | Number | Package length in cms | `10` |
| `package_width` | Number | Package width in cms | `10` |
| `package_height` | Number | Package height in cms | `10` |
| `pickup_name` | String | Merchant warehouse name | `ATS` |
| `pickup_address` | String | Merchant warehouse address | `Thrissur` |
| `pickup_landmark` | String | Warehouse landmark | `Thrissur` |
| `pickup_city` | String | Warehouse city | `Thrissur` |
| `pickup_state` | String | Warehouse state | `Kerala` |
| `pickup_country` | String | Warehouse country | `India` |
| `pickup_pincode` | Number | Warehouse pincode | `401301` |
| `pickup_phone` | Number | Warehouse phone number | `7907600618` |
| `product_details` | Array | Array of product detail objects | See below |

#### Product detail object

| Field | Type | Description | Example |
| --- | --- | --- | --- |
| `name` | String | Product name | `product 1` |
| `img` | URL | Product image path | `testimg.jpg` |
| `discount` | Float | Discount amount | `0.00` |
| `amount` | Float | Product amount | `300.00` |
| `tax` | Float | Product tax | `50.00` |
| `qty` | Float | Product quantity | `2` |
| `sku` | String | Product SKU | `testsku` |
| `hsn` | String | Product HSN | `testhsn` |
| `product_weight` | Float | Product weight in grams | `200` |
| `product_length` | Float | Product length in cms | `10` |
| `product_width` | Float | Product width in cms | `10` |
| `product_height` | Float | Product height in cms | `10` |
| `description` | String | Product description | `TEST` |
| `brand` | String | Product brand | `` |
| `colour` | String | Product colour | `` |
| `category` | String | Product category | `` |
| `manufacture_country` | String | Manufactured country | `` |
| `seller_details` | String | Seller details | `` |

## Success 200

| Parameter | Type | Description | Example |
| --- | --- | --- | --- |
| `transaction_payment_status` | String | Payment result status | `SUCCESS` |
| `merchant_id` | Numeric | AirPay merchant ID | `123356` |
| `orderid` | Alphanumeric | Merchant order ID | `ORDER123456` |
| `ap_transactionid` | Numeric | AirPay transaction reference | `11314` |
| `txn_mode` | Alphanumeric | Transaction mode | `LIVE` |
| `chmod` | Alphanumeric | Payment channel | `pg` |
| `amount` | Numeric | Transaction amount | `100.00` |
| `currency_code` | Numeric | Numeric currency code | `356` |
| `transaction_status` | Numeric | Transaction status code | `200` |
| `message` | String | Response message | `Success` |
| `bank_response_msg` | String | Bank response message | `Success` |
| `customer_name` | String | Customer name | `John Doe` |
| `customer_phone` | String | Customer phone | `987654321` |
| `customer_email` | String | Customer email | `customer@example.com` |
| `transaction_type` | Numeric | Transaction type code | `320` |
| `risk` | Numeric | Risk indicator | `0` |
| `customvar` | String | Custom variable data | `0` |
| `token` | String | Token returned by AirPay | `` |
| `uid` | String | Customer UID | `U123` |
| `transaction_time` | Date | Transaction timestamp | `30-11-2023 12:32:59` |
| `surcharge_amount` | Numeric | Surcharge amount | `51.41` |
| `cod_charges` | Numeric | COD charge amount | `05.90` |
| `delivery_charges` | Numeric | Delivery charge amount | `42.00` |
| `partner_name` | String | Logistics partner name | `Shipyari` |
| `tracking_number` | String | Shipment tracking number | `ABCD1234` |
| `card_scheme` | String | Card scheme | `visa` |
| `card_number` | String | Masked card number | `462294XXXXXX3713` |
| `carduniquecode` | String | Card unique code | `SLzvR9xdUuLvG0EgnqYxOqUA2g6gi7Fi` |
| `bank_name` | String | Bank name | `anz bank` |
| `card_country` | String | Card country | `australia` |
| `card_type` | String | Card type | `Credit` |
| `ap_SecureHash` | String | Secure hash value | `1490948220` |

## PHP

```php
<?php
$merchant_id   = "<merchant_id>";
$username      = "<username>";
$password      = "<password>";
$secret        = "<secret>";
$client_secret = "<client_secret>";
$client_id     = "<client_id>";
$secretKey     = '<secretKey>';

$product_data = '{
    "ship_date": "10-05-2024",
    "insurance": "Y",
    "package_name": "ATS",
    "no_of_packages": "2",
    "package_weight": "400",
    "package_length": "10",
    "package_width": "10",
    "package_height": "10",
    "pickup_name":"ATS",
    "pickup_address":"Thrissur",
    "pickup_landmark":"Thrissur",
    "pickup_city":"Thrissur",
    "pickup_state":"Kerala",
    "pickup_country":"India",
    "pickup_pincode":"401301",
    "pickup_phone":"7907600618",
    "product_details": [
      {
        "name": "product 1",
        "img":"testimg.jpg",
        "discount": "0.00",
        "amount": "300.00",
        "tax": "50.00",
        "qty": "2",
        "sku": "testsku",
        "hsn": "testhsn",
        "product_weight": "200",
        "product_length": "10",
        "product_width": "10",
        "product_height": "10",
        "description":"TEST",
        "brand": "",
        "colour": "",
        "category": "",
        "manufacture_country": "",
        "seller_details": ""
      }
    ]
  }';

$data = array();
$data['merchant_id']     = '18999';
$data['buyer_email']     = 'customer@example.com';
$data['buyer_phone']     = '99999999';
$data['buyer_firstname'] = 'John';
$data['buyer_lastname']  = 'Doe';
$data['amount']          = '10.00';
$data['orderid']         = 'ORD123456';
$data['currency_code']   = '356';
$data['iso_currency']    = 'inr';
$data['product_data']    = base64_encode($product_data);

$privatekey = hash('sha256', $secret.'@'.$username.':|:'.$password);
$encdata    = encrypt(json_encode($data), $secretKey);
$checksum   = checksum($data);
?>
<!DOCTYPE html>
<html>
<head>
<title>Airpay</title>
    <script type="text/javascript">
        function submitForm() {
            var form = document.forms[0];
            form.submit();
        }
    </script>
</head>
<body onload="javascript:submitForm()">
    <center>
        <table width="500px;">
            <tr>
                <td align="center" valign="middle">Do Not Refresh or Press Back <br /> Redirecting to Airpay</td>
            </tr>
            <tr>
                <td align="center" valign="middle">
                    <form action="https://payments.airpay.co.in/v4/checkout/index.php?token=<token>" method="post">
                        <input type="hidden" name="privatekey" value="<?php echo $privatekey; ?>">
                        <input type="hidden" name="merchant_id" value="<?php echo $merchant_id; ?>">
                        <input type="hidden" name="encdata" value="<?php echo $encdata; ?>">
                        <input type="hidden" name="checksum" value="<?php echo $checksum; ?>">
                    </form>
                </td>
            </tr>
        </table>
    </center>
</body>
</html>
```

## Success Response

```json
HTTP/1.1 200 OK
{
  "status_code":"200",
  "status":"success",
  "response_code":"00",
  "message":"Success",
  "data": {
    "transaction_payment_status":"SUCCESS",
    "merchant_id":"123356",
    "orderid":"ORDER123456",
    "ap_transactionid":"11314",
    "txn_mode":"LIVE",
    "chmod":"pg",
    "amount":"100.00",
    "currency_code":"356",
    "transaction_status":200,
    "message":"Success",
    "bank_response_msg":"Success",
    "customer_name":"John Doe",
    "customer_phone":"987654321",
    "customer_email":"customer@example.com",
    "transaction_type":320,
    "risk":"0",
    "customvar":"0",
    "token":"",
    "uid":"U123",
    "transaction_time":"30-11-2023 12:32:59",
    "surcharge_amount":"51.41",
    "cod_charges":"05.90",
    "delivery_charges":"42.00",
    "partner_name":"Shipyari",
    "tracking_number":"ABCD1234",
    "card_scheme":"visa",
    "card_number":"462294XXXXXX3713",
    "carduniquecode":"SLzvR9xdUuLvG0EgnqYxOqUA2g6gi7Fi",
    "bank_name":"anz bank",
    "card_country":"australia",
    "card_type":"Credit",
    "ap_SecureHash":"1490948220"
  }
}
```