Skip to content

Simple Transaction Integration

| View as Markdown

In a simple transaction flow, the customer is redirected to the Airpay payment page to complete the payment.

Note: If specific payment modes are passed using chmod, only those payment options will be shown to the customer.


POST https://payments.airpay.co.in/pay/index.php

HeaderTypeValue
Content-TypeStringapplication/x-www-form-urlencoded

FieldTypeRequiredDescription
buyerEmailEmailYesBuyer email address. Length: 6-50
buyerPhoneNumeric / Space / HyphenYesBuyer phone number. Length: 8-15
buyerFirstNameAlphanumeric / SpaceYesBuyer first name. Length: 1-50
buyerLastNameAlphanumeric / SpaceYesBuyer last name. Length: 1-50
buyerAddressAlphanumeric / SpaceNoBuyer address. Length: 4-50
buyerCityAlphanumeric / SpaceNoBuyer city. Length: 2-50
buyerStateAlphanumeric / SpaceNoBuyer state. Length: 2-50
buyerCountryAlphanumeric / SpaceNoBuyer country. Length: 2-50
buyerPinCodeAlphanumericNoBuyer pin code. Length: 4-8
orderidAlphanumericYesUnique order ID. Length: 1-25
amountNumericYesTransaction amount with 2 decimals. Format: 123.45
UIDAlphanumericYesUnique user identifier from merchant
privatekeyAlphanumericYesPrivate key generated from merchant credentials
mercidNumericYesMerchant ID
vpaAlphanumericNoVirtual Payment Address. Required for UPI
kittypeAlphanumericYesIntegration type being used
chmodCharsNoPayment mode restriction
checksumAlphanumericYesChecksum hash
currencyNumericNoNumeric currency code. Example: 356
isocurrencyCharsNoISO currency code. Example: INR
tokenAlphanumericNoToken value if tokenization is enabled
customvarAlphanumeric / Space / EqualNoCustom metadata. Max length 120
txnsubtypeNumericNoTransaction subtype
walletNumericNoWallet update flag
upi_tpv_accountNumericNoUPI TPV account number
upi_tpv_ifscAlphanumericNoIFSC code for TPV account

Possible values for kittype:

inline
iframe
server_side_sdk
mobile
cs-cart
drupal
joomla
magento
opencart
shopify
wordpress
prestashop

ValueDescription
ppcPrepaid Card
pgPayment Gateway
nbNet Banking
pgccCredit Card
pgdcDebit Card
cashCash
emiEMI
rtgsRTGS
upiUPI
btqrBharat QR
payltrPay Later
vaVirtual Account
enacheNACH
remitRemittance

Show only Credit/Debit cards:

chmod=pg

Show Net Banking + Prepaid Cards:

chmod=nb_ppc

Show all enabled payment methods:

Leave chmod blank

$privatekey = hash(
'sha256',
$secret . '@' . $username . ':|:' . $password
);

$key = hash(
'SHA256',
$username . "~:~" . $password
);
$alldata =
$buyerEmail .
$buyerFirstName .
$buyerLastName .
$buyerAddress .
$buyerCity .
$buyerState .
$buyerCountry .
$amount .
$orderid .
$UID;
$checksum = hash(
'SHA256',
$key . '@' . $alldata
);

If subscription fields are included:

siindexvar =
sb_nextrundate .
sb_frequency .
sb_period .
sb_amount .
sb_isrecurring .
sb_recurringcount .
sb_retryattempts

Date format:

YYYY-MM-DD
$alldata =
$buyerEmail .
$buyerFirstName .
$buyerLastName .
$buyerAddress .
$buyerCity .
$buyerState .
$buyerCountry .
$amount .
$orderid .
$UID .
$siindexvar .
$date;

FieldTypeDescription
sb_nextrundateDateNext subscription date (MM/DD/YYYY)
sb_periodD/W/M/Y/ADay / Week / Month / Year / Adhoc
sb_frequencyNumericSubscription frequency
sb_amountNumericSubscription amount
sb_isrecurringNumericRecurring enabled flag
sb_recurringcountNumericTotal recurring count
sb_retryattemptsNumericRetry attempts
sb_maxamountNumericMaximum chargeable amount

sb_nextrundate must be current date + 1 day (T+1)


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

ValueDescription
0Default
1Update consumer wallet

{
"buyerEmail": "buyer@example.com",
"buyerPhone": "9898989989898",
"buyerFirstName": "Sam",
"buyerLastName": "Johan",
"buyerAddress": "3rd floor, Trust House Bldg. Dr. E.Borges Road",
"buyerCity": "Mumbai",
"buyerState": "Maharashtra",
"buyerCountry": "India",
"buyerPinCode": "400083",
"orderid": "d3t54978",
"amount": 123.45,
"UID": "ehrjdsihogfoejroejfrjwfw9f9ewu49r4m4t9rrtj04",
"privatekey": "71a4efaf21c79864ec154babfc494f45fd1f65a570805084965d5b29486f1dfe",
"mercid": 767807,
"chmod": "enach",
"vpa": "payupi@okicici",
"kittype": "inline",
"checksum": "5f593008470bfdcbb0f9c518d79af129bb6fa712",
"currency": 356,
"isocurrency": "INR",
"token": "",
"sb_nextrundate": "03/08/2022",
"sb_period": "W",
"sb_frequency": 1,
"sb_amount": 10.00,
"sb_isrecurring": 1,
"sb_recurringcount": 5,
"sb_retryattempts": 0,
"sb_maxamount": 10.00,
"txnsubtype": 2,
"wallet": 0
}

HTTP/1.1 200 OK

FieldDescription
TRANSACTIONPAYMENTSTATUSPayment status
MERCIDMerchant ID
TRANSACTIONIDMerchant order ID
APTRANSACTIONIDAirpay transaction ID
TXN_MODELIVE or Sandbox
CHMODPayment channel
AMOUNTTransaction amount
CURRENCYCODECurrency code
TRANSACTIONSTATUSNumeric transaction status
MESSAGETransaction message
CUSTOMERCustomer name
CUSTOMERPHONECustomer phone
CUSTOMEREMAILCustomer email
TRANSACTIONTYPETransaction type
RISKRisk flag
BILLEDAMOUNTTotal billed amount
SUBSCRITIONIDSubscription ID
SUBSCRIPTIONNEXTRUNDATENext subscription date
TOKENToken string
CUSTOMERVPAUPI VPA
TRANSACTIONTIMETransaction time
CARDISSUERCard issuer
CARD_NUMBERMasked card number
CARDUNIQUECODEUnique card code
BANKNAMEBank name
CARDCOUNTRYCard issuing country
CARDTYPECredit / Debit
BANKRESPONSEMSGBank response message
REASONFailure reason
ap_SecureHashAirpay secure hash

StatusCodeDescription
Success200Transaction successful
In Process211Transaction processing
Failed400Transaction failed
Dropped401Transaction not registered properly
Cancelled402Payment cancelled
Incomplete403No callback received from bank
Bounced405Transaction bounced
No Records503No records found

CodeDescription
310Mandate Approved / Auth
320Sale
330Capture
340Refund
350Chargeback
360Reversal
370Sale Complete
380Sale Adjust
390Tip Adjust
400Sale + Cash
410Cashback
420Void
430Release
440Cash Withdrawal

crc32(
TRANSACTIONID . ':' .
APTRANSACTIONID . ':' .
AMOUNT . ':' .
TRANSACTIONSTATUS . ':' .
MESSAGE . ':' .
MID . ':' .
USERNAME . ':' .
CUSTOMERVPA
);
crc32(
TRANSACTIONID . ':' .
APTRANSACTIONID . ':' .
AMOUNT . ':' .
TRANSACTIONSTATUS . ':' .
MESSAGE . ':' .
MID . ':' .
USERNAME
);

{
"TRANSACTIONPAYMENTSTATUS": "SUCCESS",
"MERCID": "18999",
"TRANSACTIONID": "TestOrder24",
"APTRANSACTIONID": "17691556",
"TXN_MODE": "LIVE",
"CHMOD": "pg",
"AMOUNT": "1.00",
"CURRENCYCODE": "356",
"TRANSACTIONSTATUS": "200",
"MESSAGE": "Success",
"CUSTOMER": "SANEESH",
"CUSTOMERPHONE": "8287456879",
"CUSTOMEREMAIL": "SANEESH.KUTTAPPAN@AIRPAY.CO.IN",
"TRANSACTIONTYPE": "320",
"RISK": "0",
"BILLEDAMOUNT": "1.00",
"TOKEN": "446FVcGpJbhmlNH4KyFl2He8nblrfeUk",
"TRANSACTIONTIME": "27-07-2022 12:48:00",
"CARDISSUER": "visa",
"CARD_NUMBER": "462294XXXXXX3713",
"CARDUNIQUECODE": "SLzvR9xdUuLvG0EgnqYxOqUA2g6gi7Fi",
"BANKNAME": "anz bank",
"CARDCOUNTRY": "australia",
"CARDTYPE": "Credit",
"BANKRESPONSEMSG": "Success",
"ap_SecureHash": "3901005794"
}