Simple Transaction
In simple transaction, while making a payment the user will be redirected to airpay’s payment page for completing the payment.The customer will be redirected to the success url cofigured at airpay after completing the transaction.
Note: If specific payment modes are specified, only those will be visible to the customer while making a payment.

https://payments.airpay.co.in/pay/v4/?token=<access_token>Request Body
Section titled “Request Body”| Parameter | Required | Type / Size | Description | Example |
|---|---|---|---|---|
orderid | Yes | Alphanumeric (1-30) | Merchant generated transaction ID | ORD1234 |
amount | Yes | Numeric (1-10 .2) | Amount with two decimals | 100.00 |
currency_code | Yes | Numeric (3) | Numeric currency code | 356 |
iso_currency | Yes | String (3) | ISO currency code | INR |
buyer_email | Yes | Email (3-50) | Buyer email address | customer@example.com |
buyer_phone | Yes | Numeric (8-15) | Buyer phone number | 99999999 |
buyer_firstname | Yes | Alphanumeric (1-50) | Buyer first name | John |
buyer_lastname | Yes | Alphanumeric (1-50) | Buyer last name | Doe |
buyer_address | No | Alphanumeric (1-50) | Buyer address | 711-2880 Nulla St. |
buyer_city | No | Alphanumeric (1-50) | Buyer city | Mankato |
buyer_state | No | Alphanumeric (1-50) | Buyer state | Mississippi |
buyer_pincode | No | Alphanumeric (4-8) | Buyer pincode | 96522 |
buyer_country | No | Alphanumeric (2-50) | Buyer country | USA |
customvar | No | Alphanumeric / Space / Equal (1-4096) | Additional information for tracking or custom processing | 1234567|test|ABC1234 |
chmod | No | Chars | Payment modes available for the user. Leave blank to show all enabled modes. Supported values: ppc = Prepaid Cardpg = Payment Gatewaynb = Netbankingpgcc = Credit Cardpgdc = Debit Cardcash = Cashemi = EMIrtgs = RTGSupi = UPIbtqr = Bharat QRpayltr = Pay Laterva = Virtual Accountenach = eNACHremit = Remittance | pg |
txnsubtype | No | Numeric | Transaction subtype.1 = INR Auth-Capture2 = INR Sale Auth3 = INR Moto4 = INR Moto Auth-Capture5 = INR Sale DCC6 = INR DCC Auth-Capture7 = 3 Months EMI8 = 6 Months EMI9 = 9 Months EMI10 = 12 Months EMI11 = 18 Months EMI12 = INR Subscription13 = 24 Months EMI36 = 36 Months EMI74 = 3 Months Debit EMI75 = 6 Months Debit EMI76 = 9 Months Debit EMI77 = 12 Months Debit EMI | 2 |
wallet | No | Numeric | Wallet transaction type.0 = Default1 = Load Consumer Wallet2 = Debit Consumer Wallet | 0 |
utility_biller_name | No | Alphanumeric (2-50) | Mandatory for transactions with specific MCCs such as utilities, healthcare, education, and government payments. Applicable MCCs: 4900, 6012, 6051, 6300, 6513, 8011, 8050, 8062, 8099, 8111, 8211, 8220, 8241, 8244, 8249, 8299, 8351, 9311 | Electricity Board |
token | Yes | Alphanumeric (2-30) | Token (if tokenization is enabled) | 4efaf21c79864ec154babfc494f45fd1f65a570805084965 |
kittype | No | Chars | Type of integration kit being used. Supported values: inlineiframeserver_side_sdkmobilecs-cartdrupaljoomlamagentoopencartshopifywordpressprestashop | joomla |
savecard | No | Char (1) | Save card in tokenized format (Y / N) | N |
sb_nextrundate | No | Date (20) | Next subscription date for txnsubtype = INR-SI.Format: MM/DD/YYYY.Date must be current date +1 (T+1). | 01/01/2025 |
sb_period | No | Char (1) | Subscription period for txnsubtype = INR-SI.Supported values: Day, Week, Month, Year, Adhoc | Day |
sb_frequency | No | Numeric (1-3) | Subscription frequency | 12 |
sb_amount | No | Numeric (1-10 .2) | Subscription amount | 100.00 |
sb_isrecurring | No | Char (1) | Whether subscription is recurring (Y / N) | Y |
sb_recurringcount | No | Numeric (1-3) | Subscription recurring count. If value is 999, subscription becomes never-ending (applicable for eNACH transactions). | 12 |
sb_retryattempts | No | Numeric (1) | Subscription retry attempts | 3 |
sb_maxamount | No | Numeric (1-10 .2) | Maximum subscription charge amount | 500.00 |
uid | No | Alphanumeric (1-32) | Unique user identifier from merchant. Applicable for channels: ppc, nb, EMI | USER123 |
upi_tpv_account | No | Numeric (12-18) | Restricts UPI payments to the linked bank account number. Payments from other accounts will be rejected. | 123456789012 |
upi_tpv_ifsc | No | Alphanumeric (1-11) | IFSC code for the UPI TPV account. Mandatory when upi_tpv_account is provided. | SBIN0001234 |
Success 200
Section titled “Success 200”| Parameter | Type Value | Description | Value Like |
|---|---|---|---|
| ap_transactionid required | Numeric | airpay transaction reference number | 11314 |
| transaction_payment_status required | Alphanumeric | Transaction payment status SUCCESS TRANSACTION IN PROCESS FAILED DROPPED CANCEL INCOMPLETE BOUNCED NO RECORDS | SUCCESS |
| merchant_id required | Numeric | Merchant ID | 123356 |
| orderid required | Alphanumeric | orderid you have send to airpay system | ORDER123456 |
| txn_mode optional | Alphanumeric | Transaction mode LIVE or Sandbox | LIVE |
| chmod required | Alphanumeric | Channel of Payment done | pg |
| amount required | Numeric | Transaction amount | 100.00 |
| currency_code optional | Numeric | Payment Currency | 356 |
| transaction_status required | Numeric | Transaction Payment Status 200 - Transaction is success 211 - Transaction is processing 400 - Transaction is failed 401 - Transaction will not register properly 402 - Payment that has not yet been processed 403 - Not received any call back from bank 405 - Transaction has bounced 503 - No records found | 200 |
| message required | Alphanumeric | Response message received from payment gateway Success Transaction is success Transaction in Process Transaction in processing Failed Transaction in failed Dropped The transaction will not register properly Cancel Payment that has not yet been processed Incomplete Not recieved any call back from bank Bounced The transaction has bounced No Records There is no records found | Success |
| customer_name optional | Alphanumeric | Customer Name | John Doe |
| customer_phone optional | Alphanumeric | Customer Phone | 987654321 |
| customer_email optional | Customer Email | customer@example.com | |
| transaction_type optional | Numeric | Transaction Type Mandate approved, Auth - 310 Sale - 320 Capture - 330 Refund - 340 Chargeback - 350 Reversal - 360 SaleComplete - 370 SaleAdjust - 380 TipAdjust - 390 Sale+Cash - 400 Cashback - 410 Void - 420 Release - 430 Cashwithdrawal - 440 | 320 |
| risk optional | Boolean | If the transaction is at risk 1, otherwise 0. | 0 |
| billed_amount optional | Numeric | Includes total amount of bill amount with two decimals | 110.00 |
| token optional | Alphanumeric | Token string | 4efaf21c79864ec154babfc494f45fd1f65a570805084965 |
| transaction_time optional | Date | Transaction Time | 30-11-2023 12:32:59 |
| card_scheme optional | Alphanumeric | Card issuer name, this field is available in pg | |
| card_unique_code optional | Alphanumeric | Card unique Code, this field is available in pg | c237b1ba20f5f6cbe32f47e6db1d1d53 |
| bank_name optional | Alphanumeric | Name of the bank, this field is available in pg | AXIS BANK |
| card_country optional | Alphanumeric | Card issued country, this field is available in pg | IND |
| card_type optional | Alphanumeric | Type of Card Credit/Debit/Unknown | cc |
| bank_response_msg optional | Alphanumeric | Response message from the bank | Success |
| reason optional | Alphanumeric | Failed Reason | Fund |
| ap_SecureHash required | Alphanumeric | Secure hash generated by airpay Hash generated by : crc32(TRANSACTIONID. : .APTRANSACTIONID. : .AMOUNT. : .TRANSACTIONSTATUS. : .MESSAGE. : .MID. : .USERNAME); | 1490948220 |
| custom_var optional | Alphanumeric ( 1-120) | Any information passed in the request, which can be received in the response exactly as it was sent. We can pass multiple data in custom_var separated by the ' | ' symbol. |
| subscription_id optional | Alphanumeric | Subscription ID, if subscription transaction | |
| subscription_next_rundate optional | Alphanumeric | subscription next run date, if subscription transaction |
<?php
$merchant_id = "<merchant_id>>"; $username = "<username>"; $password = "<password>"; $secret = "<secret>"; $client_secret = "<client_secret>"; $client_id = "<client_id>"; $secretKey = '<secretKey>';
$data = array(); $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";
$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> <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/pay/v4/?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>
</body> </html>Success Response
Section titled “Success Response”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", "card_scheme": "visa" "card_number": "462294XXXXXX3713" "carduniquecode": "SLzvR9xdUuLvG0EgnqYxOqUA2g6gi7Fi" "bank_name": "anz bank" "card_country": "australia" "card_type": "Credit" "token":"446FVcGpJbhmlNH4KyFl2He8nblrfeUk" "ap_SecureHash":"1490948220" } }Error Response
Section titled “Error Response”HTTP/1.1 200 OK { { "status_code":"400", "response_code":501, "status":"fail", "message":"Invalid Merchant Id", "data":[] } }