Order Confirmation
This API can PULL transaction updates like transaction status to the merchant host after the order is confirmed. This API will work only on live MID, for the sandbox MID this API will not work.
https://kraken.airpay.co.in/airpay/pay/v4/api/verify/?token=<access_token>Header
Section titled “Header”| Parameter | Type Value | Description | Value Like |
|---|---|---|---|
| Content-Type required | String | The Content-Type header indicates the media type of the request or response body so the receiver knows how to process the data. | application/x-www-form-urlencodeds |
Request Body
Section titled “Request Body”| Parameter | Type Value | Description | Value Like |
|---|---|---|---|
| orderid optional | Alphanumeric (1-30) | Merchant generated transaction id. (Either orderid or ap_transactionid or rrn is required) | ORD12345 |
| ap_transactionid optional | Alphanumeric | airpay transaction id. (Either orderid or ap_transactionid or rrn is required) | 123456 |
| rrn optional | Numeric | Retrieval Reference Number. (Either orderid or ap_transactionid or rrn is required) | 556677 |
| terminal_id optional | Numeric (8) | POS terminal id | |
| txn_type optional | Alphanumeric | Type of transaction. e.g. pos |
Success 200
Section titled “Success 200”| Parameter | Type Value | Description | Value Like |
|---|---|---|---|
| ap_transactionid required | Numeric | airpay transaction reference number | 11314 |
| merchant_id required | Numeric | Merchant ID | 123356 |
| orderid required | Alphanumeric | orderid you have send to airpay system | ORDER123456 |
| amount required | Numeric | Transaction amount | 100.00 |
| 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 |
| merchant_name optional | Alphanumeric | Response message received from payment gateway | |
| wallet_balance optional | Alphanumeric | Remaining balance in wallet (only in case of wallet transactions) | |
| surcharge_amount optional | Alphanumeric | Additional charges for particular transaction (sending only if applicable) | |
| settlement_date optional | Date | Settlement Date | |
| billed_amount optional | Numeric | Billed amount | |
| terminal_id optional | Numeric | Terminal Id (only in case of POS transactions) | |
| pos_entry_mode optional | Numeric | POS entry mode (only in case of POS transactions) | |
| cc_expiry optional | Numeric | Card Expiry (only in case of POS transactions) | |
| rrn optional | Alphanumeric | RRN In case of sale completion it is required. | |
| message required | Alphanumeric | Response message received from payment gateway | Success |
| chmod required | Alphanumeric | Chanel of Payment done | pg |
| bank_name optional | Alphanumeric | Name of the bank, this field is available in pg | |
| token optional | Alphanumeric | Token | |
| carduniquecode optional | Alphanumeric | Card unique code (applicable only for pg,emi,pos,onclick ) | |
| bank_response_msg optional | Alphanumeric | Response message from the bank | |
| reason optional | Alphanumeric | Failed Reason | |
| transaction_reason optional | Alphanumeric | Transaction reason | |
| customer_bank_balance optional | Alphanumeric | Customer bank balance | |
| customer_name optional | Alphanumeric | Customer Name | |
| customer_phone optional | Alphanumeric | Customer Phone | |
| customer_email optional | Customer Email | ||
| customer_vpa optional | Alphanumeric | VPA will return if channel is upi | |
| risk optional | Boolean | If the transaction is at risk 1, otherwise 0. | |
| currency_code optional | Numeric | Payment Currency Indian Rupee - 356 | 356 |
| transaction_type optional | 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 Awaiting Confirmation - 450 | |
| transaction_time optional | Date | Transaction Time | |
| subscription_id optional | Numeric | subscription id if enabled subscription | |
| subscription_next_rundate optional | Date | Next subscription date if subscription transaction | |
| campaign_id optional | Numeric | Campaign ID | |
| campaign_title optional | Alphanumeric | Campaign Title | |
| campaign_discount optional | Numeric | Campaign Discount | |
| charged_amount optional | Numeric | Amount Charged | |
| auth_id optional | Numeric | Authentication ID | |
| ipn_id optional | Numeric | IPN request ID | |
| transaction_payment_status required | Alphanumeric | Transaction payment status Transaction Payment Status are: SUCCESS,INCOMPLETE,FAIL,INPROCESS,Mandate Approved,AUTHORIZE,AUTHORIZATION,CAPTURE,VOIDED,RISK | SUCCESS |
| card_number optional | Char | Masked card number (length 12-19)\ | |
| card_country optional | Alphanumeric | Card issued country, this field is available in pg | |
| card_type optional | Alphanumeric | Type of Card Credit/Debit/Unknown | |
| card_scheme optional | Alphanumeric | Card issuer name, this field is available in pg | |
| emi_tenure optional | Numeric | EMI Tenure (length 2) 3 Months - 3 6 Months - 6 9 Months - 9 12 Months - 12 18 Months - 18 24 Months - 24 | |
| conversion_rate optional | Numeric | Conversion rate | |
| ap_SecureHash required | Alphanumeric | Secure hash generated by airpay | 1490948220 |
| customvar optional | Alphanumeric | Any information passed in the request, which can be received in the response exactly as it was sent. We can pass multiple data in ‘CustomVar’ separated by the ' | ' symbol. Eg: 1234567 |
| original_currency optional | Numeric | Original currency | |
| original_fxrate optional | Numeric | Foreign currency exchange rate | |
| utr_no optional | Alphanumeric | Unique Transaction Reference No (length 16-22) |
<?php$merchant_id = "<merchant_id>";$username = "<username>";$password = "<password>";$secret = "<secret>";$secretKey = '<secretKey>';$data = array();$data['orderid'] = "ORD123456";$data['ap_transactionid'] = "12345678";$data['rrn'] = "556677";
$privatekey = hash('sha256', $secret.'@'.$username.':|:'.$password);$encdata = encrypt(json_encode($data), $secretKey);$checksum = checksum($data);
$payload = [ 'merchant_id'=>$merchant_id, 'encdata' => $encdata, 'checksum' => $checksum, 'privatekey' => $privatekey ];
$curl = curl_init();
curl_setopt_array($curl, array( CURLOPT_URL => 'https://kraken.airpay.co.in/pay/v4/api/verify/?token=<token>', CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => $payload));
$result = curl_exec($curl);
curl_close($curl);$response = json_decode($result)->response;?>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":[] } }