IPN Callback
ORDER CONFIRMATION - IPN Callback
Section titled “ORDER CONFIRMATION - IPN Callback”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/callbackHeader
Section titled “Header”| Field | Type | Description |
|---|---|---|
| Content-Type | String | application/x-www-form-urlencoded |
Success 200
Section titled “Success 200”| Field | Type | Description |
|---|---|---|
| MERCID | Numeric | Merchant id of the Merchant in the airpay system |
| APTRANSACTIONID | Numeric | Airpay transaction reference number |
| AMOUNT | Numeric | Amount with two decimals |
| TRANSACTIONSTATUS | Numeric | Transaction 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_NAME | Varchar | Merchant name |
| WALLETBALANCE | Numeric | Remaining balance in wallet (only in case of wallet transactions) |
| SURCHARGE | Numeric | Additional charges for particular transaction (sending only if applicable) |
| BILLEDAMOUNT | Numeric | Billed amount |
| TERMINALID | Numeric | Terminal Id (only in case of POS transactions) |
| POSENTRYMODE | Numeric | POS entry mode (only in case of POS transactions) |
| CC_EXPIRY | Numeric | Card Expiry (only in case of POS transactions) |
| AUTHCODE | Numeric | Authentication Code (length 6) In case of sale completion it is required. |
| TOKEN | Alphanumeric | Token |
| CARDUNIQUECODE | Alphanumeric | Card unique code (applicable only for pg,emi,pos,onclick ) |
| REASON | Alphanumeric | Reason |
| TRANSACTIONREASON | Alphanumeric | Transaction reason |
| CUSTOMERBANKBAL | Alphanumeric | Customer bank balance |
| CARDCOUNTRY | Alphanumeric | Card country |
| CONVERSIONRATE | Numeric | Conversion rate |
| MESSAGE | Alphanumeric | Response message received from the payment gateway |
| CUSTOMERVPA | Alphanumeric | VPA will return if channel is upi |
| ap_SecureHash | AlphaNumeric | Secure 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); |
| TRANSACTIONID | Numeric | Merchant order ID (length 1-20) |
| CUSTOMVAR | Alphanumeric | Space |
| CHMOD | Alphanumeric | Payment 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 |
| BANKNAME | Alphanumeric | Bank name used to do the transaction |
| CARDISSUER | Alphanumeric | Card Issuer (length 1-50) |
| CUSTOMER | Alphanumeric | Space |
| CUSTOMEREMAIL | Customer Email customer@example.com (length 6-50) | |
| CUSTOMERPHONE | Numeric | Space |
| CURRENCYCODE | Numeric | Currency Code (length 3) Indian Rupee - 356 |
| RISK | Numeric | Risk Transaction (0 or 1) |
| TRANSACTIONTYPE | Numeric | Transaction 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 |
| TRANSACTIONPAYMENTSTATUS | Alphanumeric | Transaction Payment Status Transaction Payment Status are: SUCCESS,INCOMPLETE,FAIL,INPROCESS,Mandate Approved,AUTHORIZE,AUTHORIZATION,CAPTURE,VOIDED,RISK |
| CARD_NUMBER | Chars | Masked card number (length 12-19) |
| CARDTYPE | Alphanumeric | Card type (length 5) |
| EMITENURE | Numeric | EMI Tenure (length 2) 3 Months - 3 6 Months - 6 9 Months - 9 12 Months - 12 18 Months - 18 24 Months - 24 |
| TRANSACTIONTIME | Alphanumeric | Transaction datetime d-m-Y H:i:s (length 11) |
Success-Response:
Section titled “Success-Response:”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 - Add KYC
Section titled “KYC - Add KYC”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.phpHeader
Section titled “Header”| Field | Type | Description |
|---|---|---|
| Content-Type | String | application/json |
Parameter
Section titled “Parameter”| Field | Type | Description |
|---|---|---|
| username | String | User’s username (required) |
| merchant_id | Number | Merchant ID (length 1-20) (required) |
| private_key | String | Private Key (length 10-200) (required) private_key = hash(‘sha256’, secret.’@’.username.’: |
| checksum | String | Checksum (length 10-200) (required) date = YYYY-MM-DD alldata = merchant_id.private_key.kyc_data Key generated by : key = hash(‘SHA256’,username.” checksum generated by : checksum = hash(‘SHA256’, key.’@’.alldata) |
| UID | String | Customer UID shared by merchant (required) |
| kyc_type | String | KYC type (length 2-5) (required) Customer Name - CNCustomer Email - EMPhone Number - PNDriving Licence - DLPancard - PCPassport - PP |
| kyc_number | String | KYC number (length 8-100) (required) |
| kyc_data optional | Json | KYC 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.” |
Request-Example:
Section titled “Request-Example:” { "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" } ] } ]" }Success 200
Section titled “Success 200”| Field | Type | Description |
|---|---|---|
| status | Number | Status Code |
| message | String | Status Message for 200 : Success, 400 : Failed |
| statusdescription | String | Description of status |
For Success:
Section titled “For Success:”HTTP/1.1 200 OK{
"status": 200, "message": "Success", "statusdescription": "Success"
}For Failure:
Section titled “For Failure:” 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" } ]}