Skip to content

Dash Checkout

| View as Markdown

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.

https://payments.airpay.co.in/v4/checkout/index.php?token=<access_token>
ParameterType ValueDescriptionValue Like
merchant_id requiredAlphanumericAirPay merchant ID18999
buyer_email requiredEmailCustomer email addresscustomer@example.com
buyer_phone requiredNumericCustomer phone number99999999
buyer_firstname requiredAlphanumericCustomer first nameJohn
buyer_lastname requiredAlphanumericCustomer last nameDoe
amount requiredNumericTotal transaction amount with two decimals10.00
orderid requiredAlphanumericMerchant order IDORD123456
currency_code requiredNumericNumeric currency code356
iso_currency requiredStringISO currency codeINR
product_data requiredBase64 encoded JSONEncoded order and product detailsJSON below
token optionalAlphanumericToken if tokenization is enabled4efaf21c79864ec154babfc494f45fd1f65a570805084965
checksum requiredAlphanumericRequest checksum...
privatekey requiredAlphanumericHash of secret credentials...
encdata requiredAlphanumericEncrypted payload...

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

FieldTypeDescriptionExample
ship_dateDateTentative shipment date10-05-2024
insuranceStringInsurance flag (Y or N)Y
package_nameStringPackage nameATS
no_of_packagesNumberNumber of packages2
package_weightNumberPackage weight in grams400
package_lengthNumberPackage length in cms10
package_widthNumberPackage width in cms10
package_heightNumberPackage height in cms10
pickup_nameStringMerchant warehouse nameATS
pickup_addressStringMerchant warehouse addressThrissur
pickup_landmarkStringWarehouse landmarkThrissur
pickup_cityStringWarehouse cityThrissur
pickup_stateStringWarehouse stateKerala
pickup_countryStringWarehouse countryIndia
pickup_pincodeNumberWarehouse pincode401301
pickup_phoneNumberWarehouse phone number7907600618
product_detailsArrayArray of product detail objectsSee below
FieldTypeDescriptionExample
nameStringProduct nameproduct 1
imgURLProduct image pathtestimg.jpg
discountFloatDiscount amount0.00
amountFloatProduct amount300.00
taxFloatProduct tax50.00
qtyFloatProduct quantity2
skuStringProduct SKUtestsku
hsnStringProduct HSNtesthsn
product_weightFloatProduct weight in grams200
product_lengthFloatProduct length in cms10
product_widthFloatProduct width in cms10
product_heightFloatProduct height in cms10
descriptionStringProduct descriptionTEST
brandStringProduct brand
colourStringProduct colour
categoryStringProduct category
manufacture_countryStringManufactured country
seller_detailsStringSeller details
ParameterTypeDescriptionExample
transaction_payment_statusStringPayment result statusSUCCESS
merchant_idNumericAirPay merchant ID123356
orderidAlphanumericMerchant order IDORDER123456
ap_transactionidNumericAirPay transaction reference11314
txn_modeAlphanumericTransaction modeLIVE
chmodAlphanumericPayment channelpg
amountNumericTransaction amount100.00
currency_codeNumericNumeric currency code356
transaction_statusNumericTransaction status code200
messageStringResponse messageSuccess
bank_response_msgStringBank response messageSuccess
customer_nameStringCustomer nameJohn Doe
customer_phoneStringCustomer phone987654321
customer_emailStringCustomer emailcustomer@example.com
transaction_typeNumericTransaction type code320
riskNumericRisk indicator0
customvarStringCustom variable data0
tokenStringToken returned by AirPay
uidStringCustomer UIDU123
transaction_timeDateTransaction timestamp30-11-2023 12:32:59
surcharge_amountNumericSurcharge amount51.41
cod_chargesNumericCOD charge amount05.90
delivery_chargesNumericDelivery charge amount42.00
partner_nameStringLogistics partner nameShipyari
tracking_numberStringShipment tracking numberABCD1234
card_schemeStringCard schemevisa
card_numberStringMasked card number462294XXXXXX3713
carduniquecodeStringCard unique codeSLzvR9xdUuLvG0EgnqYxOqUA2g6gi7Fi
bank_nameStringBank nameanz bank
card_countryStringCard countryaustralia
card_typeStringCard typeCredit
ap_SecureHashStringSecure hash value1490948220
<?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>
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"
}
}