Skip to content

Simple Transaction

| View as Markdown

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.

Simple Transaction Flow

https://payments.airpay.co.in/pay/v4/?token=<access_token>
ParameterRequiredType / SizeDescriptionExample
orderidYesAlphanumeric (1-30)Merchant generated transaction IDORD1234
amountYesNumeric (1-10 .2)Amount with two decimals100.00
currency_codeYesNumeric (3)Numeric currency code356
iso_currencyYesString (3)ISO currency codeINR
buyer_emailYesEmail (3-50)Buyer email addresscustomer@example.com
buyer_phoneYesNumeric (8-15)Buyer phone number99999999
buyer_firstnameYesAlphanumeric (1-50)Buyer first nameJohn
buyer_lastnameYesAlphanumeric (1-50)Buyer last nameDoe
buyer_addressNoAlphanumeric (1-50)Buyer address711-2880 Nulla St.
buyer_cityNoAlphanumeric (1-50)Buyer cityMankato
buyer_stateNoAlphanumeric (1-50)Buyer stateMississippi
buyer_pincodeNoAlphanumeric (4-8)Buyer pincode96522
buyer_countryNoAlphanumeric (2-50)Buyer countryUSA
customvarNoAlphanumeric / Space / Equal (1-4096)Additional information for tracking or custom processing1234567|test|ABC1234
chmodNoCharsPayment modes available for the user. Leave blank to show all enabled modes.

Supported values:
ppc = Prepaid Card
pg = Payment Gateway
nb = Netbanking
pgcc = Credit Card
pgdc = Debit Card
cash = Cash
emi = EMI
rtgs = RTGS
upi = UPI
btqr = Bharat QR
payltr = Pay Later
va = Virtual Account
enach = eNACH
remit = Remittance
pg
txnsubtypeNoNumericTransaction subtype.

1 = INR Auth-Capture
2 = INR Sale Auth
3 = INR Moto
4 = INR Moto Auth-Capture
5 = INR Sale DCC
6 = INR DCC Auth-Capture
7 = 3 Months EMI
8 = 6 Months EMI
9 = 9 Months EMI
10 = 12 Months EMI
11 = 18 Months EMI
12 = INR Subscription
13 = 24 Months EMI
36 = 36 Months EMI
74 = 3 Months Debit EMI
75 = 6 Months Debit EMI
76 = 9 Months Debit EMI
77 = 12 Months Debit EMI
2
walletNoNumericWallet transaction type.

0 = Default
1 = Load Consumer Wallet
2 = Debit Consumer Wallet
0
utility_biller_nameNoAlphanumeric (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
tokenYesAlphanumeric (2-30)Token (if tokenization is enabled)4efaf21c79864ec154babfc494f45fd1f65a570805084965
kittypeNoCharsType of integration kit being used.

Supported values:
inline
iframe
server_side_sdk
mobile
cs-cart
drupal
joomla
magento
opencart
shopify
wordpress
prestashop
joomla
savecardNoChar (1)Save card in tokenized format (Y / N)N
sb_nextrundateNoDate (20)Next subscription date for txnsubtype = INR-SI.
Format: MM/DD/YYYY.
Date must be current date +1 (T+1).
01/01/2025
sb_periodNoChar (1)Subscription period for txnsubtype = INR-SI.
Supported values: Day, Week, Month, Year, Adhoc
Day
sb_frequencyNoNumeric (1-3)Subscription frequency12
sb_amountNoNumeric (1-10 .2)Subscription amount100.00
sb_isrecurringNoChar (1)Whether subscription is recurring (Y / N)Y
sb_recurringcountNoNumeric (1-3)Subscription recurring count.
If value is 999, subscription becomes never-ending (applicable for eNACH transactions).
12
sb_retryattemptsNoNumeric (1)Subscription retry attempts3
sb_maxamountNoNumeric (1-10 .2)Maximum subscription charge amount500.00
uidNoAlphanumeric (1-32)Unique user identifier from merchant.
Applicable for channels: ppc, nb, EMI
USER123
upi_tpv_accountNoNumeric (12-18)Restricts UPI payments to the linked bank account number. Payments from other accounts will be rejected.123456789012
upi_tpv_ifscNoAlphanumeric (1-11)IFSC code for the UPI TPV account.
Mandatory when upi_tpv_account is provided.
SBIN0001234
ParameterType ValueDescriptionValue Like
ap_transactionid requiredNumericairpay transaction reference number11314
transaction_payment_status requiredAlphanumericTransaction payment status
SUCCESS
TRANSACTION IN PROCESS
FAILED
DROPPED
CANCEL
INCOMPLETE
BOUNCED
NO RECORDS
SUCCESS
merchant_id requiredNumericMerchant ID123356
orderid requiredAlphanumericorderid you have send to airpay systemORDER123456
txn_mode optionalAlphanumericTransaction mode LIVE or SandboxLIVE
chmod requiredAlphanumericChannel of Payment donepg
amount requiredNumericTransaction amount100.00
currency_code optionalNumericPayment Currency356
transaction_status requiredNumericTransaction 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 requiredAlphanumericResponse 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 optionalAlphanumericCustomer NameJohn Doe
customer_phone optionalAlphanumericCustomer Phone987654321
customer_email optionalEmailCustomer Emailcustomer@example.com
transaction_type optionalNumericTransaction 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 optionalBooleanIf the transaction is at risk 1, otherwise 0.0
billed_amount optionalNumericIncludes total amount of bill amount with two decimals110.00
token optionalAlphanumericToken string4efaf21c79864ec154babfc494f45fd1f65a570805084965
transaction_time optionalDateTransaction Time30-11-2023 12:32:59
card_scheme optionalAlphanumericCard issuer name, this field is available in pg
card_unique_code optionalAlphanumericCard unique Code, this field is available in pgc237b1ba20f5f6cbe32f47e6db1d1d53
bank_name optionalAlphanumericName of the bank, this field is available in pgAXIS BANK
card_country optionalAlphanumericCard issued country, this field is available in pgIND
card_type optionalAlphanumericType of Card Credit/Debit/Unknowncc
bank_response_msg optionalAlphanumericResponse message from the bankSuccess
reason optionalAlphanumericFailed ReasonFund
ap_SecureHash requiredAlphanumericSecure hash generated by airpay Hash generated by : crc32(TRANSACTIONID. : .APTRANSACTIONID. : .AMOUNT. : .TRANSACTIONSTATUS. : .MESSAGE. : .MID. : .USERNAME); 1490948220
custom_var optionalAlphanumeric
(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 optionalAlphanumericSubscription ID, if subscription transaction
subscription_next_rundate optionalAlphanumericsubscription 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>
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"
}
}
HTTP/1.1 200 OK
{
{
"status_code":"400",
"response_code":501,
"status":"fail",
"message":"Invalid Merchant Id",
"data":[]
}
}