Skip to content

IPN Callback

| View as Markdown

Instant Payment Notifications (IPN), or callbacks, are the way we notify you of the transaction status updates. This API will call the merchant url and return mercid, aptransaction id, amount, transaction status, merchant name, billed amount, ap_securehash, transaction id, card issuer, currency code etc if successful.

https://examplemerchantwebsite.eg/callback
FieldTypeDescription
Content-TypeStringapplication/x-www-form-urlencoded
FieldTypeDescription
MERCIDNumericMerchant id of the Merchant in the airpay system
APTRANSACTIONIDNumericAirpay transaction reference number
AMOUNTNumericAmount with two decimals
TRANSACTIONSTATUSNumericTransaction Status
Success - 200 Transaction is success
Transaction in Process - 211 Transaction in processing
Failed - 400 Transaction in failed
Dropped - 401 The transaction will not register properly
Cancel - 402,502 payment that has not yet been processed
Incomplete - 403 Not recieved any call back from bank
Bounced - 405 The transaction has bounced
No Records - 503 There is no records found
MERCHANT_NAMEVarcharMerchant name
WALLETBALANCENumericRemaining balance in wallet (only in case of wallet transactions)
SURCHARGENumericAdditional charges for particular transaction (sending only if applicable)
BILLEDAMOUNTNumericBilled amount
TERMINALIDNumericTerminal Id (only in case of POS transactions)
POSENTRYMODENumericPOS entry mode (only in case of POS transactions)
CC_EXPIRYNumericCard Expiry (only in case of POS transactions)
AUTHCODENumericAuthentication Code (length 6)
In case of sale completion it is required.
TOKENAlphanumericToken
CARDUNIQUECODEAlphanumericCard unique code (applicable only for pg,emi,pos,onclick )
REASONAlphanumericReason
TRANSACTIONREASONAlphanumericTransaction reason
CUSTOMERBANKBALAlphanumericCustomer bank balance
CARDCOUNTRYAlphanumericCard country
CONVERSIONRATENumericConversion rate
MESSAGEAlphanumericResponse message received from the payment gateway
CUSTOMERVPAAlphanumericVPA will return if channel is upi
ap_SecureHashAlphaNumericSecure hash generated by airpay If Channel is upi,
Hash generated by : crc32(TRANSACTIONID. : .APTRANSACTIONID. : .AMOUNT. : .TRANSACTIONSTATUS. : .MESSAGE. : .MID. : .USERNAME. : . CUSTOMERVPA); Otherwise,
Hash generated by : crc32(TRANSACTIONID. : .APTRANSACTIONID. : .AMOUNT. : .TRANSACTIONSTATUS. : .MESSAGE. : .MID. : .USERNAME);
TRANSACTIONIDNumericMerchant order ID (length 1-20)
CUSTOMVARAlphanumericSpace
CHMODAlphanumericPayment channel used to make payment
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
wallet - Wallet
pos - POS
payltr - paylater
aloan - Aloan
aeps - AEPS
BANKNAMEAlphanumericBank name used to do the transaction
CARDISSUERAlphanumericCard Issuer (length 1-50)
CUSTOMERAlphanumericSpace
CUSTOMEREMAILEmailCustomer Email customer@example.com (length 6-50)
CUSTOMERPHONENumericSpace
CURRENCYCODENumericCurrency Code (length 3)
Indian Rupee - 356
RISKNumericRisk Transaction (0 or 1)
TRANSACTIONTYPENumericTransaction Type (length 3)
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
TRANSACTIONPAYMENTSTATUSAlphanumericTransaction Payment Status
Transaction Payment Status are: SUCCESS,INCOMPLETE,FAIL,INPROCESS,Mandate Approved,AUTHORIZE,AUTHORIZATION,CAPTURE,VOIDED,RISK
CARD_NUMBERCharsMasked card number (length 12-19)
CARDTYPEAlphanumericCard type (length 5)
EMITENURENumericEMI Tenure (length 2)
3 Months - 3
6 Months - 6
9 Months - 9
12 Months - 12
18 Months - 18
24 Months - 24
TRANSACTIONTIMEAlphanumericTransaction datetime d-m-Y H:i:s (length 11)
IPN Callback Response
{
{
"MERCID": 45,
"APTRANSACTIONID": 4324324,
"AMOUNT": 1999.00,
"TRANSACTIONSTATUS": 200,
"MESSAGE": "Success",
"ap_SecureHash": ,
"TRANSACTIONID": ,
"CUSTOMVAR": ,
"CHMOD": "pg",
"BANKNAME": "AXIS BANK"",
"CARDISSUER": "AXIS",
"CUSTOMER": "John",
"CUSTOMEREMAIL": "customer@example.com",
"CUSTOMERPHONE": 9898989989898,
"CURRENCYCODE": 356,
"RISK": "",
"TRANSACTIONTYPE": 310,
"TRANSACTIONPAYMENTSTATUS": "Authorize",
"CARD_NUMBER": 989 ***** 999,
"CARDTYPE": "cc",
"EMITENURE": "",
"TRANSACTIONTIME": "12-12-2020 10:10:12",
"MERCHANT_NAME": "Akkara Industries",
"WALLETBALANCE": 2000.00,
"SURCHARGE": 5.00,
"BILLEDAMOUNT": 1200.00,
"RRN": 016153570198200,
"TOKEN": "4efaf21c79864ec154babfc494f45fd1f65a570805084965",
"CARDUNIQUECODE": "c237b1ba20f5f6cbe32f47e6db1d1d53",
"REASON": "Fund",
"CARDCOUNTRY": "IND",
"CONVERSIONRATE": 3.68
}
}

KYC- Know Your Customer. It is a process by which we can obtain information about the identity and address. The customer can add KYC related documents and details through this API.

Note: max 50 UIDs can be shared in single api call. If record already exist, existing record will be overridden and updated. Only new records will be added and existing will be updated.

post

https://kraken.airpay.co.in/airpay/api/addkyc.php
FieldTypeDescription
Content-TypeStringapplication/json
FieldTypeDescription
usernameStringUser’s username (required)
merchant_idNumberMerchant ID (length 1-20) (required)
private_keyStringPrivate Key (length 10-200) (required)
private_key = hash(‘sha256’, secret.’@’.username.’:
checksumStringChecksum (length 10-200) (required)
date = YYYY-MM-DD
alldata = merchant_id.private_key.kyc_data
Key generated by : key = hash(‘SHA256’,username.”:“.password)
checksum generated by : checksum = hash(‘SHA256’, key.’@’.alldata)
UIDStringCustomer UID shared by merchant (required)
kyc_typeStringKYC type (length 2-5) (required) Customer Name - CNCustomer Email - EMPhone Number - PNDriving Licence - DLPancard - PCPassport - PP
kyc_numberStringKYC number (length 8-100) (required)
kyc_data optionalJsonKYC Data structure as follows
[ { “UID”: “ehrjdsihogfoejroejfrjwfw9f9ewu49r4m4t9rrtj04”, “kycinfo”: [ { “kyc_type”: “PC”, “kyc_number”: “321400006787” }, { “kyc_type”: “PP”, “kyc_number”: “321400006787” } ] }, { “UID”: “UID”, “kycinfo”: [ { “kyc_type”: “DL”, “kyc_number”: “2938934hhh3” } ] } ]
SHA256 encryption logic: kychashkey = hash(‘SHA256’,username.”:“.password);kyc_number = hash(‘SHA256’, kychashkey.’@’.kyc_number);
{
"merchant_id" : "11111",
"private_key" : "71a4efaf21c79864ec154babfc494f45fd1f65a570805084965d5b29486f1dfe",
"checksum" : "92c617a556982a8d124ff2b7ce9eae3e",
"kyc_data" : "[
{
"UID": "ehrjdsihogfoejroejfrjwfw9f9ewu49r4m4t9rrtj04",
"kycinfo": [
{
"kyc_type": "PC",
"kyc_number": "321400006787"
},
{
"kyc_type": "PP",
"kyc_number": "321400006787"
}
]
},
{
"UID": "UID",
"kycinfo": [
{
"kyc_type": "DL",
"kyc_number": "2938934hhh3"
}
]
}
]"
}
FieldTypeDescription
statusNumberStatus Code
messageStringStatus Message for
200 : Success, 400 : Failed
statusdescriptionStringDescription of status
HTTP/1.1 200 OK
{
"status": 200,
"message": "Success",
"statusdescription": "Success"
}
HTTP/1.1 200 OK
{
"status": 400,
"message": "Failed",
"statusdescription": [
{
"ERROR": "Please provide valid merchant ID"
},
{
"ERROR": "Please provide valid Private Key"
},
{
"ERROR": "Please provide valid Checksum"
}
]
}